Skip to content

JS: Fix two missing bits of data flow #8687

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 5 commits into from
Apr 11, 2022

Conversation

asgerf
Copy link
Contributor

@asgerf asgerf commented Apr 7, 2022

Fixes two issues I found while debugging data flow through a codebase.

@asgerf asgerf added JS Awaiting evaluation Do not merge yet, this PR is waiting for an evaluation to finish labels Apr 7, 2022
@asgerf asgerf requested a review from a team as a code owner April 7, 2022 08:03
Comment on lines 423 to 429
t.start() and
exists(DataFlow::ClassNode cls |
cls.getASuperClassNode().getALocalSource() =
DataFlow::globalVarRef(any(string s | s.matches("HTML%Element"))) and
result = cls.getAReceiverNode()
)
or
Copy link
Contributor

Choose a reason for hiding this comment

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

How about using ClassNode::getAnInstanceReference(), and placing it in domValueRef() below?

erik-krogh
erik-krogh previously approved these changes Apr 7, 2022
Copy link
Contributor

@erik-krogh erik-krogh left a comment

Choose a reason for hiding this comment

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

👍 (assuming the evaluation works out).

@asgerf
Copy link
Contributor Author

asgerf commented Apr 11, 2022

Evaluation looks ok

@asgerf asgerf removed the Awaiting evaluation Do not merge yet, this PR is waiting for an evaluation to finish label Apr 11, 2022
@codeql-ci codeql-ci merged commit 9c8dee2 into github:main Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants