[Python] Select existing path node (with flow state) in the isAdditionalFlowState predicate #18853
Replies: 3 comments 1 reply
-
|
I have the same question! |
Beta Was this translation helpful? Give feedback.
-
|
You cannot inspect flow to both Note that you cannot expect the out-of-the-box analysis to distinguish |
Beta Was this translation helpful? Give feedback.
-
|
Hi @aschackmull! Thank you for your answer! However, I’m still trying to differentiate between the following two cases: If I add two additional taint flow steps for the If this (propagating taint flow based on multiple nodes' taint flow state in the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to track how many times the
getoperation is performed on the return object. However, my current CodeQL query is unable to correctly distinguish between different numbers of get operations.The functions below demonstrate my expected flow states:
Expected Taint Flows:
test1:SourceKeyFlowState→ObjectFlowState-MoreThanOnetest2:SourceKeyFlowState→ObjectFlowState-OneHowever, my current CodeQL query does not correctly distinguish between these cases and instead selects all possible four flows.
I think the key problem here is that in the
isAdditionalFlowSteppredicate, I cannot select the path node beside thefromNodeandtoNode, and use its flow state information to determine the flow state oftoNode. In my case, the taint propagation step should take into account both the flow state of the key (fromNode) and the flow state of the base object to correctly determine the flow state oftoNode.Could anyone provide suggestions on how to fix this issue? Any insights would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions