Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Is there a way to find possible paths from a source node in JavaScript? #18843

Answered by aibaars
yonajix asked this question in Q&A
Discussion options

Hi, I'm working on a project using CodeQL for finding vulnerabilities in JavaScript. Right now I'm dealing with code with known CVEs and I want to investigate the cause of several of the security queries that find source and sink nodes being unable to establish a path between the two even when one should exist.

I'm not sure if there is a way to find all possible paths emanating from source nodes, or paths that flow into sink nodes. I believe this would help me identify gaps in the queries I'm working with.

Thank you!

You must be logged in to vote

One trick that might work is to make a query that restricts the source to a single one and the sink to be any(). That should help if you know which source was responsible for the CVE and explore all the flow paths starting from there. You can also do the opposite to explore from where data may flow into a single sink node.

Replies: 1 comment 1 reply

Comment options

One trick that might work is to make a query that restricts the source to a single one and the sink to be any(). That should help if you know which source was responsible for the CVE and explore all the flow paths starting from there. You can also do the opposite to explore from where data may flow into a single sink node.

You must be logged in to vote
1 reply
Comment options

Thanks for the response! That did the trick.

Answer selected by yonajix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /