-
Notifications
You must be signed in to change notification settings - Fork 1.9k
JS: Add more models for command parsing libraries in js/indirect-command-line-injection #4733
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
esbena
left a comment
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.
LGTM. Some minor comments, and a missing change-notes.
...script/ql/src/semmle/javascript/security/dataflow/IndirectCommandInjectionCustomizations.qll
Outdated
Show resolved
Hide resolved
| // `require('meow')(help, {...spec})` => `{a: ..., b: ....}` | ||
| this = DataFlow::moduleImport("meow").getACall() | ||
| or | ||
| // https://www.npmjs.com/package/dashdash |
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.
ditto
| /** | ||
| * A source of user input from the command-line parsed by the `commander` library. | ||
| */ | ||
| private class CommanderSource extends Source { |
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 a part of ParsedCommandLineArgumentsAsSource above for consistency?
…CommandInjectionCustomizations.qll Co-authored-by: Esben Sparre Andreasen <esbena@github.com>
esbena
left a comment
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.
Approved. The changes seem benign wrt. performance.
No description provided.