Java: Refactor LogInjection

This commit is contained in:
Anders Schack-Mulligen
2023-03-15 10:10:02 +01:00
parent e8a7139020
commit b14b95cd79
3 changed files with 26 additions and 11 deletions

View File

@@ -13,9 +13,9 @@
import java
import semmle.code.java.security.LogInjectionQuery
import DataFlow::PathGraph
import LogInjectionFlow::PathGraph
from LogInjectionConfiguration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
where cfg.hasFlowPath(source, sink)
from LogInjectionFlow::PathNode source, LogInjectionFlow::PathNode sink
where LogInjectionFlow::hasFlowPath(source, sink)
select sink.getNode(), source, sink, "This log entry depends on a $@.", source.getNode(),
"user-provided value"