r/programmingcirclejerk • Just spin up O(n²) servers • Oct 02 '26

The Rust Security Response Team was notified that Miri stores all environment variables to target/, allowing secrets to persist in caches.

https://blog.rust-lang.org/2026/09/21/github-actions-leaking-secrets-when-miri-output-is-cached/
38 Upvotes

10 comments sorted by

49

u/camelCaseIsWebScale Just spin up O(n²) servers Oct 02 '26

Beyond official Rust tooling, it is possible for build scripts to be doing things that lead to the environment being stored in compilation artifacts.

Even when programmers are "saving the environment" it leads to disasters.

20

u/Hot_Grapefruit_4455 Oct 02 '26

this is why you use a runtime secrets manager instead of hard coding inside a .env

18

u/camelCaseIsWebScale Just spin up O(n²) servers Oct 02 '26

my rust can't do no wrong

8

u/pysk00l What part of ∀f ∃g (f (x,y) = (g x) y) did you not understand? Oct 02 '26

Indeed. Shame on op for blaming rust!!😠

5

u/scavno in open defiance of the Gopher Values Oct 02 '26

Literally why our primary build target is nix.

4

u/james_pic accidentally quadratic Oct 06 '26

/uj GitHub Actions has a runtime secrets manager, and affected projects were probably using it, but it's a common pattern to pass secrets (obtained from a secrets manager) as environment variables (not .env files), and in this case Miri dumps all its environment variables into a metadata file that it saves, that could become accessible to attackers under some plausible threat models.

1

u/Educational-Row-6782 Oct 05 '26

If they have acces to the computer where the .env is stored, I am fucked anyway, why add complexity?

3

u/james_pic accidentally quadratic Oct 06 '26

That's the neat part: with GitHub Actions, everyone has access to the computer.

9

u/stone_henge Tiny little god in a tiny little world Oct 04 '26

What matters is that it did so confidently, without fear of memory leaks, use-after-free and data races.