1
1
/**
2
- * Provides default sources, sinks, and sanitizers for reasoning about bypass of
3
- * sensitive action guards , as well as extension points for adding your own.
2
+ * Provides default sources, sinks, and sanitizers for reasoning about random values that
3
+ * are not cryptographically secure , as well as extension points for adding your own.
4
4
*/
5
5
6
6
private import codeql.ruby.CFG
@@ -9,10 +9,11 @@ private import codeql.ruby.DataFlow
9
9
private import codeql.ruby.security.SensitiveActions
10
10
private import codeql.ruby.Concepts
11
11
private import codeql.ruby.ApiGraphs
12
+ import codeql.ruby.frameworks.core.Kernel
12
13
13
14
/**
14
- * Provides default sources, sinks, and sanitizers for reasoning about bypass of
15
- * sensitive action guards , as well as extension points for adding your own.
15
+ * Provides default sources, sinks, and sanitizers for reasoning about random values that
16
+ * are not cryptographically secure , as well as extension points for adding your own.
16
17
*/
17
18
module InsecureRandomness {
18
19
/**
@@ -42,6 +43,7 @@ module InsecureRandomness {
42
43
this .getReceiver ( ) .asExpr ( ) .getExpr ( ) instanceof SelfVariableAccess and
43
44
super .getMethodName ( ) = "rand"
44
45
)
46
+ or this .( Kernel:: KernelMethodCall ) .getMethodName ( ) = "rand"
45
47
}
46
48
}
47
49
0 commit comments