Safeguard
Security Guides•

Should gate policy live in each repo or in one central place?

Per repo rules drift, central rules are rigid. Compare both for CI gates, then use a hybrid with an org wide floor and narrow local exemptions that expire.

Safeguard Security Team
3 min read

Use a hybrid. Set a central floor that every repository must meet, enforced at the organization level, and let repositories add stricter rules or narrow, expiring exemptions locally. Pure per repo policy drifts, and pure central policy ignores real differences between services.

The two models

ModelStrengthWeakness
Per repositoryFits each service, teams own itDrift, gaps, uneven quality
CentralConsistent, easy to auditRigid, central team becomes a bottleneck
HybridFloor plus local flexibilityNeeds clear rules about what can change

Using platform features for the floor

GitHub rulesets show how a floor works. The documentation says rulesets have no priority, that rules from multiple rulesets targeting the same branch are aggregated, and that where a rule differs, the most restrictive version applies. Rulesets also layer with branch protection rules, and all applicable rules are enforced.

That gives you a clean pattern: an organization level ruleset sets the minimum, and a repository can add stricter rules but cannot loosen the floor through its own settings. Bypass is controlled by the actors you list, so keep that list under central control.

What belongs where

ItemCentralRepository
Minimum severity to blockYesMay tighten
Known exploited ruleYesNo
License allow listYesMay request additions
ExemptionsProcess is centralEntries are local, with expiry
Required check nameYesNo
Dev dependency scopeDefault centralMay override with approval

Steps to set it up

  1. Write the floor as a one page policy.
  2. Enforce it with an organization level ruleset on protected branches.
  3. Store local exemptions in each repository, in a file with required reviewers from security.
  4. Report monthly on repositories that fall below the floor or have many exemptions.
  5. Review the floor every quarter with engineering leads.

Avoid the central bottleneck

If every change to the policy needs a ticket to one team, developers will work around it. Publish a response time for exemption requests, and automate the easy ones: a narrow exemption with an expiry under 30 days could be approved by a service owner plus one reviewer.

Quick check

Can a repository weaken the central floor?

With layered rulesets, the most restrictive rule applies, so a local setting cannot loosen it. Check how your own platform combines rules.

Where should exemptions be stored?

Near the code they apply to, in version control, with required review.

Safeguard's policies, gates and guardrails can apply across repositories with per project settings. Try the free scan at gold.safeguard.sh/scan.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.