Files
codeql/java/ql/test/query-tests/security/CWE-089/semmle/examples/sbQuery.ql
Chris Smowton 45c732a6f9 Java: improve naming and description of SqlUnescaped.ql
Since the main thing it's objecting to is concatenation not lack of escaping (in particular it doesn't look for escaping sanitizers), rename and re-describe it accordingly.
2023-01-09 10:56:13 +00:00

10 lines
441 B
Plaintext

import semmle.code.java.security.SqlConcatenatedLib
from StringBuilderVar sbv, Expr uncontrolled, Method method, int methodLine
where
uncontrolledStringBuilderQuery(sbv, uncontrolled) and
method = uncontrolled.getEnclosingCallable() and
methodLine = method.getLocation().getStartLine()
select method.getName(), sbv.getLocation().getStartLine() - methodLine, sbv,
uncontrolled.getLocation().getStartLine() - methodLine, uncontrolled