Interview Prep/DevSecOps/Supply Chain Security at Scale

How do you prevent a compromised GitHub Action from stealing secrets in your pipelines?

IntermediateProductionSupply Chain Security at Scale
Answer
  • Pin third-party actions to a full commit SHA (uses: actions/checkout@<40-char-sha> # v4.2.2) and let Renovate/Dependabot update the pins.
  • Org setting: allow only GitHub-owned, verified-creator and an explicit allow list.
  • Default permissions: contents: read at workflow level; grant more per job.
  • Keep secrets out of jobs that run third-party actions where possible; use environments with required reviewers for deploy secrets.
  • Prefer OIDC to static secrets so there is less to steal.

The tj-actions/changed-files compromise in March 2025 hit repos using mutable tags; SHA pins were unaffected.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Supply Chain Security at Scale