JavaScript: Add library for HTML sanitizers#46
Merged
semmle-qlci merged 3 commits intogithub:masterfrom Aug 13, 2018
Merged
Conversation
xiemaisi
suggested changes
Aug 10, 2018
xiemaisi
left a comment
There was a problem hiding this comment.
LGTM, but perhaps could do with a change note. The name based matching is probably fine; it's no worse than what we do for sensitive expressions.
| abstract DataFlow::Node getInput(); | ||
| } | ||
|
|
||
| private class DefaultHtmlSanitizerCall extends HtmlSanitizerCall { |
There was a problem hiding this comment.
May be worth adding a comment (even though it's private), explaining that this models popular npm packages as well as home-made sanitizers.
37bcc05 to
8074786
Compare
Contributor
Author
|
Addressed comments and rebased to avoid conflict in the change log. |
aibaars
pushed a commit
that referenced
this pull request
Oct 14, 2021
Add `unique` wrapper to `AstNode::getParent()`
smowton
pushed a commit
to smowton/codeql
that referenced
this pull request
Oct 28, 2021
Change build to simplify sembuild integration
dbartol
pushed a commit
that referenced
this pull request
Dec 18, 2024
Add models for composite actions and reusable workflows sinks
dbartol
pushed a commit
that referenced
this pull request
Dec 18, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
HtmlSanitizerCall, which models a call to a function whose purpose is to sanitize HTML.CodeInjectionhas been updated to use theHtmlSanitizerCallclass for additional taint steps. Unilke the previous version of this PR, no other queries are affected, since it cost more than expected.I ran
CodeInjectionon default slugs to force evaluation ofHtmlSanitizerCall. The performance results are noisy but after re-running the slowest bunch it looks okay.@max you had some concerns about the name-based matching in the standard library. We could move that part back into
CodeInjectionif you prefer.