You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: java/ql/src/Security/CWE/CWE-330/InsecureRandomness.qhelp
+9-10Lines changed: 9 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -16,17 +16,16 @@
16
16
17
17
</overview>
18
18
<recommendation>
19
-
<p>
20
-
Use a cryptographically secure pseudo-random number generator if the output is to be used in a
21
-
security-sensitive context. As a general rule, a value should be considered "security-sensitive"
22
-
if predicting it would allow the attacker to perform an action that they would otherwise be unable
23
-
to perform. For example, if an attacker could predict the random password generated for a new user,
24
-
they would be able to log in as that new user.
25
-
</p>
26
-
27
19
<p>
28
-
For Java, <code>java.util.Random</code> is not cryptographically secure. Use <code>java.security.SecureRandom</code> instead.
20
+
The <code>java.util.Random</code> random number generator is not cryptographically secure. Use a secure random number generator such as <code>java.security.SecureRandom</code> instead.
29
21
</p>
22
+
<p>
23
+
Use a cryptographically secure pseudo-random number generator if the output is to be used in a
24
+
security-sensitive context. As a general rule, a value should be considered "security-sensitive"
25
+
if predicting it would allow the attacker to perform an action that they would otherwise be unable
26
+
to perform. For example, if an attacker could predict the random password generated for a new user,
0 commit comments