Java: Diff-informed PredictableSeed.ql

This commit is contained in:
Jonas Jensen
2024-10-07 15:35:19 +02:00
parent a928a0d2b5
commit 011d667f06

View File

@@ -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>;