Is there a CodeQL query that finds ALL sources and sinks with their function bodies and Flow? #850
-
Hi, I'm looking for a CodeQL query that provides results in this format: Source: function A (function A body) -> function B (function B body) -> .... -> Sink: function Z (function Z body) I've researched various queries, including dataflow queries, but they mostly return data flow analysis and do not detail each source and sink function with their function bodies. Could anyone please let me know if such a query exists and how to run it? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Hi @akanksha1131, Thanks for your question. I’m not exactly sure what you’re after. Do you want to be the output of your
or do you want to define your own paths, similar to dataflow paths? |
Beta Was this translation helpful? Give feedback.
-
Hi @jketema thanks for the insight!
|
Beta Was this translation helpful? Give feedback.
That's called a path, not the output of a select. Roughly, if you want to create something like this yourself, you'll need to write a query that has the following structure:
Dataflow queries have such a structure, but the
edges
andnodes
query predicates are imported under the hood in that case, so you don't have to implement them. There s…