Skip to content

Commit d05c5e3

Browse files
committed
Java: Deprecate the content of NumericCastTaintedLocalQuery, remove the local query variant and update the non-local query variant.
1 parent 301a6cc commit d05c5e3

File tree

7 files changed

+11
-37
lines changed

7 files changed

+11
-37
lines changed

java/ql/lib/semmle/code/java/security/NumericCastTaintedQuery.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ module NumericCastFlow = TaintTracking::Global<NumericCastFlowConfig>;
113113
* A taint-tracking configuration for reasoning about local user input that is
114114
* used in a numeric cast.
115115
*/
116-
module NumericCastLocalFlowConfig implements DataFlow::ConfigSig {
116+
deprecated module NumericCastLocalFlowConfig implements DataFlow::ConfigSig {
117117
predicate isSource(DataFlow::Node src) { src instanceof LocalUserInput }
118118

119119
predicate isSink(DataFlow::Node sink) {
@@ -134,6 +134,8 @@ module NumericCastLocalFlowConfig implements DataFlow::ConfigSig {
134134
}
135135

136136
/**
137+
* DEPRECATED: Use `NumericCastFlow` instead and configure threat model sources to include `local`.
138+
*
137139
* Taint-tracking flow for local user input that is used in a numeric cast.
138140
*/
139-
module NumericCastLocalFlow = TaintTracking::Global<NumericCastLocalFlowConfig>;
141+
deprecated module NumericCastLocalFlow = TaintTracking::Global<NumericCastLocalFlowConfig>;

java/ql/src/Security/CWE/CWE-681/NumericCastTaintedLocal.qhelp

Lines changed: 0 additions & 5 deletions
This file was deleted.

java/ql/src/Security/CWE/CWE-681/NumericCastTaintedLocal.ql

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
extensions:
2+
- addsTo:
3+
pack: codeql/threat-models
4+
extensible: threatModelConfiguration
5+
data:
6+
- ["local", true, 0]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Security/CWE/CWE-681/NumericCastTainted.ql

java/ql/test/query-tests/security/CWE-681/semmle/tests/NumericCastTaintedLocal.qlref

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)