A popular GitHub Action you use was compromised and now dumps secrets into workflow logs. What do you do?

AdvancedScenarioSecurity incidents
Answer

Situation read → This is a supply-chain incident. Any workflow that ran the bad version may have leaked every secret it could see, and public repos' logs are readable by anyone.

What I'd do →

  1. Find exposure: search the org for the action and list runs in the affected time window.
gh search code --owner acme "uses: some-org/changed-files" --limit 200
gh run list --repo acme/api --created ">=2026-11-01" --json databaseId,workflowName,createdAt
  1. Stop using it: remove or pin it to a known-good commit SHA across all repos.
  2. Rotate every secret available to those workflows (repo, environment and org secrets), starting with cloud and registry credentials.
  3. Delete affected run logs and check the systems behind each secret for misuse.
  4. Prevent:
    • Pin third-party actions to full commit SHAs, and let Dependabot update the pins.
    • Restrict allowed actions in org settings to verified creators and an allowlist.
    • Use OIDC for cloud access so there are no long-lived keys to steal.
    • Set permissions: to the minimum, with contents: read as the default.

Why → Tags can be moved to malicious commits; a SHA can't.

Interview tip → "Pin to SHA plus least-privilege permissions:" is the expected prevention answer.

All Real-World Interview questions Roadmap: Interview readiness

More on Security incidents