Skip to content
StrikeOps

CI/CD Pipeline Secrets Exposed to Untrusted Code

HighTypical severity Containers, CI/CD and source codeCWE-200ATT&CK T1552

01Description

Build pipelines exposed secrets to code or contexts that should not have them, such as workflows triggered by external pull requests, overly broad repository access, or secrets printed in build logs.

02Impact

An attacker who can influence a build, for example by opening a pull request or compromising a dependency, can extract deployment credentials and push malicious code or access production.

03Severity

Typically

High

Typically High. High where production deployment credentials are reachable. Critical if external contributors can trigger workflows with access to them.

04How to verify

  1. 1Review workflow triggers, especially those running on external pull requests with secret access.
  2. 2Check which jobs receive which secrets and whether environments require approval.
  3. 3Review build logs for printed secrets.

Testing note: only test systems you are authorized to test, within the agreed scope and rules of engagement. Verification steps are written for professional testers and avoid destructive techniques.

05Remediation

  1. 1Never expose secrets to workflows triggered by untrusted contributors.
  2. 2Scope secrets to protected environments with required reviewers.
  3. 3Use short-lived OIDC credentials for cloud deployment instead of stored keys.
  4. 4Pin third-party actions to commit hashes.

06References

Draft findings like this from your own evidence

Book a demo
Book a demo