Join our Newsletter — 33% off our NHI Course
Home FAQ Governance, Ownership & Risk When should organisations block code changes instead of…
Governance, Ownership & Risk

When should organisations block code changes instead of just flagging them in CI/CD?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated September 7, 2026 Domain: Governance, Ownership & Risk

Blocking is appropriate when a finding represents a policy breach, a material exposure, or a repeatable risk that should not enter the codebase. Teams should reserve hard stops for secrets, critical vulnerabilities, or unsafe infrastructure changes, while using alerts for lower-severity findings. The goal is to reduce noise and keep enforcement tied to clearly defined security policies.

When a CI/CD Finding Should Stop the Pipeline

Blocking should be reserved for findings that change the risk status of the build, not for every issue a scanner can detect. The practical test is whether the change would create an unacceptable exposure if merged as written. That usually includes hard-coded secrets, known critical vulnerabilities with exploitability in the deployment context, or infrastructure-as-code changes that would expand trust, privilege, or network reach in a way the organisation has already said is not acceptable. For lower-severity issues, flagging is often the better fit because it preserves flow while still creating accountability.

Security teams get this wrong when they treat every alert as a release blocker, because that quickly normalises bypasses and weakens trust in the pipeline. A better approach is to align enforcement with explicit policy thresholds and the operational consequence of letting the change ship. In practice, many security teams only discover that a rule should have been a hard stop after the same exception has been approved several times and the control has effectively become advisory.

How Blocking and Flagging Differ in Practice

Blocking is an enforcement decision, not just a stronger warning. It means the pipeline refuses to continue until the issue is remediated, accepted through a formal exception path, or otherwise reclassified. Flagging means the pipeline records the finding, notifies the relevant owners, and allows progress to continue. The distinction matters because CI/CD is a governance point as much as a delivery mechanism: if the control only raises awareness, then the organisation is relying on human follow-up rather than preventing unsafe material from reaching the branch, artifact, or environment.

Teams usually get the most value from blocking when the finding is both objectively serious and operationally actionable. That is why secrets, critical vulnerabilities, and risky infrastructure changes are common hard-stop candidates. A secret in source control can be copied before detection. A critical vulnerability can become a release-time exposure if the affected component is promoted unchanged. An unsafe infrastructure change can silently widen access, expose services, or weaken segmentation. For these cases, the pipeline is functioning as a policy gate.

Flagging is better when the issue is real but not yet severe enough to justify stopping delivery. That often includes medium-severity findings, uncertain detections, or issues that require context before a final decision. In those cases, teams still want visibility, trend data, and owner accountability without converting every defect into an outage for engineering. OWASP Non-Human Identity Top 10 is useful here because it highlights how machine credentials, tokens, and service identities create distinct control failures that often deserve stronger enforcement than ordinary code-quality warnings.

  • Block when the issue violates a stated security policy or creates a material exposure.
  • Flag when the issue needs triage, context, or planned remediation but is not yet release-stopping.
  • Use exception handling only when the risk is understood, time-bound, and owned.
  • Keep the threshold explicit so developers can predict when the pipeline will fail.

The guidance breaks down when the organisation cannot reliably tell severity from context, because then the pipeline either blocks too much or allows too much.

Edge Cases That Change the Enforcement Decision

Tighter enforcement often improves safety but increases developer friction, so organisations have to balance risk reduction against delivery disruption. That tradeoff is most visible in code paths that are high-churn, shared by many teams, or used in automated deployment workflows.

One common edge case is a finding that is low severity in isolation but high severity because of where it appears. A weak configuration in a non-production sandbox may be tolerable as a flag, while the same control gap in a deployment path, signing process, or privileged automation flow may justify a block. Another edge case is repeated recurrence. A control that starts as advisory can become a candidate for blocking when the same class of issue keeps reappearing and the alert no longer produces reliable remediation.

There is also a difference between issues that are technically fixable and issues that are politically or operationally accepted. Consensus is stronger around blocking secrets and confirmed critical exposures than around borderline policy violations, where organisations often need a local decision based on risk appetite, compliance obligations, and the maturity of their exception process. The practical line is whether allowing the change would create a condition the business has already decided it should not tolerate. That is the point at which flagging stops being enough and enforcement becomes necessary.

Where the pipeline includes infrastructure, identity, or automation changes, teams should be especially careful not to treat these as ordinary code findings, because a small change can materially alter access paths, trust boundaries, and blast radius.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK address the attack and risk surface, while CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
CIS Controls v816 — Application Software SecurityCI/CD blocking policies govern whether unsafe code reaches production.
4 — Secure Configuration of Enterprise Assets and SoftwareUnsafe infrastructure changes often involve insecure configuration drift.
6 — Access Control ManagementSecrets and privileged automation changes directly affect access paths and privilege.
Recommendation — Apply Control 16 to stop releases that introduce verified software-security weaknesses. Use Control 4 to block configuration changes that create unacceptable exposure. Use Control 6 to prevent changes that expand access without approved authorization.
MITRE ATT&CKT1552 — Unsecured CredentialsHard-coded secrets in code are a direct credential-exposure pattern.
T1195 — Supply Chain CompromiseCI/CD enforcement addresses tampering or unsafe changes in build and deployment chains.
Recommendation — Map secret findings to T1552 and block any commit that exposes credentials. Use T1195 to hard-stop changes that compromise the software supply chain.

Practitioner Guidance

What to prioritise: Define the small set of findings that are always release-stopping, then keep everything else in a visible but non-blocking path. That preserves credibility because developers can distinguish policy breaches from review items.

Decision rule: If the finding would let an unsafe condition ship unchanged, block it; if the organisation still needs context, ownership, or scheduled remediation, flag it. The key question is whether the change should be allowed to enter the codebase at all.

What to verify: Check that every hard stop maps to an explicit policy, a named owner, and a documented exception path. A blocking rule without those three elements usually turns into noisy enforcement or informal bypass.

Practitioner takeaway: Treat blocking as a policy mechanism for unacceptable exposure, not as a general quality signal, because the strongest pipelines fail fast only when the risk of shipping is clear enough to justify interrupting delivery.

Deepen Your Knowledge

Sign up to our weekly newsletter — get 33% off our NHI Foundation Level Course

    NHIMG Editorial Note
    Reviewed and updated by the NHIMG editorial team on September 7, 2026.
    NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org