Tech article
Control GitHub Actions cache access with cache-mode
Publisher description: You can now use cache-mode to apply least-privilege access to the GitHub Actions cache at the workflow or job level.
github | Sep 10, 2026 | Allison
Automated excerpt
By granting each workflow or job only the cache access it needs, you can prevent unnecessary restores or saves and help protect trusted workflows from cache poisoning. Choose the access each workflow or job needs: read allows cache restores but prevents cache saves. This is the default for low-trust events such as pull_request_target. write allows cache restores and saves. This is the default for trusted events such as push. write-only allows cache saves but prevents cache restores. none prevents all cache access. Cache mode is generally available on github.com for all GitHub plans.
Selected automatically from source text; not independently written or fact-checked. Read the original for full context.