GitHub Actions limits cache access for untrusted triggers
GitHub Actions now issues read-only cache tokens for untrusted triggers targeting the default branch, mitigating privilege escalation via cache poisoning. Previously, read-write tokens were issued for all events, allowing malicious actors to compromise trusted workflows. This change primarily affects untrusted workflows that write to the default-branch cache, which will now receive warnings and fail to save cache entries. To maintain caching benefits, a separate workflow with read-write access (e.g., 'push') should be used for cache saves.
- →Read-only cache tokens for untrusted GitHub Actions triggers
- →Untrusted workflows may require separate cache save workflows
- →Default branch and pull request triggers retain read-write cache access
Security (1) ›
- Read-only cache tokens for untrusted GitHub Actions triggers
GitHub Actions now issues read-only cache tokens to the default branch for workflow events triggered without write permissions, preventing cache poisoning and privilege escalation. This change applies to untrusted events like pull_request_target and fork-pull-request workflow_run cascades when the cache scope is the default branch SHA. Restores remain unaffected.
Enhancements (1) ›
- Untrusted workflows may require separate cache save workflows
Workflows triggered by untrusted events writing to the default-branch cache will now receive a warning and fail to save cache entries. To retain caching benefits, a separate workflow triggered by an event with read-write cache access, such as 'push', is required for cache saves.
Notes (1) ›
- Default branch and pull request triggers retain read-write cache access
The most common workflow triggers that write to the default-branch cache, including push, schedule, and workflow_dispatch, continue to have full read-write caching. Triggers using a non-default-branch scope, such as pull_request and release, also retain read-write permissions.
https://github.blog/changelog/2026-06-26-read-only-actions-cache-for-untrusted-triggers