mirror of
https://github.com/github/codeql.git
synced 2025-12-21 11:16:30 +01:00
Java: Report log-injection at the source rather than the sink
This should remove the problem of excessive grouping of different alerts that share a sink location, often due to wrapper functions that form the ultimate sink of all logging calls in a given codebase.
This commit is contained in:
@@ -17,5 +17,5 @@ import DataFlow::PathGraph
|
||||
|
||||
from LogInjectionConfiguration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
|
||||
where cfg.hasFlowPath(source, sink)
|
||||
select sink.getNode(), source, sink, "This $@ flows to a log entry.", source.getNode(),
|
||||
"user-provided value"
|
||||
select source.getNode(), source, sink, "This user-provided value flows to a $@.", sink.getNode(),
|
||||
"log entry"
|
||||
|
||||
Reference in New Issue
Block a user