Skip to content

Commit 7bcd749

Browse files
committed
Ruby: patch-generated stubs
1 parent 332b3e8 commit 7bcd749

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

ruby/ql/lib/codeql/ruby/security/WeakSensitiveDataHashingQuery.qll

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ module NormalHashFunction {
2828
predicate isSink(DataFlow::Node sink) { sink instanceof Sink }
2929

3030
predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer }
31-
32-
predicate observeDiffInformedIncrementalMode() { any() }
3331
}
3432

3533
/** Global taint-tracking for detecting "use of a broken or weak cryptographic hashing algorithm on sensitive data" vulnerabilities. */
@@ -56,8 +54,6 @@ module ComputationallyExpensiveHashFunction {
5654
predicate isSink(DataFlow::Node sink) { sink instanceof Sink }
5755

5856
predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer }
59-
60-
predicate observeDiffInformedIncrementalMode() { any() }
6157
}
6258

6359
/** Global taint-tracking for detecting "use of a broken or weak cryptographic hashing algorithm on passwords" vulnerabilities. */

ruby/ql/lib/codeql/ruby/security/regexp/MissingFullAnchorQuery.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ private module MissingFullAnchorConfig implements DataFlow::ConfigSig {
1717
predicate isSink(DataFlow::Node sink) { sink instanceof Sink }
1818

1919
predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer }
20+
21+
predicate observeDiffInformedIncrementalMode() {
22+
any() // TODO: Make sure that the location overrides match the query's select clause: Column 7 selects sink.getCallNode (/Users/d10c/src/semmle-code/ql/ruby/ql/src/queries/security/cwe-020/MissingFullAnchor.ql@20:41:20:62), Column 9 selects sink.getRegex (/Users/d10c/src/semmle-code/ql/ruby/ql/src/queries/security/cwe-020/MissingFullAnchor.ql@20:76:20:94)
23+
}
2024
}
2125

2226
/**

ruby/ql/lib/codeql/ruby/security/regexp/PolynomialReDoSQuery.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ private module PolynomialReDoSConfig implements DataFlow::ConfigSig {
1818
predicate isSink(DataFlow::Node sink) { sink instanceof Sink }
1919

2020
predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer }
21+
22+
predicate observeDiffInformedIncrementalMode() {
23+
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 selects sink.getHighlight (/Users/d10c/src/semmle-code/ql/ruby/ql/src/queries/security/cwe-1333/PolynomialReDoS.ql@27:8:27:30), Column 5 selects sink.getRegExp (/Users/d10c/src/semmle-code/ql/ruby/ql/src/queries/security/cwe-1333/PolynomialReDoS.ql@29:67:29:72)
24+
}
2125
}
2226

2327
/**

ruby/ql/src/queries/security/cwe-732/WeakFilePermissions.ql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,16 @@ private module PermissivePermissionsConfig implements DataFlow::ConfigSig {
5959

6060
predicate observeDiffInformedIncrementalMode() { any() }
6161

62+
Location getASelectedSourceLocation(DataFlow::Node source) {
63+
none() // TODO: Make sure that this source location matches the query's select clause: Column 5 does not select a source or sink originating from the flow call on line 78 (/Users/d10c/src/semmle-code/ql/ruby/ql/src/queries/security/cwe-732/WeakFilePermissions.ql@81:84:81:86)
64+
}
65+
6266
Location getASelectedSinkLocation(DataFlow::Node sink) {
6367
exists(FileSystemPermissionModification mod |
6468
sinkDef(sink, mod) and
6569
result = mod.getLocation()
6670
)
71+
// TODO: Make sure that this sink location matches the query's select clause: Column 5 does not select a source or sink originating from the flow call on line 78 (/Users/d10c/src/semmle-code/ql/ruby/ql/src/queries/security/cwe-732/WeakFilePermissions.ql@81:84:81:86)
6772
}
6873
}
6974

0 commit comments

Comments
 (0)