mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
make rb/meta/taint-steps into a @kind problem query
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
/**
|
||||
* @name Taint steps
|
||||
* @description The number of default taint steps.
|
||||
* @kind metric
|
||||
* @metricType project
|
||||
* @metricAggregate sum
|
||||
* @tags meta
|
||||
* @description All taint steps.
|
||||
* @kind problem
|
||||
* @problem.severity recommendation
|
||||
* @id rb/meta/taint-steps
|
||||
* @tags meta
|
||||
* @precision very-low
|
||||
*/
|
||||
|
||||
import ruby
|
||||
@@ -14,4 +14,8 @@ import codeql.ruby.dataflow.internal.TaintTrackingPublic
|
||||
|
||||
predicate relevantStep(DataFlow::Node pred, DataFlow::Node succ) { localTaintStep(pred, succ) }
|
||||
|
||||
select projectRoot(), count(DataFlow::Node pred, DataFlow::Node succ | relevantStep(pred, succ))
|
||||
from DataFlow::Node pred, int numOfSuccessors
|
||||
where
|
||||
relevantStep(pred, _) and
|
||||
numOfSuccessors = count(DataFlow::Node succ | relevantStep(pred, succ))
|
||||
select pred, "Step to " + numOfSuccessors + " other nodes."
|
||||
|
||||
Reference in New Issue
Block a user