Preventing Secret Leaks in GitHub Actions Logs and Moving to OIDC Authentication
Following a prior incident, the author argues that after rotating keys, teams must also stop them from leaking again, since CI pipelines are a common leak point. The article identifies three frequent problems: echoing secrets directly in run steps, where GitHub's log masking is only best-effort, exposing secrets through workflow-level env that every job and third-party action can read, and relying on long-lived cloud keys. Recommended fixes include passing secrets through step-scoped environment variables, explicitly masking derived values, and switching to short-lived OIDC credentials for AWS, GCP, and Azure with tightly restricted trust policies. The author also introduced actions-harden, a tool that flags these risky patterns in workflow files.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in