What a GitHub Actions Cache Can Expose to Anyone Who Opens a Pull Request
GitHub Actions caches can expose credentials to attackers via forked pull requests.
GitHub Actions caches can inadvertently expose sensitive credentials to attackers, particularly through forked pull requests. While GitHub prevents untrusted workflows from accessing secrets directly, a pull request from a fork can restore cached data that contains these credentials. This risk is amplified when cache paths are too broad, unintentionally including files like Docker configuration, package manager tokens, or cloud CLI credentials.
AI summary of the linked source. Not reviewed by an editor. How this works
Run GitHub Actions?
Get an email when a new story names GitHub Actions, usually within the hour.
Free. Your list stays private and never appears in a subject line. One click stops it. How Vendor Watch worksPrivacy
The lesson from this incident
Full lessonGitHub Actions caches, when configured too broadly, can inadvertently store sensitive credentials such as Docker tokens, package manager secrets, or cloud CLI configuration files. Although GitHub's security model prevents untrusted forked workflows from directly reading repository secrets, a fork-initiated pull request can still restore a cache that happens to contain those credentials. This design gap means that overly permissive cache path definitions effectively bypass GitHub's intended secret isolation. The core failure is a misconfiguration — developers cache entire home or config directories without auditing what sensitive material those paths contain. This matters because an attacker who opens a pull request against a public repository can silently harvest credentials with significant blast radius.
What helps against this
How we list vendors- Identity governance and single sign-on
People who leave or change roles lose access everywhere at once, and forgotten accounts stop piling up.
- Secrets management
API keys, tokens and passwords stop leaking from code, chat and configuration files.
- Security awareness training and phishing simulation
People recognise and report attacks instead of falling for them.