TAM-H-STG-048 · Human · Stage: Getting ready · New in TAM

Scraping Runner Secrets

The insider uses a CI job to print, encode or send out the secrets that the pipeline holds.

CI/CD runners get cloud keys, deploy tokens, signing keys and database passwords as environment variables. Anyone who can change a workflow file, or open a pull request that runs on a trusted runner, can usually read them.

Platforms mask secrets in logs, but masking is easy to beat. Base64-encoding a value, splitting it into pieces, or posting it to a webhook all slip past. Self-hosted runners make it worse because files and credentials from earlier jobs may still be on disk.

This is often a staging step. The insider collects production credentials through the pipeline so they can use them later from outside, where the access no longer looks like the CI role.

What it looks like

  • A developer adds a step that runs `env | base64` in a branch build and copies the output from the log.
  • A workflow is changed to curl the contents of `toJSON(secrets)` to an outside URL.
  • An engineer reads cached cloud credentials from a self-hosted runner's home directory.

Detections (3)

Controls (3)