Files
codeql/java/ql/lib/semmle/code/java/security/FragmentInjectionQuery.qll
Rasmus Wriedt Larsen 381ea93ec3 Merge pull request #17424 from RasmusWL/active-threat-model-source
Go/Java/C#: Rename `ThreatModelFlowSource` to `ActiveThreatModelSource`
2024-09-26 13:08:17 +02:00

29 lines
1021 B
Plaintext

/** Provides classes and predicates to be used in queries related to Android Fragment injection. */
import java
import semmle.code.java.dataflow.FlowSources
import semmle.code.java.dataflow.TaintTracking
import semmle.code.java.security.FragmentInjection
/**
* A taint-tracking configuration for unsafe user input
* that is used to create Android fragments dynamically.
*/
module FragmentInjectionTaintConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource }
predicate isSink(DataFlow::Node sink) { sink instanceof FragmentInjectionSink }
predicate isAdditionalFlowStep(DataFlow::Node n1, DataFlow::Node n2) {
any(FragmentInjectionAdditionalTaintStep c).step(n1, n2)
}
predicate observeDiffInformedIncrementalMode() { any() }
}
/**
* Taint-tracking flow for unsafe user input
* that is used to create Android fragments dynamically.
*/
module FragmentInjectionTaintFlow = TaintTracking::Global<FragmentInjectionTaintConfig>;