Closed KylerKatz closed 2 months ago
Is there a way to force it to get the full path? I believe it is part of an optimization step, however, I would like to always force it to get the full paths, especially in real scenarios where it can be many nodes deep.
Yes. If you look into the full configuration options (e.g. by jump-to-def on the ConfigSig
in SensitiveInfoInErrorMsgConfig implements DataFlow::ConfigSig
) then you'll see the following predicate:
/**
* Holds if `node` should never be skipped over in the `PathGraph` and in path
* explanations.
*/
default predicate neverSkip(Node node) {
isAdditionalFlowStep(node, _) or isAdditionalFlowStep(_, node)
}
So if you add
predicate neverSkip(Node node) { any() }
to your configuration then you'll force it to completely skip path compression.
Thank you very much.
Hello, I am trying to see if using CodeQL for backward slicing is feasible.
Currently, I am just trying a simple test like so
With this query
I would expect to end up with results like
a -> b -> c -> d a -> b -> c a -> b
b -> c - > d b -> c
c -> d
However, I am getting some compressed results
For example, I want, a ->b -> c -> d for d's full backward slice. However, I get these two instead a -> b -> d (Skipping c) a -> c -> d (Skipping b)
Is there a way to force it to get the full path? I believe it is part of an optimization step, however, I would like to always force it to get the full paths, especially in real scenarios where it can be many nodes deep.
Thank you for any help.