Skip to content

SONARTEXT-350 Modify rule S7203: Fix typos #4963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions rules/S7203/secrets/rule.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ include::../../../shared_content/secrets/impact/private_key_disclosure.adoc[]

include::../../../shared_content/secrets/impact/supply_chain_attack.adoc[]

If a third party gets access to a keystore containingan Android upload key or app signing key, this person could sign and distribute malicious apps under the same identity as the original app.
If a third party gets access to a keystore containing an Android upload key or app signing key, this person could sign and distribute malicious apps under the same identity as the original app.

== How to fix it

include::../../../shared_content/secrets/fix/store_separatly.adoc[]
include::../../../shared_content/secrets/fix/store_separately.adoc[]

include::../../../shared_content/secrets/fix/revoke.adoc[]

Expand Down Expand Up @@ -45,7 +45,7 @@ keytool -genkey \

==== Compliant solution

Keychain files whould created using a strong password.
Keychain files should be created using a strong password.

[source,shell,diff-id=1,diff-type=compliant]
----
Expand All @@ -58,7 +58,7 @@ echo $STRONG_PWD | keytool -genkey \
-dname "CN=com.example"
----

Files containing cryptographic key should not be commitied with the application codebase and should be distributed separatly.
Files containing cryptographic keys should not be commited with the application codebase and should be distributed separately.

//=== How does this work?

Expand Down
4 changes: 4 additions & 0 deletions shared_content/secrets/fix/store_separately.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**Store cryptographic keys separately**

Store private keys separately from the main codebase, even if they are in a password-protected format.
It will avoid unnecessary exposure and mitigate the risk of private keys being leaked if the password is compromised.
4 changes: 0 additions & 4 deletions shared_content/secrets/fix/store_separatly.adoc

This file was deleted.

8 changes: 4 additions & 4 deletions shared_content/secrets/impact/private_key_disclosure.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ higher-level security mechanisms such as:

* User authentication
* Servers authentication, for example in the X509 trust model
* E-mail encryption
* Email encryption

Disclosing a cryptographic private key to an unintended audience can have severe
security consequences. The exact impact will vary depending on the role of the
Expand All @@ -22,6 +22,6 @@ to impersonate that server. This leads to Man-In-The-Middle-Attacks that would
affect both the confidentiality and integrity of the communications from clients
to that server.

If the key was used as part of e-mail protocols, attackers might be able to send
e-mails on behalf of the key owner or decrypt previously encrypted emails. This
might lead to sensitive information disclosure and reputation loss.
If the key was used as part of email protocols, attackers might be able to send
emails on behalf of the key owner or decrypt previously encrypted emails. This
might lead to sensitive information disclosure and reputation loss.
Loading