Docker and CI/CD · Senior · Question 33 of 75
How can CI cache poisoning happen?
- 1The cache grows too large and slows down every runner
- 2Two jobs write the same key and the cache gets corrupted
- ✓Correct answer: Untrusted runs write cache entries that trusted runs later restore
Explanation
If a PR workflow can save a cache the release workflow restores, it can plant modified dependencies. Scope caches by branch and don't restore untrusted caches in release jobs.