Skip to content

Commit eb7cd3d

Browse files
committed
Ruby: disable diff-informed mode on regex queries
These queries were failing in `codeql test run --check-diff-informed` because they can select locations inside the regex. Until that can be fixed, diff-informed mode is disabled for these queries.
1 parent e73031c commit eb7cd3d

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,6 @@ 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() { any() }
22-
23-
Location getASelectedSinkLocation(DataFlow::Node sink) {
24-
result = sink.(Sink).getLocation()
25-
or
26-
result = sink.(Sink).getCallNode().getLocation()
27-
or
28-
result = sink.(Sink).getRegex().getLocation()
29-
}
3020
}
3121

3222
/**

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,6 @@ 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() { any() }
23-
24-
Location getASelectedSinkLocation(DataFlow::Node sink) {
25-
result = sink.(Sink).getLocation()
26-
or
27-
result = sink.(Sink).getHighlight().getLocation()
28-
or
29-
result = sink.(Sink).getRegExp().getLocation()
30-
}
3121
}
3222

3323
/**

0 commit comments

Comments
 (0)