Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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