Replies: 1 comment 1 reply
-
|
Hi 👋 Constraining sources and sinks inside a data flow/taint tracking config module is indeed crucial for performance. The data flow library works by performing a set of reachability calculations ("which nodes can be reached from a source", "which nodes that can be reached from a source can reach a sink") before computing the actual data flow graph. So the short answer is that using |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to 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.
-
Hi,
I am trying to determine whether a
DataFlow::Node aglobally flows into aDataFlow::Node b. This is typically done by defining a customDataFlow::ConfigSiglike this:The key point here is that the search space is constrained within
isSourceandisSink. This is what I do not want, instead I'd like to constrain the space within the query like so:In theory, both
MyFlowandAnyFlowsolve the same reachability problem over the same space. However, the second approach is prohibitively slow on real-sized applications (tested with CQL 2.22.1).Please, is there a way to check flows only for nodes that are constrained in the
whereclause?To provide more context, I'm writing a tool that identifies items that satisfy a set of (variable) constraints. Some constraints are structural and can be expressed with predicates (e.g.,
constrainSource/Sinkin the example) but others are flow-related and must be handled withDataFlow::Global. I'm trying to define constraint primitives in an .qll library and then use those to generate the final query. I'd like the library to expose (and internally use) a "flowsTo" primitive, so that I can produce something like:I am looking for any working solution (e.g., transitively stepping the data-flow graph) that would allow me to factor out the flow logic into the library. I'm aware of that
localFlowStep*trick, but I need to search globally. All help is greatly appreciated.Beta Was this translation helpful? Give feedback.
All reactions