Join our Newsletter — 33% off our NHI Course
Home FAQ Cyber Security What happens when secure-by-default controls are missing in…
Cyber Security

What happens when secure-by-default controls are missing in CI/CD?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated September 1, 2026 Domain: Cyber Security

When secure-by-default controls are missing, risky code, secrets, and malicious dependencies can move through the pipeline unchecked. That increases the chance of compromised builds, exposed credentials, and production rollouts with hidden flaws. Teams then spend more time on emergency rollback, forensic analysis, and patching, instead of preventing the issue at the point of entry.

Why This Matters for Security Teams

Secure-by-default controls are the difference between a pipeline that resists accidental exposure and one that quietly normalises unsafe release behaviour. In CI/CD, the absence of guarded defaults means every commit, dependency update, and configuration change inherits more trust than it should. That creates a direct path for secrets leakage, poisoned build inputs, over-permissive service accounts, and release artefacts that reach production without meaningful validation.

Security teams often underestimate how quickly pipeline weakness becomes an identity and access problem. CI/CD systems usually hold privileged tokens, signing keys, deployment credentials, and access to cloud or container platforms. When those controls are not enforced by default, a single weak job definition can expose Non-Human Identities, expand blast radius, or enable lateral movement into production environments.

Good practice is to make the safe path the easiest path: least privilege for runners, secret isolation, dependency verification, policy checks, and protected promotions between stages. NIST SP 800-53 Rev 5 Security and Privacy Controls provides a useful reference point for translating that intent into control language, especially where configuration baselines and access enforcement are concerned. In practice, many teams discover pipeline weakness only after a compromised dependency or leaked token has already been used to push a bad build into production.

How It Works in Practice

Secure-by-default CI/CD means the platform, not individual engineers, carries the first line of defence. The pipeline should reject unsafe configurations unless someone explicitly and appropriately approves an exception. That usually involves controls across source, build, test, package, and deploy stages, with policy enforced as code rather than as tribal knowledge.

  • Restrict runner permissions so jobs only receive the credentials needed for that stage.
  • Store secrets in dedicated secret managers and inject them at runtime rather than hardcoding them into repos or images.
  • Verify dependencies and build inputs with allowlists, integrity checks, and provenance attestation.
  • Fail closed on policy violations such as unsigned artefacts, unapproved base images, or missing scans.
  • Separate build and deploy identities so a compromised build job cannot automatically deploy to production.

This is also where identity governance matters. CI/CD platforms increasingly rely on machine identities, workload identities, and short-lived tokens to orchestrate automation. If those identities are not scoped tightly, they become high-value secrets in motion. Teams should treat pipeline service accounts like privileged accounts, not generic utility users, and align promotion gates with change control, audit logging, and artifact provenance.

Current guidance suggests that secure defaults work best when they are centrally enforced through templates, policy engines, and reusable pipeline components. That makes it harder for one team to bypass controls in the name of speed. NIST SP 800-53 Rev 5 Security and Privacy Controls is useful here because it maps well to access control, configuration management, and system integrity requirements that can be embedded into delivery workflows. These controls tend to break down when teams allow ad hoc pipelines in legacy environments because inconsistent tooling prevents policy enforcement from being applied uniformly.

Common Variations and Edge Cases

Tighter pipeline controls often increase friction for developers and platform engineers, requiring organisations to balance release speed against the risk of unsafe automation. That tradeoff is real, especially in high-change environments where teams want rapid promotion but also need strong release assurance.

There is no universal standard for this yet, but best practice is evolving toward layered enforcement rather than single-point checks. For example, some organisations rely on build-time gates only, while others add deployment-time admission control, signed artefacts, and drift detection in the runtime environment. The right model depends on how much trust can be placed in the source repository, build infrastructure, and downstream deployment targets.

Edge cases usually appear in hybrid estates, ephemeral preview environments, and vendor-managed CI/CD platforms. In those settings, secure defaults can be weakened by inherited permissions, shared runners, or inconsistent secret handling between internal and external systems. Another common failure mode is exception sprawl, where temporary bypasses become permanent because no one owns cleanup.

The practical test is simple: if a developer can accidentally ship a dangerous change without encountering a control designed to stop it, then the pipeline is not secure by default. That gap often becomes visible only when a release is already live and incident response has to reconstruct how the control failed.

Standards & Framework Alignment

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

OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0, NIST AI RMF and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST CSF 2.0PR.AC-4CI/CD pipeline identities need least-privilege access to prevent unsafe automation.
NIST AI RMFAutomated delivery logic mirrors AI governance needs for controlled, accountable automation.
OWASP Non-Human Identity Top 10Pipelines often rely on machine identities that must be governed like other NHIs.
NIST Zero Trust (SP 800-207)SC-7Zero trust segmentation limits blast radius when pipeline systems are compromised.

Scope build and deploy identities to the minimum permissions needed for each pipeline stage.

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 1, 2026.
    NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org