rspec/rules/S4347/highlighting.adoc
github-actions[bot] 9e7f366fa5
Create rule S4347: Secure random number generators must not output predictable values (#3837)
* Add csharp to rule S4347

* Add C# content for BouncyCastle

* Use a better seed source.

* Update highlighting and message

* Change documentation URLs to be specific per language

---------

Co-authored-by: jamie-anderson-sonarsource <jamie-anderson-sonarsource@users.noreply.github.com>
Co-authored-by: Jamie Anderson <jamie.anderson@sonarsource.com>
Co-authored-by: Egon Okerman <egon.okerman@sonarsource.com>
Co-authored-by: Gregory Paidis <115458417+gregory-paidis-sonarsource@users.noreply.github.com>
2024-05-29 17:47:42 +02:00

16 lines
595 B
Plaintext

=== Highlighting
When the random number generator's output **is not** predictable by default:
* 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.
When the random number generator's output **is** predictable by default:
* 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.