Move ExternallyControlledFormatStringFlow to Query.qll

This commit is contained in:
Ed Minnix
2023-03-29 14:51:27 -04:00
parent 7d9fad5733
commit 9afa051621
2 changed files with 27 additions and 18 deletions

View File

@@ -11,24 +11,7 @@
*/
import java
import semmle.code.java.dataflow.FlowSources
import semmle.code.java.StringFormat
module ExternallyControlledFormatStringConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource }
predicate isSink(DataFlow::Node sink) {
sink.asExpr() = any(StringFormat formatCall).getFormatArgument()
}
predicate isBarrier(DataFlow::Node node) {
node.getType() instanceof NumericType or node.getType() instanceof BooleanType
}
}
module ExternallyControlledFormatStringFlow =
TaintTracking::Global<ExternallyControlledFormatStringConfig>;
import semmle.code.java.security.ExternallyControlledFormatStringQuery
import ExternallyControlledFormatStringFlow::PathGraph
from