Skip to content

JS: filter away reads of .src that end in a URL sink for js/xss-through-dom #8509

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

Merged
merged 2 commits into from
Mar 22, 2022

Conversation

erik-krogh
Copy link
Contributor

@erik-krogh erik-krogh commented Mar 21, 2022

Followup to #8304, this is a first try to reduce the FP amount for js/xss-through-dom.

The evaluation removes a bunch of pretty benign var s = x.src ... y.src = s flows as expected, and shows no real performance difference.

@github-actions github-actions bot added the JS label Mar 21, 2022
@erik-krogh erik-krogh added the no-change-note-required This PR does not need a change note label Mar 21, 2022
@erik-krogh erik-krogh marked this pull request as ready for review March 21, 2022 21:17
@erik-krogh erik-krogh requested a review from a team as a code owner March 21, 2022 21:17
Copy link
Contributor

@asgerf asgerf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment, otherwise LGTM

}

/* Gets a jQuery method where the receiver looks like a $("<p>" + ... ), which is benign for this query. */
private JQuery::MethodCall benignJQueryMethod() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backticks around the $("<p>" + ...) code snippet.

@erik-krogh erik-krogh merged commit 8ae04e0 into github:main Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JS no-change-note-required This PR does not need a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants