-
Notifications
You must be signed in to change notification settings - Fork 585
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
Please consider adding input safelisting #10
Comments
@franky47 That's wrong each step in a job workflow is isolated in his own node process. Do you have a POC? |
Steps may be isolated, but environment variables can be shared between steps within a job. My article (linked above) has a detailed explanation of the "issue" (which is considered a feature by GitHub). Unless something changed since I wrote the article, it is possible to inject arguments from a previous action to control another. |
@franky47 In your article you said |
Indeed, it seems they fixed the issue, but partially. When invoking Node directly from a So this action is no longer vulnerable to injection, good to know. I will update my article accordingly. |
GitHub Actions can be vulnerable to environment injection for optional inputs, see my article here:
https://francoisbest.com/posts/2020/the-security-of-github-actions
One form of defence against that for now is to add another input that lists input names that are safe to load (because explicitly defined by the user in their workflow).
Example:
In this example, if a malicious action defines and exports
INPUT_REGISTRY
, it would be ignored asregistry
is not part of the safelist. Without it, the image could be pushed to a registry controlled by the attacker.The text was updated successfully, but these errors were encountered: