Skip to content

Commit 6e70e6c

Browse files
committed
Use pre-exisiting type for SecureRandom
1 parent 4678302 commit 6e70e6c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

java/ql/lib/semmle/code/java/security/WeakRandomnessQuery.qll

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ private class RandomMethodSource extends WeakRandomnessSource {
3030
*/
3131
abstract private class SafeRandomImplementation extends RefType { }
3232

33-
private class TypeSecureRandom extends SafeRandomImplementation {
34-
TypeSecureRandom() { this.hasQualifiedName("java.security", "SecureRandom") }
35-
}
33+
private class TypeSecureRandom extends SafeRandomImplementation instanceof SecureRandomNumberGenerator
34+
{ }
3635

3736
private class TypeHadoopOsSecureRandom extends SafeRandomImplementation {
3837
TypeHadoopOsSecureRandom() {

0 commit comments

Comments
 (0)