Mitigate software supply chain risks in GitHub Actions | ODSP938
Erika Heidi walks through common GitHub Actions supply chain attack paths and the concrete controls teams can apply to reduce risk in CI/CD.
Overview
GitHub Actions workflows are a frequent target for supply chain attacks, including malicious pull requests that attempt to exfiltrate secrets, compromised dependencies, and hijacked tags. This session focuses on practical, high-impact ways to harden workflows by reducing what they can access, limiting what they can do, and shrinking the overall attack surface.
Topics covered (from the session chapters)
Risks from secrets exposure and write-capable tokens
- How secrets exposure can occur in CI/CD workflows.
- Why write-capable tokens increase blast radius when compromised.
Preventing malicious code propagation with protected branches and tags
- Using protected branches to reduce the chance of untrusted changes reaching sensitive workflows.
- Protecting tags to prevent tag hijacking and unintended releases.
Reducing entry points and managing dependencies
- Inspecting repositories for hidden risks and unnecessary workflow entry points.
- Managing dependencies to lower the chance of pulling in compromised components.
Removing unnecessary runtime and OS-level components
- Reducing the runtime footprint to shrink the attack surface available to an attacker.
Digestabot for keeping containers and workflows up to date
- Introducing Digestabot as a way to help maintain up-to-date containers and workflows.
Case study: Trivy incident from PAT exfiltration
- A case study discussing a Trivy-related incident involving Personal Access Token (PAT) exfiltration.
Pulling from trusted sources and reducing attack surface
- Pulling dependencies and artifacts from trusted sources.
- Additional steps to reduce workflow attack surface.
Final checklist highlights
- Pin dependencies and container images by digest.
- Use Octo-STS.
- Avoid long-lived tokens.