Subscribe to the Non-Human & AI Identity Journal

Why do exposed service and CI credentials increase supply chain risk?

Because machine credentials often have permissions to publish code, access repositories, and trigger automation, which lets an attacker reuse one secret across multiple systems. When those credentials are long-lived or broadly scoped, a single leak can turn into lateral movement through build pipelines, package registries, and cloud services.

Why This Matters for Security Teams

Exposed service and CI credentials are dangerous because they usually do not represent one system, they represent a trusted workload that can publish artifacts, modify pipelines, read source, or call cloud APIs. Once a secret leaves a repo, log, or build step, an attacker can often reuse it immediately across the software supply chain. Current guidance from the OWASP Non-Human Identity Top 10 treats this as an identity problem, not just a secrets hygiene issue.

That distinction matters because service and CI credentials are commonly over-scoped, long-lived, and reused across environments. A single leak can become repository tampering, package poisoning, workflow abuse, or cloud compromise. NHI Management Group has documented how secret exposure chains into broader breach paths in the 52 NHI Breaches Analysis and the Guide to the Secret Sprawl Challenge.

Entro Security reported that when AWS credentials are exposed publicly, attackers attempt access within an average of 17 minutes, and as quickly as 9 minutes in some cases. In practice, many security teams discover supply chain misuse only after a build has already been altered or a package has already been published.

How It Works in Practice

Supply chain risk rises when a leaked credential can do more than authenticate. CI tokens, deploy keys, cloud access keys, and automation secrets often carry permissions that map directly to build, release, and distribution workflows. If an attacker finds one of those secrets in a repository, artifact, chat log, or dependency file, they may be able to impersonate the pipeline, modify code, sign artifacts, or trigger downstream automation.

The practical failure is usually not one secret by itself. It is the combination of broad scope, weak expiration, and weak separation between environments. A token used for test builds may still be able to read production metadata, or a service account used by a runner may have write access to registries and package feeds. That is why the Reviewdog GitHub Action supply chain attack and the Shai Hulud npm malware campaign are useful references: attackers do not need every credential, only one with the right trust path.

Security teams reduce this risk by treating CI and service credentials as non-human identities with explicit lifecycle controls:

  • Use short-lived credentials instead of static keys whenever the platform supports it.
  • Scope tokens to one pipeline, one repository, or one deployment target, not the whole estate.
  • Rotate credentials automatically and revoke them as soon as the job completes.
  • Separate build-time, deploy-time, and runtime identities so compromise does not cross stages.
  • Monitor for secret use outside expected geography, time windows, and automation context.

For implementation patterns, current guidance suggests combining workload identity, ephemeral issuance, and policy checks at request time rather than relying on manual review after a leak is found. NIST’s Cybersecurity Framework 2.0 and the Ultimate Guide to NHIs — Static vs Dynamic Secrets both support the operational direction: reduce standing access, shorten credential lifetime, and make trust conditional on context. These controls tend to break down in legacy CI estates where shared runners, hard-coded variables, and manually managed deploy keys make per-job identity impossible.

Common Variations and Edge Cases

Tighter credential controls often increase pipeline complexity, so organisations have to balance stronger containment against developer friction and release speed. That tradeoff is most visible in environments with self-hosted runners, multi-tenant build systems, or third-party automation that cannot yet use workload identity cleanly.

There is no universal standard for this yet, but best practice is evolving toward context-aware access instead of static role assignment. For example, a release job may need permission only if the commit is signed, the branch is approved, and the artifact hash matches policy. This is a better fit for autonomous automation than a flat RBAC model, because the right answer depends on what the workload is doing at that moment.

Edge cases matter. Some legacy systems still require long-lived secrets for package signing or vendor APIs, and some integrations cannot support OIDC or federated identity. In those cases, teams should isolate the secret, reduce its privileges, and wrap it in compensating controls such as tight network restrictions, strong audit logging, and rapid revocation playbooks. When organisations ignore those exceptions, exposed credentials become especially dangerous in forked repositories, unmanaged build runners, and cross-account deployment paths where one secret can pivot into multiple trust domains.

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 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF, NIST CSF 2.0 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 long-lived and over-scoped non-human credentials.
CSA MAESTRO Covers agent and workload trust boundaries across automation.
NIST AI RMF Supports governance for dynamic, high-impact automated system behaviour.
NIST CSF 2.0 PR.AC-4 Least-privilege access reduces blast radius after secret exposure.
NIST Zero Trust (SP 800-207) Zero trust supports contextual verification for pipeline and service access.

Replace standing CI and service secrets with short-lived, least-privilege identity.