mirror of
https://github.com/hohn/codeql-lab.git
synced 2025-12-16 18:03:08 +01:00
31 lines
703 B
Plaintext
31 lines
703 B
Plaintext
import java
|
|
|
|
// // Find the source
|
|
// class ReadLine extends MethodCall {
|
|
// ReadLine() {
|
|
// exists(MethodCall g |
|
|
// g.getMethod().hasQualifiedName("java.io", "Console", "readLine") and
|
|
// this = g
|
|
// )
|
|
// }
|
|
// }
|
|
// from ReadLine rl
|
|
// select rl
|
|
|
|
private import semmle.code.java.dataflow.FlowSources
|
|
|
|
// Find the source
|
|
class ReadLine extends RemoteFlowSource {
|
|
ReadLine() {
|
|
exists(MethodCall g |
|
|
g.getMethod().hasQualifiedName("java.io", "Console", "readLine") and
|
|
this.asExpr() = g
|
|
)
|
|
}
|
|
override string getSourceType() { result = "readline input parameter" }
|
|
|
|
}
|
|
from ReadLine rl
|
|
select rl
|
|
|