Skip to content

Commit 7b88988

Browse files
authored
Convert to path-problem query
1 parent 632cb8b commit 7b88988

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

java/ql/src/experimental/CWE-532/SensitiveInfoLog.ql

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @id java/sensitiveinfo-in-logfile
33
* @name Insertion of sensitive information into log files
44
* @description Writing sensitive information to log files can give valuable guidance to an attacker or expose sensitive user information.
5-
* @kind problem
5+
* @kind path-problem
66
* @tags security
77
* external/cwe-532
88
*/
@@ -55,6 +55,7 @@ class LoggerConfiguration extends DataFlow::Configuration {
5555
}
5656
}
5757

58-
from LoggerConfiguration cfg, DataFlow::Node source, DataFlow::Node sink
59-
where cfg.hasFlow(source, sink)
60-
select "Outputting sensitive information in ", sink, "to log file"
58+
from LoggerConfiguration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
59+
where cfg.hasFlowPath(source, sink)
60+
select sink.getNode(), source, sink, "Outputting $@ to log.", source.getNode(),
61+
"sensitive information"

0 commit comments

Comments
 (0)