File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
java/ql/lib/semmle/code/java/dataflow Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,8 @@ deprecated class EnvInput extends DataFlow::Node {
207
207
EnvInput ( ) {
208
208
this instanceof EnvironmentInput or
209
209
this instanceof CliInput or
210
- this instanceof FileInput
210
+ this instanceof FileInput or
211
+ this instanceof StdinInput
211
212
}
212
213
}
213
214
@@ -234,12 +235,21 @@ private class CliInput extends LocalUserInput {
234
235
exists ( Field f | this .asExpr ( ) = f .getAnAccess ( ) |
235
236
f .getAnAnnotation ( ) .getType ( ) .getQualifiedName ( ) = "org.kohsuke.args4j.Argument"
236
237
)
237
- or
238
+ }
239
+
240
+ override string getThreatModel ( ) { result = "commandargs" }
241
+ }
242
+
243
+ /**
244
+ * A node with input from stdin.
245
+ */
246
+ private class StdinInput extends LocalUserInput {
247
+ StdinInput ( ) {
238
248
// Access to `System.in`.
239
249
exists ( Field f | this .asExpr ( ) = f .getAnAccess ( ) | f instanceof SystemIn )
240
250
}
241
251
242
- override string getThreatModel ( ) { result = "commandargs " }
252
+ override string getThreatModel ( ) { result = "stdin " }
243
253
}
244
254
245
255
/**
You can’t perform that action at this time.
0 commit comments