A random generator is seeded with the current time, which anyone can guess
What it finds
A seed from time() takes one of a few values per second; anyone who knows roughly when the program started can reproduce its random numbers. std::random_device gives an unpredictable seed.
From the rule's source, random_seeded_with_time.rs.
Turn it on, off or suppress it
The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/cpp:random-seeded-with-time" = "warning"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
// tx0: ignore[tx0/cpp:random-seeded-with-time] reason="..."tx0 explain tx0/cpp:random-seeded-with-time shows the same in the terminal. Found a false positive? Report it.