Skip to content

Commit c1fae91

Browse files
committed
have rb/meta/taint-steps print only one for each file, to limit the size of the output
1 parent 169965c commit c1fae91

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ruby/ql/src/queries/meta/TaintSteps.ql

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ import codeql.ruby.dataflow.internal.TaintTrackingPublic
1414

1515
predicate relevantStep(DataFlow::Node pred, DataFlow::Node succ) { localTaintStep(pred, succ) }
1616

17-
from DataFlow::Node pred, int numOfSuccessors
17+
from File file, int numSteps
1818
where
19-
relevantStep(pred, _) and
20-
numOfSuccessors = count(DataFlow::Node succ | relevantStep(pred, succ))
21-
select pred, "Step to " + numOfSuccessors + " other nodes."
19+
numSteps =
20+
strictcount(DataFlow::Node pred, DataFlow::Node succ |
21+
relevantStep(pred, succ) and pred.getLocation().getFile() = file
22+
)
23+
select file, "File has " + numSteps + " taint steps."

0 commit comments

Comments
 (0)