What a CI Cache Keeps and Who Can Read It
What a CI cache keeps between runs, who writes to it and who reads from it, as a Rust security advisory describes them.
For: Learners new to continuous integration.
What a cache keeps between runs
GitHub Actions makes it possible to cache directories between runs.[1]
Rust projects tend to speed up CI by caching binaries built by cargo install and sometimes the contents of target/.[1]
Who writes and who reads
Typical setups allow CI runs on main (and other branches) to write to cache, and PRs can only read from cache (preventing cache poisoning).[1]
PR CI can be triggered by anyone who can open PRs on your repository.[1]
What the advisory says is not guaranteed
Cargo/Miri/Rust does not guarantee that environment variables will be safe from being copied into target/.[1]
While we are treating this as a security issue and patching it out of an abundance of caution, this is not something you should rely on in general.[1]
Sources
- GitHub Actions leaking secrets when Miri output is cached (blog.rust-lang.org · checked )
More articles
- LearningWhy Rust for CPython, and What It Will Not FixThe reasons the Language Summit 2026 write-up gives for proposing Rust in CPython, what it says Rust does not remove and how the team proposes to reduce the risk.
- LearningHow a Username and Any API Key Became Admin AccessWhat the Python Security Response Team says was reported, what supplying an admin username with any key did and how quickly the fix was confirmed.
- LearningWhy an Image Tag Does Not Tell You What Code Is RunningWhat NVIDIA's post says about mutable image tags, what the AICR AI bill of materials component is and what a qualification claim means.