File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
ruby/ql/lib/codeql/ruby/security Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -64,11 +64,12 @@ module UnsafeCodeConstruction {
64
64
*/
65
65
class StringFormatAsSink extends Sink {
66
66
Concepts:: CodeExecution s ;
67
- Ast:: StringLiteral lit ;
68
67
69
68
StringFormatAsSink ( ) {
70
- any ( DataFlow:: Node n | n .asExpr ( ) .getExpr ( ) = lit ) = getANodeExecutedAsCode ( s ) and
71
- this .asExpr ( ) .getExpr ( ) = lit .getComponent ( _)
69
+ exists ( Ast:: StringLiteral lit |
70
+ any ( DataFlow:: Node n | n .asExpr ( ) .getExpr ( ) = lit ) = getANodeExecutedAsCode ( s ) and
71
+ this .asExpr ( ) .getExpr ( ) = lit .getComponent ( _)
72
+ )
72
73
}
73
74
74
75
override DataFlow:: Node getCodeSink ( ) { result = s }
@@ -84,11 +85,12 @@ module UnsafeCodeConstruction {
84
85
*/
85
86
class TaintedFormatStringAsSink extends Sink {
86
87
Concepts:: CodeExecution s ;
87
- TaintedFormat:: PrintfStyleCall call ;
88
88
89
89
TaintedFormatStringAsSink ( ) {
90
- call = getANodeExecutedAsCode ( s ) and
91
- this = [ call .getFormatArgument ( _) , call .getFormatString ( ) ]
90
+ exists ( TaintedFormat:: PrintfStyleCall call |
91
+ call = getANodeExecutedAsCode ( s ) and
92
+ this = [ call .getFormatArgument ( _) , call .getFormatString ( ) ]
93
+ )
92
94
}
93
95
94
96
override DataFlow:: Node getCodeSink ( ) { result = s }
You can’t perform that action at this time.
0 commit comments