Replies: 1 comment 1 reply
-
👋 @elManto As far as I can tell, what you are seeing is a result of how you defined Once you restrict For example, if you restrict
|
Beta Was this translation helpful? Give feedback.
-
👋 @elManto As far as I can tell, what you are seeing is a result of how you defined Once you restrict For example, if you restrict
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Everyone,
Probably a silly question, but I couldn't find much around. I need to track data flow in Python scripts. The goal is to track the expressions that flow into an open() call. For now I'm using this sample query:
And this sample testcase:
As expected CodeQL returns me one path for each source Expr . However, I would like to keep only the most updated one. For instance, for the function
intermediate_variable()
, the result will report that all the expressions flow into theopen()
API, namely, part1, part2, get_input_from_stdin(), part1 + part2 and the literals . However, I would like to keep only the most updated source, which is filename .Obviously I could solve this by checking the line number but that's no going to fly for slightly more complex scenarios. Another solution I was thinking is to have an other DataFlow tracking to check intra-procedural flows among local expressions but before doing that I'm curious if there's a more "CodeQL"-like way to do this. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions