Skip to content

Commit 93ba79a

Browse files
committed
Java: apply query alert restrictions
1 parent 0661a90 commit 93ba79a

File tree

56 files changed

+113
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+113
-5
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 filterForSourceOrSinkAlerts() { any() }
2123
}
2224

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

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ module InsecureCryptoConfig implements DataFlow::ConfigSig {
3131
predicate isSink(DataFlow::Node n) { exists(CryptoAlgoSpec c | n.asExpr() = c.getAlgoSpec()) }
3232

3333
predicate isBarrier(DataFlow::Node node) { node instanceof SimpleTypeSanitizer }
34+
35+
predicate filterForSourceOrSinkAlerts() { any() }
3436
}
3537

3638
/**

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ module InputToArgumentToExecFlowConfig implements DataFlow::ConfigSig {
5858
predicate isAdditionalFlowStep(DataFlow::Node n1, DataFlow::Node n2) {
5959
any(CommandInjectionAdditionalTaintStep s).step(n1, n2)
6060
}
61+
62+
predicate filterForSourceOrSinkAlerts() { any() }
6163
}
6264

6365
/**

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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { any() }
99101
}
100102

101103
/**

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ module InsecureTrustManagerConfig implements DataFlow::ConfigSig {
1818
node.getType() instanceof Array and
1919
c instanceof DataFlow::ArrayContent
2020
}
21+
22+
predicate filterForSourceOrSinkAlerts() { any() }
2123
}
2224

2325
module InsecureTrustManagerFlow = DataFlow::Global<InsecureTrustManagerConfig>;

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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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/SqlInjectionQuery.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ module QueryInjectionFlowConfig implements DataFlow::ConfigSig {
2424
predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
2525
any(AdditionalQueryInjectionTaintStep s).step(node1, node2)
2626
}
27+
28+
predicate filterForSourceOrSinkAlerts() { any() }
2729
}
2830

2931
/** Tracks flow of unvalidated user input that is used in SQL queries. */

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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { any() }
7577
}
7678

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

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ module TaintedPermissionsCheckFlowConfig implements DataFlow::ConfigSig {
5959
predicate isSink(DataFlow::Node sink) {
6060
sink.asExpr() = any(PermissionsConstruction p).getInput()
6161
}
62+
63+
predicate filterForSourceOrSinkAlerts() { any() }
6264
}
6365

6466
/** Tracks flow from user input to a permissions check. */

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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { any() }
328330
}
329331

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

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ module TrustAllHostnameVerifierConfig implements DataFlow::ConfigSig {
6565
"|(set)?(accept|trust|ignore|allow)(all|every|any)" +
6666
"|(use|do|enable)insecure|(set|do|use)?no.*(check|validation|verify|verification)|disable).*$")
6767
}
68+
69+
predicate filterForSourceOrSinkAlerts() { any() }
6870
}
6971

7072
/** Data flow to model the flow of a `TrustAllHostnameVerifier` to a `set(Default)HostnameVerifier` call. */

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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { 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 filterForSourceOrSinkAlerts() { any() }
4648
}
4749

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

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ module PolynomialRedosConfig implements DataFlow::ConfigSig {
4747
node instanceof SimpleTypeSanitizer or
4848
node.asExpr().(MethodCall).getMethod() instanceof LengthRestrictedMethod
4949
}
50+
51+
predicate filterForSourceOrSinkAlerts() { any() }
5052
}
5153

5254
module PolynomialRedosFlow = TaintTracking::Global<PolynomialRedosConfig>;

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 filterForSourceOrSinkAlerts() { any() }
1719
}
1820

1921
/**

java/ql/src/Likely Bugs/Arithmetic/InformationLoss.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Variable getVariable(Expr dest) {
3535

3636
from DangerousAssignOpExpr a, Expr e, Top v
3737
where
38+
AlertFiltering::filterByLocatable(a) and
3839
e = a.getSource() and
3940
problematicCasting(a.getDest().getType(), e) and
4041
(

0 commit comments

Comments
 (0)