Back

CICD-SEC-2: Inadequate Identity and Access Management - Overview

What is Inadequate Identity and Access Management?

Inadequate Identity and Access Management (IAM) 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 in the pipeline: who or what is this, exactly what may it do, and should it still exist at all?

A modern engineering organisation runs its software supply chain across a fleet of independently administered systems: source control (SCM) such as GitHub, GitLab, or Bitbucket; CI/CD orchestrators such as Jenkins, GitHub Actions, GitLab CI, or CircleCI; artifact and package registries; container registries; secrets managers; and one or more cloud accounts. Each of these has its own notion of users, groups, service accounts, bot accounts, tokens, and roles. When identities are provisioned per-system with no central governance, the result is identity sprawl: hundreds or thousands of credentials, each a potential entry point, and no single place that knows who holds what.

CICD-SEC-2 is part of the OWASP Top 10 CI/CD Security Risks. It focuses specifically on the governance of identities and their permissions across the toolchain—distinct from how secrets are stored (CICD-SEC-6) or how the pipeline itself is configured.

Core Concept

Well-Governed IAM:
  Identity source  -> central IdP/SSO for every system, MFA enforced
  Human accounts   -> federated, group-based, deprovisioned on offboarding
  Machine identity -> one scoped identity per workload, short-lived tokens
  Tokens / PATs    -> narrow scope, expiry set, rotated, inventoried
  Permissions      -> least privilege, consistent RBAC across the toolchain
  External access  -> time-boxed, read-only by default, reviewed
  Reviews          -> periodic access recertification, stale identities removed

Inadequate IAM:
  Identity source  -> local accounts per tool, MFA optional or off
  Human accounts   -> personal logins linger after people leave
  Machine identity -> one shared "ci-bot" reused everywhere, never rotated
  Tokens / PATs    -> broad scope, no expiry, pasted into many places
  Permissions      -> admin "to be safe", inconsistent per system
  External access  -> contractors and integrations with standing write access
  Reviews          -> nobody knows who holds what; nothing is ever removed

Why It's Critical for CI/CD

The CI/CD ecosystem concentrates several conditions that make inadequate IAM especially damaging:

Why Does This Matter?

Business Impact

Technical Impact

Technical Context

The Identity Landscape of a Pipeline

Before you can govern identities, you have to see them. A typical delivery pipeline authenticates across all of these planes, each with its own identity model:

SystemIdentity typesTypical credential
Source control (SCM)Users, orgs/teams, bot accounts, deploy keys, appsPassword+MFA, SSH key, PAT, app installation token
CI/CD orchestratorUsers, service accounts, runners/agents, pipeline jobsAPI token, job token, OIDC identity
Artifact / package registryUsers, publish tokens, CI service accountsAPI key, registry token
Container registryRobot accounts, pull/push credentialsRobot token, cloud IAM role
Secrets managerApp roles, machine identitiesToken, role, OIDC binding
Cloud account(s)IAM users, roles, workload identitiesAccess key, assumed role, federated OIDC

Common Failure Patterns

1. Over-Permissioned Service Accounts and CI Tokens

# A CI job that only needs to push one image, but the token can do everything
CLOUD_ROLE   = "AdministratorAccess"        # needs: push to one ECR repo
GITHUB_TOKEN = permissions: write-all        # needs: read one repo
REGISTRY_KEY = scope: "read,write,delete,admin"  # needs: write one package

Risk: If the job, its logs, or its runner are compromised, the attacker inherits everything the token can do—usually far more than the job required.

2. Local Accounts Bypassing Central IdP/SSO

# The org uses SSO... except:
jenkins  -> local admin account "admin", not tied to the IdP, no MFA
gitlab   -> a few "break-glass" local users that never got removed
registry -> basic-auth service user shared over chat

Risk: Local accounts skip MFA, conditional access, and central logging, and they survive offboarding because HR-driven deprovisioning only touches the IdP.

3. Stale and Unused Identities and Tokens

PAT "old-migration-script"   last used: 14 months ago   expiry: never
Service account "legacy-ci"  owner left the company      still active
Deploy key on prod repo      added for a 2019 POC         never revoked

Risk: Every credential that outlives its purpose is pure attack surface with no offsetting benefit—and no one is watching it.

4. Shared Accounts and Generic Bot Users

"deploy-bot"  used by 12 engineers and 3 pipelines
"team-svc"    password in a shared vault note, no MFA, no owner

Risk: Shared identities destroy attribution, cannot be safely rotated (everyone breaks at once), and typically accrue the union of everyone's permissions.

5. Broad, Non-Expiring Personal Access Tokens (PATs)

Token scopes: repo, workflow, admin:org, delete_repo, packages   # everything
Expiration:   No expiration
Stored in:    a .env on a laptop, a CI variable, and a wiki page

Risk: A single leaked PAT with org-wide scope and no expiry is a master key that keeps working indefinitely.

6. Unmanaged External Collaborators

outside-collaborator@contractor.example  role: Write on 40 repos
integration "some-saas-app"              scope: read/write code + CI, forever

Risk: External humans and third-party integrations often receive standing write access that is never time-boxed or reviewed after the engagement ends.

How These Combine Into an Attack Path

Leaked over-scoped PAT (SCM)     -> read + write to many repos
        +
CI service account = admin       -> alter pipeline, read all CI secrets
        +
Registry token can publish       -> push a backdoored artifact
        +
Cloud role = Administrator       -> deploy it and reach production data
        =  full supply-chain compromise from one identity

Real-World Impact

The incidents below are described as classes of real, repeatedly observed events rather than any single named breach, so the lessons generalise. Each maps directly to an inadequate-IAM root cause.

Case Class 1: Leaked CI Token With Excessive Scope

Failure:

Impact: With one credential, an attacker read private source across many projects and, because the token also allowed writes, could tamper with code and pipelines. This pattern recurs across public post-mortems of supply-chain incidents.

Root Cause: A machine identity provisioned with organisation-wide scope and no expiration, violating least privilege and short-lived-credential principles.

Case Class 2: Stale Access After Offboarding

Failure:

Impact: Former insiders—or anyone who later obtained their still-valid credentials—kept the ability to reach code and infrastructure long after the working relationship ended.

Root Cause: Identities outside central governance, plus no periodic access review to catch what offboarding missed.

Case Class 3: Shared Bot Account as a Single Point of Failure

Failure:

Impact: Compromise of that one account yielded broad, high-privilege access, and the shared nature meant the incident could not be attributed to any individual or safely contained without breaking everyone.

Root Cause: Shared identity plus permission accumulation plus missing MFA—three inadequate-IAM anti-patterns in one account.

Prevalence and Characteristics

Inadequate Identity and Access Management is ranked CICD-SEC-2 in the OWASP Top 10 CI/CD Security Risks precisely because it is both widespread and high-impact. Because identities span every tool in the delivery chain, some form of this weakness appears in the large majority of real environments.

Rather than cite precise figures (which vary by source and year), the defensible picture is:

Note: exact counts of identities and tokens differ wildly between organisations. The durable takeaway is that machine identities vastly outnumber humans, are poorly inventoried, and are where inadequate IAM most often bites.

Common Misunderstandings

Myth 1: "We have SSO, so identity is handled"

Reality: SSO governs human logins to systems that are wired into it. It says nothing about machine identities, tokens, deploy keys, or the local "break-glass" accounts that quietly bypass it. Those are usually where the risk lives.

Myth 2: "It's just a build bot, it doesn't need tight permissions"

Reality: Build identities are among the most powerful in the company—they can change code and push to production. A bot with admin rights is a bigger prize than most human accounts.

Myth 3: "Tokens are fine as long as they're secret"

Reality: Secrets leak—via logs, forks, dependencies, and misconfiguration. Scope and expiry are what limit the blast radius when a token leaks, which is why a broad, non-expiring PAT is dangerous regardless of how carefully it is stored.

Myth 4: "We removed their SSO login when they left"

Reality: Offboarding that only touches the IdP leaves behind personal access tokens, local tool accounts, SSH deploy keys, and cloud access keys. Complete deprovisioning has to reach every plane the person could authenticate to.

Myth 5: "A shared automation account is simpler to manage"

Reality: Shared accounts are simpler to create and far harder to govern. They cannot be attributed, cannot be rotated without breaking everyone, and accumulate permissions until they are a jackpot for an attacker.

Myth 6: "External collaborators only have access to what they need"

Reality: Outside collaborators and third-party integrations are routinely granted standing write access that is never time-boxed and is forgotten once the engagement ends. Their access should be reviewed on a schedule and expire by default.

How Inadequate IAM Differs from Related CI/CD Risks

AspectInadequate IAM (CICD-SEC-2)Insufficient Credential Hygiene (CICD-SEC-6)Insufficient Flow Control (CICD-SEC-1)
Root causeToo many / over-scoped / stale identitiesSecrets poorly stored, exposed, or unrotatedMissing guardrails on how changes flow to prod
Where it livesIdentity & permission model of every toolSecret stores, variables, files, logsBranch/pipeline/approval configuration
Typical fixLeast privilege, SSO+MFA, remove stale, OIDCVaulting, rotation, scanning for leaksRequired reviews, protected branches, gates
DetectionAccess review, permission audit, identity inventorySecret scanning, rotation trackingPipeline/config review

Key Takeaways

  1. Identity sprawl spans the whole toolchain—SCM, CI, registries, secrets, and cloud each add identities that must be governed together, not in silos.
  2. Machine identities are the bigger risk—they outnumber humans, hold production-grade power, and are rarely watched.
  3. Scope and expiry limit blast radius—least privilege and short-lived, narrowly scoped credentials are what save you when something leaks.
  4. Stale is dangerous—every identity that outlives its purpose is free attack surface; remove and rotate continuously.
  5. Govern centrally and consistently—SSO+MFA everywhere, no local bypass accounts, no shared logins, and periodic access reviews across every system.

How to Identify if You're Vulnerable

Ask these questions about your CI/CD ecosystem:

If you answered "no" or "not sure" to several of these, you likely have exploitable identity and access gaps today.

Next Steps