Skip to content

Commit b2a958f

Browse files
authored
Merge pull request github#13163 from geoffw0/cleartextlogging
Swift: Make the cleartext logging query consistent with other cleartext-* queries.
2 parents f964d19 + 86eecea commit b2a958f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @problem.severity error
77
* @security-severity 7.5
88
* @precision high
9-
* @id swift/clear-text-logging
9+
* @id swift/cleartext-logging
1010
* @tags security
1111
* external/cwe/cwe-312
1212
* external/cwe/cwe-359
@@ -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.getNode(), 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)