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 {
207207 EnvInput ( ) {
208208 this instanceof EnvironmentInput or
209209 this instanceof CliInput or
210- this instanceof FileInput
210+ this instanceof FileInput or
211+ this instanceof StdinInput
211212 }
212213}
213214
@@ -234,12 +235,21 @@ private class CliInput extends LocalUserInput {
234235 exists ( Field f | this .asExpr ( ) = f .getAnAccess ( ) |
235236 f .getAnAnnotation ( ) .getType ( ) .getQualifiedName ( ) = "org.kohsuke.args4j.Argument"
236237 )
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 ( ) {
238248 // Access to `System.in`.
239249 exists ( Field f | this .asExpr ( ) = f .getAnAccess ( ) | f instanceof SystemIn )
240250 }
241251
242- override string getThreatModel ( ) { result = "commandargs " }
252+ override string getThreatModel ( ) { result = "stdin " }
243253}
244254
245255/**
You can’t perform that action at this time.
0 commit comments