-
Notifications
You must be signed in to change notification settings - Fork 1.8k
JS: add taint-step for markdown-it when the HTML flag is set #5685
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
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 with an optional suggestion
override predicate step(DataFlow::Node pred, DataFlow::Node succ) { | ||
exists(API::CallNode renderer, API::CallNode call | | ||
renderer = API::moduleImport("markdown-it").getACall() and | ||
renderer.getParameter(0).getMember("html").getARhs().asExpr().(BooleanLiteral).getValue() = |
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.
Would you like to go ahead and add DataFlow::Node.getBooleanValue
?
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.
I should have used the existing mayHaveBooleanValue
.
I improved the model to support a taint-step for CVE-2020-27666 |
Co-authored-by: Asger F <asgerf@github.com>
Adds a taint-step for CVE-2020-27224