mirror of
https://github.com/github/codeql.git
synced 2026-05-01 19:55:15 +02:00
Java: Adjust a few qltests.
This commit is contained in:
@@ -5,5 +5,6 @@ where
|
||||
controlledString(controlled) and
|
||||
method = controlled.getEnclosingCallable() and
|
||||
line = controlled.getLocation().getStartLine() - method.getLocation().getStartLine() and
|
||||
controlled.getCompilationUnit().fromSource()
|
||||
controlled.getCompilationUnit().fromSource() and
|
||||
controlled.getFile().getStem() = ["Test", "Validation"]
|
||||
select method.getName(), line, controlled
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import semmle.code.java.security.ControlledString
|
||||
|
||||
from Expr precedes, Method method
|
||||
where endsInQuote(precedes) and precedes.getEnclosingCallable() = method
|
||||
where
|
||||
endsInQuote(precedes) and
|
||||
precedes.getEnclosingCallable() = method and
|
||||
precedes.getFile().getStem() = "Test"
|
||||
select method.getName(),
|
||||
precedes.getLocation().getStartLine() - method.getLocation().getStartLine(), precedes
|
||||
|
||||
@@ -9,5 +9,8 @@ class Conf extends TaintTracking::Configuration {
|
||||
}
|
||||
|
||||
from Conf conf, Expr tainted, Method method
|
||||
where conf.hasFlowToExpr(tainted) and tainted.getEnclosingCallable() = method
|
||||
where
|
||||
conf.hasFlowToExpr(tainted) and
|
||||
tainted.getEnclosingCallable() = method and
|
||||
tainted.getFile().getStem() = ["Test", "Validation"]
|
||||
select method, tainted.getLocation().getStartLine() - method.getLocation().getStartLine(), tainted
|
||||
|
||||
Reference in New Issue
Block a user