Interview Prep/CI/CD/GitHub Actions and GitLab CI in Production

How do you handle a leaked secret in GitHub Actions logs?

AdvancedProductionGitHub Actions and GitLab CI in Production
Answer

Assume compromise. Rotate the secret first, then delete the affected workflow run logs (deletion hides the exposure, but does not undo it), review where the secret was used and check provider audit logs for misuse, and find the root cause (an echo, a debug flag, a tool printing its config, base64-encoded values that evade masking). Enable secret scanning and push protection, mask derived values with ::add-mask::, and migrate to OIDC so no long-lived secret remains.

All CI/CD questions Roadmap: GitLab CI/CD

More on GitHub Actions and GitLab CI in Production