Skip to content

Commit 6c32f26

Browse files
committed
Java: patch-generated stubs
1 parent 7d6beb3 commit 6c32f26

23 files changed

+171
-3
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ module SensitiveCommunicationConfig implements DataFlow::ConfigSig {
149149
predicate allowImplicitRead(DataFlow::Node node, DataFlow::ContentSet c) {
150150
isSink(node) and exists(c)
151151
}
152+
153+
predicate observeDiffInformedIncrementalMode() { any() }
152154
}
153155

154156
/**

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@ module ArithmeticOverflowConfig implements DataFlow::ConfigSig {
1313
predicate isBarrier(DataFlow::Node n) { overflowBarrier(n) }
1414

1515
predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
16+
17+
predicate observeDiffInformedIncrementalMode() {
18+
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 28 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@35:8:35:10), Column 5 does not select a source or sink originating from the flow call on line 28 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@37:3:37:18)
19+
}
20+
21+
Location getASelectedSourceLocation(DataFlow::Node source) {
22+
none() // TODO: Make sure that this source location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 28 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@35:8:35:10), Column 5 does not select a source or sink originating from the flow call on line 28 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@37:3:37:18)
23+
}
24+
25+
Location getASelectedSinkLocation(DataFlow::Node sink) {
26+
none() // TODO: Make sure that this sink location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 28 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@35:8:35:10), Column 5 does not select a source or sink originating from the flow call on line 28 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@37:3:37:18)
27+
}
1628
}
1729

1830
/**
@@ -29,6 +41,18 @@ module ArithmeticUnderflowConfig implements DataFlow::ConfigSig {
2941
predicate isBarrier(DataFlow::Node n) { underflowBarrier(n) }
3042

3143
predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
44+
45+
predicate observeDiffInformedIncrementalMode() {
46+
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 32 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@35:8:35:10), Column 5 does not select a source or sink originating from the flow call on line 32 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@37:3:37:18)
47+
}
48+
49+
Location getASelectedSourceLocation(DataFlow::Node source) {
50+
none() // TODO: Make sure that this source location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 32 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@35:8:35:10), Column 5 does not select a source or sink originating from the flow call on line 32 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@37:3:37:18)
51+
}
52+
53+
Location getASelectedSinkLocation(DataFlow::Node sink) {
54+
none() // TODO: Make sure that this sink location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 32 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@35:8:35:10), Column 5 does not select a source or sink originating from the flow call on line 32 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql@37:3:37:18)
55+
}
3256
}
3357

3458
/**

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@ module ArithmeticUncontrolledOverflowConfig implements DataFlow::ConfigSig {
1919
predicate isSink(DataFlow::Node sink) { overflowSink(_, sink.asExpr()) }
2020

2121
predicate isBarrier(DataFlow::Node n) { overflowBarrier(n) }
22+
23+
predicate observeDiffInformedIncrementalMode() {
24+
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 29 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql@36:8:36:10), Column 5 does not select a source or sink originating from the flow call on line 29 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql@38:3:38:18)
25+
}
26+
27+
Location getASelectedSourceLocation(DataFlow::Node source) {
28+
none() // TODO: Make sure that this source location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 29 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql@36:8:36:10), Column 5 does not select a source or sink originating from the flow call on line 29 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql@38:3:38:18)
29+
}
30+
31+
Location getASelectedSinkLocation(DataFlow::Node sink) {
32+
none() // TODO: Make sure that this sink location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 29 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql@36:8:36:10), Column 5 does not select a source or sink originating from the flow call on line 29 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql@38:3:38:18)
33+
}
2234
}
2335

2436
/** Taint-tracking flow to reason about overflow from arithmetic with uncontrolled values. */
@@ -32,6 +44,18 @@ module ArithmeticUncontrolledUnderflowConfig implements DataFlow::ConfigSig {
3244
predicate isSink(DataFlow::Node sink) { underflowSink(_, sink.asExpr()) }
3345

3446
predicate isBarrier(DataFlow::Node n) { underflowBarrier(n) }
47+
48+
predicate observeDiffInformedIncrementalMode() {
49+
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 33 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql@36:8:36:10), Column 5 does not select a source or sink originating from the flow call on line 33 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql@38:3:38:18)
50+
}
51+
52+
Location getASelectedSourceLocation(DataFlow::Node source) {
53+
none() // TODO: Make sure that this source location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 33 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql@36:8:36:10), Column 5 does not select a source or sink originating from the flow call on line 33 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql@38:3:38:18)
54+
}
55+
56+
Location getASelectedSinkLocation(DataFlow::Node sink) {
57+
none() // TODO: Make sure that this sink location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 33 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql@36:8:36:10), Column 5 does not select a source or sink originating from the flow call on line 33 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql@38:3:38:18)
58+
}
3559
}
3660

3761
/** Taint-tracking flow to reason about underflow from arithmetic with uncontrolled values. */

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ module ConditionalBypassFlowConfig implements DataFlow::ConfigSig {
4747
predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
4848
endsWithStep(node1, node2)
4949
}
50+
51+
predicate observeDiffInformedIncrementalMode() {
52+
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 25 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-807/ConditionalBypass.ql@26:8:26:8)
53+
}
5054
}
5155

5256
/**

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ module UntrustedDataToExternalApiConfig implements DataFlow::ConfigSig {
101101
predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource }
102102

103103
predicate isSink(DataFlow::Node sink) { sink instanceof ExternalApiDataNode }
104+
105+
predicate observeDiffInformedIncrementalMode() {
106+
any() // TODO: Make sure that the location overrides match the query's select clause: Flow call outside 'select' clause (/Users/d10c/src/semmle-code/ql/java/ql/lib/semmle/code/java/security/ExternalAPIs.qll@113:36:113:79), Flow call outside 'select' clause (/Users/d10c/src/semmle-code/ql/java/ql/lib/semmle/code/java/security/ExternalAPIs.qll@116:43:116:92)
107+
}
104108
}
105109

106110
/**

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ module ExternallyControlledFormatStringConfig implements DataFlow::ConfigSig {
2424
node.getType() instanceof NumericType or node.getType() instanceof BooleanType
2525
}
2626

27-
predicate observeDiffInformedIncrementalMode() { any() }
27+
predicate observeDiffInformedIncrementalMode() {
28+
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 22 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-134/ExternallyControlledFormatString.ql@24:8:24:37)
29+
}
2830
}
2931

3032
/**

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ module BoundedFlowSourceConfig implements DataFlow::ConfigSig {
1717
predicate isSink(DataFlow::Node sink) {
1818
any(CheckableArrayAccess caa).canThrowOutOfBoundsDueToEmptyArray(sink.asExpr(), _)
1919
}
20+
21+
predicate observeDiffInformedIncrementalMode() {
22+
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 27 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstructionCodeSpecified.ql@28:8:28:33), Column 5 does not select a source or sink originating from the flow call on line 27 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstructionCodeSpecified.ql@29:85:29:97)
23+
}
2024
}
2125

2226
/**

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ module ImproperValidationOfArrayConstructionConfig implements DataFlow::ConfigSi
1414
predicate isSink(DataFlow::Node sink) {
1515
any(CheckableArrayAccess caa).canThrowOutOfBoundsDueToEmptyArray(sink.asExpr(), _)
1616
}
17+
18+
predicate observeDiffInformedIncrementalMode() {
19+
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 25 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstruction.ql@26:8:26:33), Column 5 does not select a source or sink originating from the flow call on line 25 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstruction.ql@27:87:27:99)
20+
}
1721
}
1822

1923
/**

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ module BoundedFlowSourceConfig implements DataFlow::ConfigSig {
1414
predicate isSink(DataFlow::Node sink) {
1515
exists(CheckableArrayAccess arrayAccess | arrayAccess.canThrowOutOfBounds(sink.asExpr()))
1616
}
17+
18+
predicate observeDiffInformedIncrementalMode() {
19+
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 26 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayIndexCodeSpecified.ql@48:8:48:33)
20+
}
1721
}
1822

1923
/**

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ module ImproperValidationOfArrayIndexConfig implements DataFlow::ConfigSig {
1818
predicate isBarrier(DataFlow::Node node) { node.getType() instanceof BooleanType }
1919

2020
predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
21+
22+
predicate observeDiffInformedIncrementalMode() {
23+
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 23 (/Users/d10c/src/semmle-code/ql/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayIndex.ql@24:8:24:33)
24+
}
2125
}
2226

2327
/**

0 commit comments

Comments
 (0)