-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New audit: cache poisoning #261
Comments
@woodruffw If you don't have plans to take this one, I'd love to give it a try 🙂 |
Go for it! This one has some interesting edge cases (e.g. there might be a top-level release trigger but then an Off the top of my head, here's an initial set of actions we want to catch here:
|
Thanks for sharing your thoughts. Those considerations definitely help 🚀 I'm particular interested having some upfront chat around the set of Actions we want to check. My first take would be having the Actions provided by Github as the hardcoded ones to go for. These are not going anywhere (hopefully 😂), and they look like a good place to start. Those Actions would be :
However, I really like the idea of dynamically retrieve a list of Actions we want to inspect for cacheability, using a schema that exposes at least
That would allow an user running a In addition, adding a new GHA to the list of ones we want to check is a matter of reviewing/merging a PR without any code changes (in general). We could even have a CI check to validate the This approach could be a second iteration, since there is some design to consider for the data schema (e.g., should we track versions for those Actions as well?), or we can for it right away. In the end of the, either having a static or dynamic list of suitable Actions to check, it should be straightforward add them, because the ecosystem is huge, and new additions surely will come! For example, as a long term JVM user, I'm aware that gradle/setup-gradle also caches and restores on top of I'd love to learn your thoughts on this 🙂
|
Re: data files: you read my mind! This is something I've been thinking about more generally, as a way to improve zizmor's online audit performance (since repeated paginated calls to GH's APIs are not fast) and avoid having to release new versions to release data changes (like you said). The big challenge there IMO is making sure that things gracefully degrade in an offline setting. In practice, I think that means:
TL;DR: I think this is a great idea, and that we should do it. However, I think it's a separate set of tasks than this audit itself, so I think I'd like to start things here with just a hard-coded list, and then we can do follow-ups for designing a static API.
IMO this should be non-pedantic, since it'll be pretty filtered by default (there should be a pretty low noise floor on "has caching enabled and is a release workflow).
100% offline, yep 🙂
Long term I think we'll want to collapse the distinction between the two: the audit itself will always be offline, but the age of the data it uses will depend on whether the user is online or offline 🙂 |
I've opened #278 as a separate tracker for designing a static API. |
Thanks @woodruffw ! I fully agree with having a separated task for that, meanwhile let's get started with the offline take 🙂 |
@woodruffw Just raised a first draft! |
Cache poisoning is difficult/impossible for us to detect in the general case, since it's a runtime aspect.
However, we can flag certain patterns that we know are likely to result in exploitable cache poisoning, e.g.:
setup-python
with thecache:
key orsetup-node
with similar. There are probably many of these, and we need to figure them out/enumerate them.The text was updated successfully, but these errors were encountered: