mirror of
https://github.com/github/codeql.git
synced 2026-04-23 07:45:17 +02:00
Rename to InsecureRandomness
This commit is contained in:
23
java/ql/src/Security/CWE/CWE-330/InsecureRandomness.ql
Normal file
23
java/ql/src/Security/CWE/CWE-330/InsecureRandomness.ql
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @name Insecure randomness
|
||||
* @description Using a cryptographically Insecure pseudo-random number generator to generate a
|
||||
* security-sensitive value may allow an attacker to predict what value will
|
||||
* be generated.
|
||||
* @kind path-problem
|
||||
* @problem.severity warning
|
||||
* @security-severity 7.8
|
||||
* @precision high
|
||||
* @id java/insecure-randomness
|
||||
* @tags security
|
||||
* external/cwe/cwe-330
|
||||
* external/cwe/cwe-338
|
||||
*/
|
||||
|
||||
import java
|
||||
import semmle.code.java.security.InsecureRandomnessQuery
|
||||
import InsecureRandomnessFlow::PathGraph
|
||||
|
||||
from InsecureRandomnessFlow::PathNode source, InsecureRandomnessFlow::PathNode sink
|
||||
where InsecureRandomnessFlow::flowPath(source, sink)
|
||||
select sink.getNode(), source, sink, "Potential Insecure randomness due to a $@.", source.getNode(),
|
||||
"Insecure randomness source."
|
||||
@@ -1,23 +0,0 @@
|
||||
/**
|
||||
* @name Insecure randomness
|
||||
* @description Using a cryptographically weak pseudo-random number generator to generate a
|
||||
* security-sensitive value may allow an attacker to predict what value will
|
||||
* be generated.
|
||||
* @kind path-problem
|
||||
* @problem.severity warning
|
||||
* @security-severity 7.8
|
||||
* @precision high
|
||||
* @id java/insecure-randomness
|
||||
* @tags security
|
||||
* external/cwe/cwe-330
|
||||
* external/cwe/cwe-338
|
||||
*/
|
||||
|
||||
import java
|
||||
import semmle.code.java.security.WeakRandomnessQuery
|
||||
import WeakRandomnessFlow::PathGraph
|
||||
|
||||
from WeakRandomnessFlow::PathNode source, WeakRandomnessFlow::PathNode sink
|
||||
where WeakRandomnessFlow::flowPath(source, sink)
|
||||
select sink.getNode(), source, sink, "Potential weak randomness due to a $@.", source.getNode(),
|
||||
"weak randomness source."
|
||||
Reference in New Issue
Block a user