File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
java/ql/src/experimental/Security/CWE/CWE-730 Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ import semmle.code.java.dataflow.FlowSources
17
17
import semmle.code.java.dataflow.TaintTracking
18
18
import DataFlow:: PathGraph
19
19
20
+ /**
21
+ * A data flow sink for untrusted user input used to construct regular expressions.
22
+ */
20
23
class RegexSink extends DataFlow:: ExprNode {
21
24
RegexSink ( ) {
22
25
exists ( MethodAccess ma , Method m | m = ma .getMethod ( ) |
@@ -61,6 +64,10 @@ class RegexSink extends DataFlow::ExprNode {
61
64
62
65
abstract class Sanitizer extends DataFlow:: ExprNode { }
63
66
67
+ /**
68
+ * A call to a function whose name suggests that it escapes regular
69
+ * expression meta-characters.
70
+ */
64
71
class RegExpSanitizationCall extends Sanitizer {
65
72
RegExpSanitizationCall ( ) {
66
73
exists ( string calleeName , string sanitize , string regexp |
@@ -75,6 +82,9 @@ class RegExpSanitizationCall extends Sanitizer {
75
82
}
76
83
}
77
84
85
+ /**
86
+ * A taint-tracking configuration for untrusted user input used to construct regular expressions.
87
+ */
78
88
class RegexInjectionConfiguration extends TaintTracking:: Configuration {
79
89
RegexInjectionConfiguration ( ) { this = "RegexInjectionConfiguration" }
80
90
You can’t perform that action at this time.
0 commit comments