- Notifications
You must be signed in to change notification settings - Fork1.9k
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Hi all, I've written a path-problem query for python to track certain data flows I'm interested at that have the input parameters (sys.argv, argparse, etc.) as sources and certain APIs as sinks. Without getting into the details of what's the source and what's the sink (I can share, but probably not needed), the body of the query looks like: module MyFlow= TaintTracking::Global<MyTaintAnalysis>;import MyFlow::PathGraphfrom MyFlow::PathNodesource, MyFlow::PathNodesinkwhere MyFlow::flowPath(source,sink)selectsink.getNode(),source,sink,"Input arg flowing from "+source.getNode()+" into sink API" For each node in the PathGraph I would like to obtain the parent expression, if any. For instance, let's consider the following example: 1x=sys.argv[1]2print("no data flow")3y=x+"A"4print(y) If I look into the Sarif generated with the query above I'll get the line of each node and the |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 1 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.
-
Could you elaborate on what you want to do with that information? My main point here is whether you intend that for human consumption or to do some further QL or script processing down the line. If it's just for human consumption when analysing the SARIF result, you could try running your |
BetaWas this translation helpful?Give feedback.