Skip to content

Commit a5834c4

Browse files
committed
Python: Fix py/polynomial-redos
1 parent 76caf43 commit a5834c4

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

python/ql/src/semmle/python/security/dataflow/PolynomialReDoSCustomizations.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ module PolynomialReDoS {
5656
/**
5757
* A regex execution, considered as a flow sink.
5858
*/
59-
class RegexExecutionAsSink extends DataFlow::Node {
59+
class RegexExecutionAsSink extends Sink {
6060
RegExpTerm t;
6161

6262
RegexExecutionAsSink() {
@@ -68,7 +68,7 @@ module PolynomialReDoS {
6868
}
6969

7070
/** Gets the regex that is being executed by this node. */
71-
RegExpTerm getRegExp() { result = t }
71+
override RegExpTerm getRegExp() { result = t }
7272
}
7373

7474
/**
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
edges
2+
| test.py:7:12:7:18 | ControlFlowNode for request | test.py:7:12:7:23 | ControlFlowNode for Attribute |
3+
| test.py:7:12:7:23 | ControlFlowNode for Attribute | test.py:8:30:8:33 | ControlFlowNode for text |
4+
| test.py:7:12:7:23 | ControlFlowNode for Attribute | test.py:9:32:9:35 | ControlFlowNode for text |
25
nodes
6+
| test.py:7:12:7:18 | ControlFlowNode for request | semmle.label | ControlFlowNode for request |
7+
| test.py:7:12:7:23 | ControlFlowNode for Attribute | semmle.label | ControlFlowNode for Attribute |
8+
| test.py:8:30:8:33 | ControlFlowNode for text | semmle.label | ControlFlowNode for text |
9+
| test.py:9:32:9:35 | ControlFlowNode for text | semmle.label | ControlFlowNode for text |
310
#select
11+
| test.py:8:30:8:33 | ControlFlowNode for text | test.py:7:12:7:18 | ControlFlowNode for request | test.py:8:30:8:33 | ControlFlowNode for text | This $@ that depends on $@ may run slow on strings with many repetitions of ' '. | test.py:8:21:8:23 | \\s+ | regular expression | test.py:7:12:7:18 | ControlFlowNode for request | a user-provided value |
12+
| test.py:9:32:9:35 | ControlFlowNode for text | test.py:7:12:7:18 | ControlFlowNode for request | test.py:9:32:9:35 | ControlFlowNode for text | This $@ that depends on $@ may run slow on strings with many repetitions of '99'. | test.py:9:27:9:29 | \\d+ | regular expression | test.py:7:12:7:18 | ControlFlowNode for request | a user-provided value |

0 commit comments

Comments
 (0)