Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 892 Bytes

File metadata and controls

28 lines (18 loc) · 892 Bytes

Path queries

Path queries provide information about the identified paths from sources to sinks. Paths can be examined in the Path Explorer view.

Use this template:

/**
 * ...
 * @kind path-problem
 */

import semmle.code.<language>.dataflow.TaintTracking

...

module Flow = TaintTracking::Global<Configuration>;
import Flow::PathGraph

from Flow::PathNode source, Flow::PathNode sink
where Flow::flowPath(source, sink)
select sink, source, sink, "<message>"

Note

To see the paths between the source and the sinks, we can convert the query to a path problem query. There are a few minor changes that need to be made for this to work–we need an additional import, to specify PathNode rather than Node, and to add the source/sink to the query output (so that we can automatically determine the paths).