Replies: 1 comment 2 replies
-
Your best bet is to implement the I would do this in two steps:
Step 1 looks like this: class SpringControllerMethod extends Method {
SpringControllerMethod() {
this.hasAnnotation("spring.whatever.package", "GetMapping") or // include other annotations
}
} Step 2 looks like this: override predicate isSanitizer(DataFlow::Node nd) {
nd.asExpr().(MethodAccess).getMethod() instanceof SpringControllerMethod
} (Just a warning that I haven't actually tried this out and my CodeQL syntax may be a little bit off.) |
Beta Was this translation helpful? Give feedback.
2 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.
-
Here is my ql. I want to cut off all data flow which not flow through a specific method (such as spring controller method).
For example, here is my result:

This data flow result flow through a spring controller method called
export
which means this is an interesting data flow i need to check.But for other data flow it don't flow through an controller method. I want to cut off there result. So how can i do this?
Beta Was this translation helpful? Give feedback.
All reactions