Skip to content

Limit the sources to any user input not sanitized or filetered out #10201

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

You must be logged in to vote

You can override the isSanitizer predicate of a DataFlow/TaintTracking Configuration. This does not directly limit the isSource predicate but instead block any flow paths that go through the sanitizer node. If all paths from a source pass through a sanitizer then the source then this has the effect of "eliminating" the source from any results reported by CodeQL.

A great write-up by someone who was once a newbie too explains their experience learning CodeQL and touch on many of the important concepts in the QL libraries: https://jorgectf.github.io/blog/post/practical-codeql-introduction/#sanitizers

For more information see the docs: https://codeql.github.com/codeql-standard-libraries/java/…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Sim4n6
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