GitHub Actions Introduces Cache Mode for Job Level Cache Permissions Control

GitHub has announced the general availability of cache-mode, a new configuration feature designed to secure the caching mechanism within GitHub Actions. Historically, cache access permissions depended on implicit defaults and specific event types, which could expose workflows to cache pollution. With cache-mode, platform engineers can explicitly limit cache operations by assigning read-only, write-only, read-write, or none permissions per job or workflow.
Related tools
Recommended tools for this topic
These picks prioritize high-intent tools relevant to this topic. Some links may include partner or affiliate tracking.
A strong security and edge platform match across CDN, Zero Trust, and app protection.
View CloudflareStrong fit for AI, backend, and frontend readers looking for an AI-first coding workflow.
View CursorHigh-value hosting and deployment path for frontend and cloud readers.
View VercelComparison
| Aspect | Before / Alternative | After / This |
|---|---|---|
| Permission granularity | Implicitly tied to the event type or workflow default settings across all steps | Granular control via cache-mode at both workflow and individual job levels |
| Permission options | Standard read-write or restricted depending on actor permissions | Specific assignments for read-only, write-only, read-write, or none |
| Reusable workflows | No built-in capability to enforce caller-level constraints on cache steps | Strictly limited to the permissions explicitly granted by the caller workflow |
| Low-trust events | Risky manual configuration allowed silent write actions on pull requests | Automatic warnings triggered when writing cache during pull_request_target events |
Action Checklist
- Evaluate existing workflows for cache-mode compatibility Identify jobs that only require reading or writing to partition their access.
- Apply read-only permissions to pull_request_target workflows This prevents malicious or untrusted code modifications from corrupting shared caches.
- Configure reusable workflows with restricted caller permissions Verify that downstream templates do not inherit excess cache write access.
- Monitor Actions logs for newly introduced cache warning annotations Look specifically for warnings raised by improper write actions on low-trust events.
Source: GitHub Changelog
This page summarizes the original source. Check the source for full details.



