Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update highlighting and message
Browse files Browse the repository at this point in the history
jamie-anderson-sonarsource committed May 17, 2024
1 parent 2443550 commit 6f6cab3
Showing 2 changed files with 18 additions and 2 deletions.
13 changes: 12 additions & 1 deletion rules/S4347/highlighting.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
=== Highlighting

The call to SecureRandom.setSeed() or the SecureRandom(byte[]) constructor call
If the RNG is predictable because a seed has been set:

* The most recent function call that sets a seed. For example:
- The factory method that returns the RNG, where the seed is passed as a parameter.
- The RNG constructor, where the seed is a parameter.
- The function call on the RNG that sets the seed.
If the RNG is predictable unless a suitable seed has been set:

* The function call on the RNG that returns a random value.
If the factory method or constructor is not already highlighted, it should become
a secondary highlight.
7 changes: 6 additions & 1 deletion rules/S4347/message.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
=== Message

Change this seed value to something unpredictable, or remove the seed.
If the RNG is predictable because a seed has been set:

> Change this seed value to something unpredictable, or remove the seed.

If the RNG is predictable unless a suitable seed has been set:

> Set an unpredictable seed before generating random values.

0 comments on commit 6f6cab3

Please sign in to comment.