Standing privilege is persistent access that remains active whether or not it is needed. Just-in-time access is granted only for a defined task and then removed automatically. In CI/CD, JIT access reduces the time credentials can be abused, supports least privilege, and helps prevent stale permissions from following users after they move roles or leave.
Why Standing Privilege Creates CI/CD Risk
CI/CD systems are built for speed, repeatability, and automation, which makes standing privilege especially dangerous when secrets, runners, and deployment accounts stay permanently authorized. Persistent access can be reused long after the original task ends, and that creates a broad abuse window if a pipeline token, service account, or build secret is exposed. NHI Management Group research on The State of Secrets Sprawl 2026 shows how exposed credentials continue to appear in modern delivery environments, while Guide to the Secret Sprawl Challenge explains why secret leakage often persists after initial detection.
The main mistake is assuming a deployment identity is harmless because it is “just for automation.” In practice, persistent privilege is exactly what attackers want: a stable foothold they can reuse, pivot from, and chain across repositories, registries, and cloud controls. The OWASP Non-Human Identity Top 10 and NIST SP 800-53 Rev 5 Security and Privacy Controls both reinforce least-privilege expectations, but CI/CD adds an operational twist: access must be short-lived and task-bound or it becomes a standing exposure surface. In practice, many security teams notice the problem only after a runner token is reused in an incident, rather than through intentional access design.
How Just-in-Time Access Changes the Control Model
Just-in-time access replaces always-on entitlement with ephemeral authorization for a specific build, release, or remediation task. Instead of giving a pipeline or operator permanent rights, the system issues access only when the request is approved or policy conditions are met, then revokes it automatically when the task completes. That model is stronger than simple time-based expiry because the access window is tied to a discrete operational need, not a generic calendar period.
In CI/CD environments, JIT usually works best when it is paired with workload identity and central policy enforcement. A pipeline should authenticate as a distinct workload, not as a shared user account, and its permissions should be evaluated at request time against context such as environment, branch, artifact, deployment target, and change ticket state. Current guidance suggests that this is the point where least privilege becomes practical rather than theoretical. The CI/CD pipeline exploitation case study is a useful reminder that runners, build steps, and release automation are often the most exposed identities in the delivery chain. The GitGuardian State of Secrets Sprawl research also shows why short-lived secrets matter: leaked credentials remain useful long after detection if they are not revoked quickly.
- Use separate identities for build, test, and deploy stages.
- Issue short-lived tokens only when a pipeline reaches an approved step.
- Bind access to context such as repo, environment, and change record.
- Revoke credentials automatically after job completion or failure.
- Log every elevation event so post-incident review can distinguish planned access from misuse.
These controls tend to break down in monolithic release systems with shared runner pools and broad “deploy everywhere” accounts because the pipeline cannot reliably prove which task actually needs privilege.
Where the Tradeoffs and Edge Cases Appear
Tighter JIT controls often increase operational overhead, requiring organisations to balance release speed against approval latency and policy maintenance. That tradeoff is real, especially in high-frequency delivery environments where engineers expect deployments to be almost invisible. Best practice is evolving, and there is no universal standard for exactly how short a JIT window should be, but the direction is consistent: access should be ephemeral, scoped, and revocable.
Edge cases matter. Long-running pipelines may need token renewal, but renewal should be step-based rather than open-ended. Disaster recovery workflows may justify broader temporary access, yet those exceptions should be separately governed and reviewed. Shared self-hosted runners, especially in mixed-trust environments, are another weak point because a single over-permissioned runner can amplify a mistake across many repositories. The Reviewdog GitHub Action supply chain attack illustrates how quickly automation trust can be abused when the execution environment is not tightly bounded. For identity design, the Ultimate Guide to NHI remains the better framing than user-centric IAM, because CI/CD access is about workload intent, not human role permanence.
In practice, teams should treat standing privilege as an exception that must be justified, not the default that JIT has to “earn” its way into replacing.
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, OWASP Agentic AI Top 10 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-03 | Addresses overlong secret lifetimes in non-human identities. |
| OWASP Agentic AI Top 10 | A1 | Covers excessive autonomy and unchecked tool access patterns. |
| CSA MAESTRO | IAM | Maps identity and access governance to machine-driven workflows. |
| NIST AI RMF | Supports governance for dynamic, context-aware access decisions. | |
| NIST Zero Trust (SP 800-207) | 3.1 | Zero trust requires continuous verification before each privileged action. |
Verify each deployment request independently instead of trusting persistent sessions.
Related resources from NHI Mgmt Group
- What is the difference between just-in-time access and standing privilege?
- What is the difference between zero standing privilege and just-in-time access?
- What is the difference between just-in-time access and zero standing privilege?
- What is the difference between just-in-time access and standing privilege for NHIs?