Skip to content

Commit fdb3b65

Browse files
atorralbasubatoi
andauthored
Apply suggestions from code review
Co-authored-by: Ben Ahmady <[email protected]>
1 parent 8e0a018 commit fdb3b65

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

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

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,33 @@
55

66
<overview>
77
<p>
8-
Sensitive information that is logged unencrypted is accessible to an attacker
9-
who gains access to the logs.
8+
Attackers could gain access to sensitive information that is logged unencrypted.
109
</p>
1110
</overview>
1211

1312
<recommendation>
1413
<p>
15-
Ensure that sensitive information is always encrypted or obfuscated before being
16-
logged.
14+
Always make sure to encrypt or obfuscate sensitive information before you log it.
1715
</p>
1816

1917
<p>
20-
In general, decrypt sensitive information only at the point where it is
21-
necessary for it to be used in cleartext.
18+
Generally, you should decrypt sensitive information only at the point where it is necessary for it to be used in cleartext.
2219
</p>
2320

2421
<p>
25-
Be aware that external processes often store the standard out and
26-
standard error streams of the application, causing logged sensitive
27-
information to be stored.
22+
Be aware that external processes often store the standard output and
23+
standard error streams of the application. This will include logged sensitive information.
2824
</p>
2925
</recommendation>
3026

3127
<example>
3228
<p>
3329
The following example code logs user credentials (in this case, their password)
34-
in plain text:
30+
in plaintext:
3531
</p>
3632
<sample src="CleartextLoggingBad.swift"/>
3733
<p>
38-
Instead, the credentials should be encrypted, obfuscated, or omitted entirely:
34+
Instead, you should encrypt or obfuscate the credentials, or omit them entirely:
3935
</p>
4036
<sample src="CleartextLoggingGood.swift"/>
4137
</example>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @name Clear-text logging of sensitive information
3-
* @description Logging sensitive information without encryption or hashing can
3+
* @description Logging sensitive information in plaintext can
44
* expose it to an attacker.
55
* @kind path-problem
66
* @problem.severity error

0 commit comments

Comments
 (0)