Match string filter method in isSanitizer #8565
CaledoniaProject
started this conversation in
General
Replies: 2 comments
-
Your best option there is going to be using the Guards library, and specifically the predicate isTrusted(DataFlow::Node node) {
exists(Expr expr, FunctionCall fc |
expr = node.asExpr() and
globalValueNumber(expr) = globalValueNumber(fc.getArgument(0)) and
fc.(GuardCondition).controls(expr, true) and // ensure that `expr` is only run if the test returned 1
fc.getTarget().hasName("is_data_trusted")
)
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
@rdmarsh2 I've attached the source code: test.cpp.txt The query above does not work for me. I also tried quick evaluation and it returns empty result. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a global taint query and I'd like to filter out methods that validates parameter with
is_data_trusted
method:I found a predicate online:
It works but I think the isDataFiltered might included unwanted if statements. So how can I modify the query to:
if (! is_data_trusted(input))
, but notif (is_data_trusted(input))
Beta Was this translation helpful? Give feedback.
All reactions