mirror of
https://github.com/github/codeql.git
synced 2026-01-29 14:23:03 +01:00
Move insecure randomness query to cwe-338
Also give it a precision
This commit is contained in:
@@ -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
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"crypto/sha256"
|
||||
)
|
||||
|
||||
func main() {
|
||||
func crypto() {
|
||||
public := []byte("hello")
|
||||
|
||||
password := []byte("123456")
|
||||
@@ -1 +0,0 @@
|
||||
Security/CWE-327/InsecureRandomness.ql
|
||||
@@ -0,0 +1 @@
|
||||
Security/CWE-338/InsecureRandomness.ql
|
||||
Reference in New Issue
Block a user