Skip to content

Commit 75ec8ce

Browse files
committed
Java: apply query alert restrictions
1 parent 3a1e50d commit 75ec8ce

36 files changed

+72
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ module IntentRedirectionConfig implements DataFlow::ConfigSig {
1818
predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
1919
any(IntentRedirectionAdditionalTaintStep c).step(node1, node2)
2020
}
21+
22+
predicate observeDiffInformedIncrementalMode() { any() }
2123
}
2224

2325
/** Tracks the flow of tainted Intents being used to start Android components. */

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ module ExternallyControlledFormatStringConfig implements DataFlow::ConfigSig {
2323
predicate isBarrier(DataFlow::Node node) {
2424
node.getType() instanceof NumericType or node.getType() instanceof BooleanType
2525
}
26+
27+
predicate observeDiffInformedIncrementalMode() { any() }
2628
}
2729

2830
/**

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ module FragmentInjectionTaintConfig implements DataFlow::ConfigSig {
1717
predicate isAdditionalFlowStep(DataFlow::Node n1, DataFlow::Node n2) {
1818
any(FragmentInjectionAdditionalTaintStep c).step(n1, n2)
1919
}
20+
21+
predicate observeDiffInformedIncrementalMode() { any() }
2022
}
2123

2224
/**

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ module GroovyInjectionConfig implements DataFlow::ConfigSig {
1717
predicate isAdditionalFlowStep(DataFlow::Node fromNode, DataFlow::Node toNode) {
1818
any(GroovyInjectionAdditionalTaintStep c).step(fromNode, toNode)
1919
}
20+
21+
predicate observeDiffInformedIncrementalMode() { any() }
2022
}
2123

2224
/**

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ module ImplicitPendingIntentStartConfig implements DataFlow::StateConfigSig {
4848
node.getType().(Array).getElementType() instanceof TypeIntent and
4949
c instanceof DataFlow::ArrayContent
5050
}
51+
52+
predicate observeDiffInformedIncrementalMode() { any() }
5153
}
5254

5355
module ImplicitPendingIntentStartFlow =

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ module BeanValidationConfig implements DataFlow::ConfigSig {
4949
predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource }
5050

5151
predicate isSink(DataFlow::Node sink) { sink instanceof BeanValidationSink }
52+
53+
predicate observeDiffInformedIncrementalMode() { any() }
5254
}
5355

5456
/** Tracks flow from user input to the argument of a method that builds constraint error messages. */

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ module InsecureLdapUrlConfig implements DataFlow::ConfigSig {
2222
succ.asExpr() = ma.getQualifier()
2323
)
2424
}
25+
26+
predicate observeDiffInformedIncrementalMode() { any() }
2527
}
2628

2729
module InsecureLdapUrlFlow = TaintTracking::Global<InsecureLdapUrlConfig>;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ module InsecureRandomnessConfig implements DataFlow::ConfigSig {
9696
n2.asExpr() = c
9797
)
9898
}
99+
100+
predicate observeDiffInformedIncrementalMode() { any() }
99101
}
100102

101103
/**

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ module KeySizeConfig implements DataFlow::StateConfigSig {
1616
predicate isSink(DataFlow::Node sink, KeySizeState state) {
1717
sink.(InsufficientKeySizeSink).hasState(state)
1818
}
19+
20+
predicate observeDiffInformedIncrementalMode() { any() }
1921
}
2022

2123
/** Tracks key sizes used in cryptographic algorithms. */

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ module IntentUriPermissionManipulationConfig implements DataFlow::ConfigSig {
2323
predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
2424
any(IntentUriPermissionManipulationAdditionalTaintStep c).step(node1, node2)
2525
}
26+
27+
predicate observeDiffInformedIncrementalMode() { any() }
2628
}
2729

2830
/**

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ module JexlInjectionConfig implements DataFlow::ConfigSig {
5151
predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
5252
any(JexlInjectionAdditionalTaintStep c).step(node1, node2)
5353
}
54+
55+
predicate observeDiffInformedIncrementalMode() { any() }
5456
}
5557

5658
/**

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ module JndiInjectionFlowConfig implements DataFlow::ConfigSig {
2323
predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
2424
any(JndiInjectionAdditionalTaintStep c).step(node1, node2)
2525
}
26+
27+
predicate observeDiffInformedIncrementalMode() { any() }
2628
}
2729

2830
/** Tracks flow of unvalidated user input that is used in JNDI lookup */

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ module LdapInjectionFlowConfig implements DataFlow::ConfigSig {
1717
predicate isAdditionalFlowStep(DataFlow::Node pred, DataFlow::Node succ) {
1818
any(LdapInjectionAdditionalTaintStep a).step(pred, succ)
1919
}
20+
21+
predicate observeDiffInformedIncrementalMode() { any() }
2022
}
2123

2224
/** Tracks flow from remote sources to LDAP injection vulnerabilities. */

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ module MissingJwtSignatureCheckConfig implements DataFlow::ConfigSig {
1616
predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
1717
any(JwtParserWithInsecureParseAdditionalFlowStep c).step(node1, node2)
1818
}
19+
20+
predicate observeDiffInformedIncrementalMode() { any() }
1921
}
2022

2123
module MissingJwtSignatureCheckFlow = DataFlow::Global<MissingJwtSignatureCheckConfig>;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ module MvelInjectionFlowConfig implements DataFlow::ConfigSig {
1919
predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
2020
any(MvelInjectionAdditionalTaintStep c).step(node1, node2)
2121
}
22+
23+
predicate observeDiffInformedIncrementalMode() { any() }
2224
}
2325

2426
/** Tracks flow of unsafe user input that is used to construct and evaluate a MVEL expression. */

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ module NumericCastFlowConfig implements DataFlow::ConfigSig {
102102
}
103103

104104
predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
105+
106+
predicate observeDiffInformedIncrementalMode() { any() }
105107
}
106108

107109
/**

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ module OgnlInjectionFlowConfig implements DataFlow::ConfigSig {
1818
predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
1919
any(OgnlInjectionAdditionalTaintStep c).step(node1, node2)
2020
}
21+
22+
predicate observeDiffInformedIncrementalMode() { any() }
2123
}
2224

2325
/** Tracks flow of unvalidated user input that is used in OGNL EL evaluation. */

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ module PartialPathTraversalFromRemoteConfig implements DataFlow::ConfigSig {
1717
predicate isSink(DataFlow::Node node) {
1818
any(PartialPathTraversalMethodCall ma).getQualifier() = node.asExpr()
1919
}
20+
21+
predicate observeDiffInformedIncrementalMode() { any() }
2022
}
2123

2224
/** Tracks flow of unsafe user input that is used to validate against path traversal, but is insufficient and remains vulnerable to Partial Path Traversal. */

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ module RequestForgeryConfig implements DataFlow::ConfigSig {
2828
predicate isBarrier(DataFlow::Node node) { node instanceof RequestForgerySanitizer }
2929

3030
predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
31+
32+
predicate observeDiffInformedIncrementalMode() { any() }
3133
}
3234

3335
module RequestForgeryFlow = TaintTracking::Global<RequestForgeryConfig>;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ module ResponseSplittingConfig implements DataFlow::ConfigSig {
3131
)
3232
)
3333
}
34+
35+
predicate observeDiffInformedIncrementalMode() { any() }
3436
}
3537

3638
/**

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ module RsaWithoutOaepConfig implements DataFlow::ConfigSig {
2020
predicate isSink(DataFlow::Node sink) {
2121
exists(CryptoAlgoSpec cr | sink.asExpr() = cr.getAlgoSpec())
2222
}
23+
24+
predicate observeDiffInformedIncrementalMode() { any() }
2325
}
2426

2527
/** Flow for finding RSA ciphers initialized without using OAEP padding. */

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ module SpelInjectionConfig implements DataFlow::ConfigSig {
1818
predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
1919
any(SpelExpressionInjectionAdditionalTaintStep c).step(node1, node2)
2020
}
21+
22+
predicate observeDiffInformedIncrementalMode() { any() }
2123
}
2224

2325
/** Tracks flow of unsafe user input that is used to construct and evaluate a SpEL expression. */

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ module StaticInitializationVectorConfig implements DataFlow::ConfigSig {
126126
predicate isSource(DataFlow::Node source) { source instanceof StaticInitializationVectorSource }
127127

128128
predicate isSink(DataFlow::Node sink) { sink instanceof EncryptionInitializationSink }
129+
130+
predicate observeDiffInformedIncrementalMode() { any() }
129131
}
130132

131133
/** Tracks the flow from a static initialization vector to the initialization of a cipher */

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ module TaintedPathConfig implements DataFlow::ConfigSig {
7272
predicate isAdditionalFlowStep(DataFlow::Node n1, DataFlow::Node n2) {
7373
any(TaintedPathAdditionalTaintStep s).step(n1, n2)
7474
}
75+
76+
predicate observeDiffInformedIncrementalMode() { any() }
7577
}
7678

7779
/** Tracks flow from remote sources to the creation of a path. */

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ module TemplateInjectionFlowConfig implements DataFlow::ConfigSig {
1616
predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
1717
any(TemplateInjectionAdditionalTaintStep a).isAdditionalTaintStep(node1, node2)
1818
}
19+
20+
predicate observeDiffInformedIncrementalMode() { any() }
1921
}
2022

2123
/** Tracks server-side template injection (SST) vulnerabilities */

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ module UnsafeContentResolutionConfig implements DataFlow::ConfigSig {
2020
predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
2121
any(ContentUriResolutionAdditionalTaintStep s).step(node1, node2)
2222
}
23+
24+
predicate observeDiffInformedIncrementalMode() { any() }
2325
}
2426

2527
/** Taint-tracking flow to find paths from remote sources to content URI resolutions. */

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,8 @@ private module UnsafeDeserializationConfig implements DataFlow::ConfigSig {
325325
}
326326

327327
predicate isBarrier(DataFlow::Node node) { isUnsafeDeserializationSanitizer(node) }
328+
329+
predicate observeDiffInformedIncrementalMode() { any() }
328330
}
329331

330332
module UnsafeDeserializationFlow = TaintTracking::Global<UnsafeDeserializationConfig>;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ module UrlForwardFlowConfig implements DataFlow::ConfigSig {
195195
predicate isBarrier(DataFlow::Node node) { node instanceof UrlForwardBarrier }
196196

197197
DataFlow::FlowFeature getAFeature() { result instanceof DataFlow::FeatureHasSourceCallContext }
198+
199+
predicate observeDiffInformedIncrementalMode() { any() }
198200
}
199201

200202
/**

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ module UrlRedirectConfig implements DataFlow::ConfigSig {
1313
predicate isSink(DataFlow::Node sink) { sink instanceof UrlRedirectSink }
1414

1515
predicate isBarrier(DataFlow::Node node) { node instanceof UrlRedirectSanitizer }
16+
17+
predicate observeDiffInformedIncrementalMode() { any() }
1618
}
1719

1820
/**

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ module WebviewDebugEnabledConfig implements DataFlow::ConfigSig {
4444
or
4545
node.getEnclosingCallable().getDeclaringType() instanceof NonSecurityTestClass
4646
}
47+
48+
predicate observeDiffInformedIncrementalMode() { any() }
4749
}
4850

4951
/**

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ module XPathInjectionConfig implements DataFlow::ConfigSig {
1212
predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource }
1313

1414
predicate isSink(DataFlow::Node sink) { sink instanceof XPathInjectionSink }
15+
16+
predicate observeDiffInformedIncrementalMode() { any() }
1517
}
1618

1719
/**

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ module XsltInjectionFlowConfig implements DataFlow::ConfigSig {
2020
predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
2121
any(XsltInjectionAdditionalTaintStep c).step(node1, node2)
2222
}
23+
24+
predicate observeDiffInformedIncrementalMode() { any() }
2325
}
2426

2527
/**

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ module XssConfig implements DataFlow::ConfigSig {
2020
predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
2121
any(XssAdditionalTaintStep s).step(node1, node2)
2222
}
23+
24+
predicate observeDiffInformedIncrementalMode() { any() }
2325
}
2426

2527
/** Tracks flow from remote sources to cross site scripting vulnerabilities. */

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ module XxeConfig implements DataFlow::ConfigSig {
1818
predicate isAdditionalFlowStep(DataFlow::Node n1, DataFlow::Node n2) {
1919
any(XxeAdditionalTaintStep s).step(n1, n2)
2020
}
21+
22+
predicate observeDiffInformedIncrementalMode() { any() }
2123
}
2224

2325
/**

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ module ZipSlipConfig implements DataFlow::ConfigSig {
4343
node instanceof SimpleTypeSanitizer or
4444
node instanceof PathInjectionSanitizer
4545
}
46+
47+
predicate observeDiffInformedIncrementalMode() { any() }
4648
}
4749

4850
/** Tracks flow from archive entries to file creation. */

java/ql/lib/semmle/code/java/security/regexp/RegexInjectionQuery.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ module RegexInjectionConfig implements DataFlow::ConfigSig {
1414
predicate isSink(DataFlow::Node sink) { sink instanceof RegexInjectionSink }
1515

1616
predicate isBarrier(DataFlow::Node node) { node instanceof RegexInjectionSanitizer }
17+
18+
predicate observeDiffInformedIncrementalMode() { any() }
1719
}
1820

1921
/**

0 commit comments

Comments
 (0)