Skip to content

Commit 41c3d1b

Browse files
committed
Swift: Mention key management in the .qhelp + add a reference about key management.
1 parent d66e407 commit 41c3d1b

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

swift/ql/src/queries/Security/CWE-311/CleartextStorageDatabase.qhelp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</recommendation>
1313
<example>
1414

15-
<p>The following example shows three cases of storing information using the Core Data library. In the 'BAD' case, the data that is stored is sensitive (a credit card number) and is not encrypted. In the 'GOOD' cases, the data is either not sensitive, or is protected with encryption.</p>
15+
<p>The following example shows three cases of storing information using the Core Data library. In the 'BAD' case, the data that is stored is sensitive (a credit card number) and is not encrypted. In the 'GOOD' cases, the data is either not sensitive, or is protected with encryption. When encryption is used, care must be taken to select a secure modern encryption algorithm and put suitable key management practices into place.</p>
1616

1717
<sample src="CleartextStorageDatabase.swift" />
1818

@@ -23,6 +23,10 @@
2323
OWASP Top 10:2021:
2424
<a href="https://owasp.org/Top10/A02_2021-Cryptographic_Failures/">A02:2021 � Cryptographic Failures</a>.
2525
</li>
26+
<li>
27+
OWASP:
28+
<a href="https://cheatsheetseries.owasp.org/cheatsheets/Key_Management_Cheat_Sheet.html">Key Management Cheat Sheet</a>.
29+
</li>
2630

2731
</references>
2832
</qhelp>

swift/ql/src/queries/Security/CWE-311/CleartextTransmission.qhelp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</recommendation>
1313
<example>
1414

15-
<p>The following example shows three cases of transmitting information. In the 'BAD' case, the data transmitted is sensitive (a credit card number) and is not encrypted. In the 'GOOD' cases, the data is either not sensitive, or is protected with encryption.</p>
15+
<p>The following example shows three cases of transmitting information. In the 'BAD' case, the data transmitted is sensitive (a credit card number) and is not encrypted. In the 'GOOD' cases, the data is either not sensitive, or is protected with encryption. When encryption is used, care must be taken to select a secure modern encryption algorithm and put suitable key management practices into place.</p>
1616

1717
<sample src="CleartextTransmission.swift" />
1818

@@ -23,6 +23,10 @@
2323
OWASP Top 10:2021:
2424
<a href="https://owasp.org/Top10/A02_2021-Cryptographic_Failures/">A02:2021 � Cryptographic Failures</a>.
2525
</li>
26+
<li>
27+
OWASP:
28+
<a href="https://cheatsheetseries.owasp.org/cheatsheets/Key_Management_Cheat_Sheet.html">Key Management Cheat Sheet</a>.
29+
</li>
2630

2731
</references>
2832
</qhelp>

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</recommendation>
1313
<example>
1414

15-
<p>The following example shows three cases of storing information using UserDefaults. In the 'BAD' case, the data that is stored is sensitive (a credit card number) and is not encrypted. In the 'GOOD' cases, the data is either not sensitive, or is protected with encryption.</p>
15+
<p>The following example shows three cases of storing information using UserDefaults. In the 'BAD' case, the data that is stored is sensitive (a credit card number) and is not encrypted. In the 'GOOD' cases, the data is either not sensitive, or is protected with encryption. When encryption is used, care must be taken to select a secure modern encryption algorithm and put suitable key management practices into place.</p>
1616

1717
<sample src="CleartextStoragePreferences.swift" />
1818

@@ -26,6 +26,10 @@
2626
<li>
2727
Apple Developer Documentation: <a href="https://developer.apple.com/documentation/foundation/userdefaults">UserDefaults</a>, <a href="https://developer.apple.com/documentation/foundation/nsubiquitouskeyvaluestore">NSUbiquitousKeyValueStore</a>
2828
</li>
29+
<li>
30+
OWASP:
31+
<a href="https://cheatsheetseries.owasp.org/cheatsheets/Key_Management_Cheat_Sheet.html">Key Management Cheat Sheet</a>.
32+
</li>
2933

3034
</references>
3135
</qhelp>

0 commit comments

Comments
 (0)