Skip to content

Help with the query to find source and sink #852

Closed Answered by smowton
akanksha1131 asked this question in Q&A
Discussion options

You must be logged in to vote

There is no TaintTracking::Source or ::Sink. It looks like you want to create a path query, like https://codeql.github.com/docs/writing-codeql-queries/creating-path-queries/ ? To do this you would typically describe a Source that extends DataFlow::Node and identify relevant nodes, quite similar to what you're already doing, and then use Flow::flowPath as noted in the linked article to establish whether the source and sink are connected.

There is also no CodeQL class RequestMapping -- perhaps you want to look for methods that are annotated with Spring's @RequestParam annotation?

The other significant problem is that your definitions of Source and Sink use this = any() and (which says that t…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@akanksha1131
Comment options

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