📋 What Is It?
Inadequate Identity and Access Management is the risk that arises when the many identities - human and machine - spread across the CI/CD ecosystem are too numerous, over-permissioned, stale, or poorly governed. It is not a single misconfigured account; it is the accumulated failure to consistently answer three questions for every identity: who or what is this, exactly what may it do, and should it still exist at all? SCM, CI orchestrators, registries, secrets managers, and cloud accounts each add their own users, tokens, and roles, producing identity sprawl with no single place that knows who holds what.
⚠️ Common Exploits
- Over-Permissioned CI Tokens: A job that needs one repo holds org-wide or admin scope
- Broad Non-Expiring PATs: A leaked personal token with every scope and no expiry is a master key
- Local Bypass Accounts: Tool-local admins skip SSO, MFA, and central logging
- Shared Bot Accounts: One "deploy-bot" used by many, unattributable, permission-bloated
- Stale Access After Offboarding: SSO disabled but PATs, keys, and local accounts still valid
- Standing External Access: Contractors and integrations with never-expiring write
- Unrotated Deploy Keys: Robot tokens and SSH keys valid indefinitely
- RBAC Sprawl: "Read-only" in one tool, admin in another
🔴 Attack Flow
↓
2. Enumerate its reach (repos, CI, registry, cloud scopes)
↓
3. Abuse excess privilege (read secrets, edit pipeline)
↓
4. Pivot across systems: SCM → CI → registry → cloud
↓
5. IMPACT: Mint new tokens to persist - full supply-chain reach!
❌ Vulnerable Code
✅ Secure Code
✓ Prevention Checklist
- Maintain one inventory of every human & machine identity
- Front every system with central IdP/SSO + enforced MFA
- Eliminate local bypass and shared/generic accounts
- Scope each token/service account to exactly its task
- Give all PATs a short expiry and a named owner
- Prefer short-lived OIDC federation over long-lived PATs
- Rotate machine credentials and deploy keys on a schedule
- Offboard across every plane, not just the IdP login
- Time-box external collaborator & integration access
- Run periodic access recertification; remove stale identities
🔍 Detection & Tools
Identity & Federation:
Audit & Discovery:
How to Test:
- Enumerate token scopes (e.g.
X-OAuth-Scopesheader) - Search for local accounts that bypass SSO/MFA
- List PATs and deploy keys with no expiry or owner
- Verify offboarded users have zero valid credentials
- Compare a user's RBAC across SCM, CI, and cloud for gaps
- Confirm CI-to-cloud uses OIDC, not static access keys
🌍 Real-World (Incident Classes)
- Leaked CI Token, Excessive Scope: A pipeline stored a long-lived token scoped to a whole SCM organisation instead of one repo; exposed via a build log or compromised runner and still valid (no expiry), it exposed private source across many projects - a pattern recurring in supply-chain post-mortems.
- Stale Access After Offboarding: Deprovisioning disabled the IdP login but left the SCM PAT, CI local account, and cloud access key alive, giving a former insider a lasting path into code and infrastructure.
- Shared Bot as Single Point of Failure: One generic automation account, reused by many humans and pipelines with a shared password and no MFA, accumulated the union of every task's permissions - its compromise yielded broad, unattributable access.
- Self-Hosted Runner / Robot-Account Abuse: Over-privileged robot and runner identities reused across projects let a single foothold reach far beyond the workload that owned it.
📌 Quick Tips
- DO NOT issue non-expiring org-wide PATs
- DO NOT keep local accounts that bypass SSO/MFA
- DO NOT share one bot account across teams
- DO scope every identity to least privilege
- DO use short-lived OIDC over static keys
- DO offboard across every plane
- DO recertify access on a schedule
📜 Compliance
Related Standards:
- SOC 2 CC6.1-6.3 - Logical Access
- ISO 27001 A.9 - Access Control
- NIST 800-53 AC-2 / AC-6 - Least Privilege
- PCI-DSS Req 7 & 8 - Access & Identity
- CIS Control 5 & 6 - Account Management