mirror of
https://github.com/github/codeql.git
synced 2026-02-02 00:02:57 +01:00
Merge pull request #13163 from geoffw0/cleartextlogging
Swift: Make the cleartext logging query consistent with other cleartext-* queries.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* @problem.severity error
|
||||
* @security-severity 7.5
|
||||
* @precision high
|
||||
* @id swift/clear-text-logging
|
||||
* @id swift/cleartext-logging
|
||||
* @tags security
|
||||
* external/cwe/cwe-312
|
||||
* external/cwe/cwe-359
|
||||
@@ -18,7 +18,9 @@ import codeql.swift.dataflow.DataFlow
|
||||
import codeql.swift.security.CleartextLoggingQuery
|
||||
import CleartextLoggingFlow::PathGraph
|
||||
|
||||
from CleartextLoggingFlow::PathNode src, CleartextLoggingFlow::PathNode sink
|
||||
where CleartextLoggingFlow::flowPath(src, sink)
|
||||
select sink.getNode(), src, sink, "This $@ is written to a log file.", src.getNode(),
|
||||
"potentially sensitive information"
|
||||
from CleartextLoggingFlow::PathNode source, CleartextLoggingFlow::PathNode sink
|
||||
where CleartextLoggingFlow::flowPath(source, sink)
|
||||
select sink.getNode(), source, sink,
|
||||
"This operation writes '" + sink.toString() +
|
||||
"' to a log file. It may contain unencrypted sensitive data from $@.", source,
|
||||
source.getNode().toString()
|
||||
|
||||
Reference in New Issue
Block a user