mirror of
https://github.com/github/codeql.git
synced 2026-04-17 13:04:02 +02:00
Java: Diff-informed PredictableSeed.ql
This commit is contained in:
@@ -37,6 +37,18 @@ private module PredictableSeedFlowConfig implements DataFlow::ConfigSig {
|
||||
predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
|
||||
predictableCalcStep(node1.asExpr(), node2.asExpr())
|
||||
}
|
||||
|
||||
predicate observeDiffInformedIncrementalMode() { any() }
|
||||
|
||||
Location getASelectedSinkLocation(DataFlow::Node sink) {
|
||||
// This predicate matches `PredictableSeed.ql`, which is the only place
|
||||
// where `PredictableSeedFlowConfig` is used.
|
||||
exists(GetRandomData da, VarRead use |
|
||||
result = da.getLocation() and
|
||||
da.getQualifier() = use and
|
||||
isSeeding(sink.asExpr(), use)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private module PredictableSeedFlow = DataFlow::Global<PredictableSeedFlowConfig>;
|
||||
|
||||
Reference in New Issue
Block a user