Supply Chain Security
GitHub Cache Modes Can Restrict Access or Override a Safer Default
GitHub made cache-mode generally available on September 10, allowing workflows and jobs to limit cache restores and saves. The same setting can also widen access: explicitly granting write access on a low-trust event overrides its read-only default. GitHub adds a warning, but a warning is not a denial.
Citation-ready: GitHub Actions cache-mode can override low-trust events' read-only default; write access triggers a warning and can increase cache-poisoning risk.
Evidence boundary: Official configuration documentation. No exploit test or security assessment of a user repository; the article does not provide an attack procedure.

What happened and why it matters
The new control is useful only when its overrides are reviewed against the event's trust level; a configuration change is not automatically a security improvement.
Primary evidence
Primary reference: GitHub Changelog. Kaleido Field checked the event date and the article's attributed facts against this source.
| Source date | September 10, 2026 |
|---|---|
| Checked by Kaleido Field | September 11, 2026, CST |
| Source function | developer security -> CI cache authority and trust propagation |
Read and write are distinct cache operations
The modes are read, write, write-only and none. Write permits both restores and saves; write-only permits saves without restores. Job settings override workflow settings.
Choose the smallest scope that the job needs. A publishing job that never consumes a cache has different requirements from a test job that only restores dependencies. Those examples describe access needs, not a universal configuration prescription.
A called workflow cannot gain more than its caller grants
GitHub says enforcement happens at the cache service and carries through reusable workflows. The caller's grant sets a ceiling for the called workflow. Existing defaults remain when cache-mode is not declared.
Review the caller and callee together. A local YAML line can be misleading if the actual run inherits a stricter grant from its caller or a different event context than the reviewer assumed.
Treat the warning as an unresolved decision
For low-trust events such as pull_request_target, an explicit write or write-only mode overrides the read-only default and generates a warning. Do not treat the warning annotation as proof that unsafe behavior was prevented.
Keep that review alongside the AI Scan configuration record. Both controls benefit from an effective-state readback and a separate observation of the run they are meant to govern.
Evidence boundary
Official configuration documentation. No exploit test or security assessment of a user repository; the article does not provide an attack procedure.
FAQ
Does declaring cache-mode always make a workflow safer?
No. It can restrict access, but an explicit write grant can also override a read-only default on a low-trust event.