Skip to content
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

JS: recognize tagged template literals as DataFlow::CallNode #14405

Merged
merged 7 commits into from
Oct 11, 2023

Conversation

erik-krogh
Copy link
Contributor

@erik-krogh erik-krogh commented Oct 8, 2023

Motivated by two recent external contributions that noticed the lack of call-edges to/from tagged template literals. (First, second).

The implementation is fairly straight forward.

The constant template elements of the tagged template literal are not modeled (the foo and bar in func`foo${exp)bar`;)

There was a performance issue, which was fixed by adding some more cache.
An evaluation shows neutral performance and some new call-edges and sinks (new sinks from recognizing more DOM nodes).

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.

LGTM with a minor nit in the comment

javascript/ql/lib/semmle/javascript/dataflow/DataFlow.qll Outdated Show resolved Hide resolved
Co-authored-by: Asger F <asgerf@github.com>
@erik-krogh erik-krogh merged commit 85bb14f into github:main Oct 11, 2023
13 checks passed
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.

2 participants