Search LA24X

Keyboard shortcut: Ctrl / ⌘ + K

Type two characters to search, or explore the library.

Open the topic library →

Privacy choices

Choose what suits you. Reading and tools work without analytics or optional saving.

Necessary — always active

Page delivery, language and privacy preferences.

Advertising

Storage details ↗

CI cache security: treat restored data as an input, not trusted code

Review cache writers and readers, keep secrets out and prevent a lower-trust job from supplying executable content to a privileged release.

Illustration for CI cache security: treat restored data as an input, not trusted code
✓ A cache is not a provenance or permission certificate.✓ Cache keys and platform access rules both affect exposure.

In brief

Google’s CI/CD hardening report identifies cache poisoning as a supply-chain risk. A cache can speed up builds, but restoration does not certify who produced its contents or whether privileged execution should trust them.

The relevant check is whether a lower-trust source can influence a cache later consumed with more authority.

Map who influences the cache

Inspect events, branches, fork behaviour and runner permissions through the platform’s current documentation. An ordinary test and a release job may have different authority. Do not make an assumption about isolation based only on a human-readable cache name.

Keep secrets and critical outputs separate

Do not store credential files, private environment dumps or a trusted release artifact in a broadly accessible dependency cache. Treat dependency restoration as part of a controlled install/build process rather than directly executing unexplained cached programs.

Review a suspected poisoned state

Pause the affected release path, preserve relevant workflow records and invalidate/rebuild the suspect cache through supported controls. Investigate what ran and which credentials it could access. Clearing the cache alone does not revoke any secret already exposed.

Before you act

Cache scope and behaviour depend on the CI platform. A random key or a checksum based only on untrusted input is not automatically a security boundary.

What to do next

  1. Identify jobs that write and restore each cache and their trust levels.
  2. Exclude credentials and sensitive files and review executable restored content.
  3. Separate privileged release inputs from untrusted jobs and verify the intended dependency state.
You’ve reached the end. Save this guide for later.Back to top ↑