mirror of
https://github.com/github/codeql.git
synced 2026-06-16 10:21:09 +02:00
23 lines
852 B
Plaintext
23 lines
852 B
Plaintext
/** Provides a taint-tracking configuration to reason about improper validation of local user-provided array index. */
|
|
|
|
import java
|
|
private import semmle.code.java.security.internal.ArraySizing
|
|
private import semmle.code.java.dataflow.FlowSources
|
|
|
|
/**
|
|
* A taint-tracking configuration to reason about improper validation of local user-provided array index.
|
|
*/
|
|
module ImproperValidationOfArrayIndexLocalConfig implements DataFlow::ConfigSig {
|
|
predicate isSource(DataFlow::Node source) { source instanceof LocalUserInput }
|
|
|
|
predicate isSink(DataFlow::Node sink) {
|
|
any(CheckableArrayAccess caa).canThrowOutOfBounds(sink.asExpr())
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Taint-tracking flow for improper validation of local user-provided array index.
|
|
*/
|
|
module ImproperValidationOfArrayIndexLocalFlow =
|
|
TaintTracking::Global<ImproperValidationOfArrayIndexLocalConfig>;
|