Move insecure randomness query to cwe-338

Also give it a precision
This commit is contained in:
Sauyon Lee
2021-01-28 15:53:03 +00:00
parent 82bd293e5c
commit 73dc135480
14 changed files with 4 additions and 3 deletions

View File

@@ -3,9 +3,10 @@
* @description Using insufficient randomness as the key of a cryptographic algorithm can allow an attacker to compromise security.
* @kind path-problem
* @problem.severity error
* @precision high
* @id go/insecure-randomness
* @tags security
* external/cwe/cwe-327
* external/cwe/cwe-338
*/
import go

View File

@@ -9,7 +9,7 @@ import (
"crypto/sha256"
)
func main() {
func crypto() {
public := []byte("hello")
password := []byte("123456")

View File

@@ -1 +0,0 @@
Security/CWE-327/InsecureRandomness.ql

View File

@@ -0,0 +1 @@
Security/CWE-338/InsecureRandomness.ql