Interview Prep/GitHub Actions/Secrets, OIDC & Environments

Secrets were exposed in public workflow logs for 3 hours. What do you do?

AdvancedScenarioSecrets, OIDC & Environments
Answer

Situation read → Incident response, assume compromise.

What I'd do →

  1. Rotate every exposed credential immediately; revoke tokens at the provider.
  2. Delete the affected run logs (gh run delete or API) to stop further exposure.
  3. Search provider audit logs (CloudTrail, npm) for use during the window.
  4. Find the cause: set -x, transformed secret, third-party action, and fix it.
  5. Postmortem, add log scanning, and move to OIDC where possible.

Why → Deleting logs does not undo exposure; rotation is the only real fix.

Interview tip → Rotate first, investigate second.

All GitHub Actions questions Roadmap: GitHub Actions

More on Secrets, OIDC & Environments