Skip to content

Commit 2a4d7cb

Browse files
committed
Swift: Make the result message consistent as well.
1 parent 3193b3b commit 2a4d7cb

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

swift/ql/src/queries/Security/CWE-312/CleartextLogging.ql

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ import codeql.swift.dataflow.DataFlow
1818
import codeql.swift.security.CleartextLoggingQuery
1919
import CleartextLoggingFlow::PathGraph
2020

21-
from CleartextLoggingFlow::PathNode src, CleartextLoggingFlow::PathNode sink
22-
where CleartextLoggingFlow::flowPath(src, sink)
23-
select sink.getNode(), src, sink, "This $@ is written to a log file.", src.getNode(),
24-
"potentially sensitive information"
21+
from CleartextLoggingFlow::PathNode source, CleartextLoggingFlow::PathNode sink
22+
where CleartextLoggingFlow::flowPath(source, sink)
23+
select sink, source, sink,
24+
"This operation writes '" + sink.toString() +
25+
"' to a log file. It may contain unencrypted sensitive data from $@.", source,
26+
source.getNode().toString()

0 commit comments

Comments
 (0)