Files
codeql/java/ql/lib/semmle/code/java/security/UnsafeAndroidAccessQuery.qll
Nora Dimitrijević aa5dd7bb4e Java: mass enable diff-informed data flow + none() overrides
An auto-generated patch that enables diff-informed data flow in the obvious cases.

Builds on github#18346 and github/codeql-patch#88
2025-06-17 14:05:36 +02:00

26 lines
966 B
Plaintext

/** Provides taint tracking configurations to be used in Unsafe Resource Fetching queries. */
import java
import semmle.code.java.dataflow.FlowSources
import semmle.code.java.dataflow.TaintTracking
import semmle.code.java.security.RequestForgery
import semmle.code.java.security.UnsafeAndroidAccess
/**
* A taint configuration tracking flow from untrusted inputs to a resource fetching call.
*/
module FetchUntrustedResourceConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource }
predicate isSink(DataFlow::Node sink) { sink instanceof UrlResourceSink }
predicate isBarrier(DataFlow::Node sanitizer) { sanitizer instanceof RequestForgerySanitizer }
predicate observeDiffInformedIncrementalMode() { any() }
}
/**
* Detects taint flow from untrusted inputs to a resource fetching call.
*/
module FetchUntrustedResourceFlow = TaintTracking::Global<FetchUntrustedResourceConfig>;