-
Notifications
You must be signed in to change notification settings - Fork 1.8k
JS: Add sources and sinks related to GitHub Actions #12978
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
Conversation
b24595f
to
5eaaa7e
Compare
Hi @asgerf, Thanks for the updates. Is it possible to not combine these sources? I noticed that the same taint source is used for both the inputs as well as context. I feel that splitting these up makes more sense. Github Context directly to JS sink is of higher severity, than the Action Input to Sink or the Environment variable to the sink. If there is a Github Context to Sink vulnerability then it affects all the workflows that are used by the action, whereas if it's the latter, then it affects only the workflows that are passing tainted input into these Actions either as an Input or as an environment variable. Also, can we also taint the environment variables? I used a list to filter out the names of the ones that are set by the runner, the others can still be tainted. Note that this query can suffer from some loss in precision - if the action itself is setting the environment variable and then using it (although I haven't seen it in practice). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be in javascript/ql/src/change-notes instead - it was added in ruby?
There is some work in progress that would enable a more fine-grained classification of taint sources, but for the moment we have to either include these taint sources or not. But I've made it more clear in the source code that there is a difference in severity so it's easier to review in the future.
As mentioned above, we don't currently have fine-grained classification of sources. For now I've updated
Thanks for pointing that out, obviously it should be in the JS folder |
After reviewing some more of the results this change would produce, we're going to restrict the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Single optional comment, there was one predicate you had not made private.
...script/ql/lib/semmle/javascript/security/dataflow/IndirectCommandInjectionCustomizations.qll
Outdated
Show resolved
Hide resolved
…CommandInjectionCustomizations.qll Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
Adds sources and sinks based on this PR from @R3x with comments from @JarLob.
This PR is essentially a port of that PR with the following differences:
I couldn't foresee a practical way to get the original PR to this state via code reviews, hence this new PR.
But I'd like to give credit for @R3x and @JarLob for authoring the models. These were just some changes needed to get the models into a format where we can use it outside of experimental.