Skip to content

Commit

Permalink
Updated G401 corresponding CWE
Browse files Browse the repository at this point in the history
The corresponding CWE from G401 rule was changed from CWE-326 -> CWE-328.
In my opinion, this CWE suits better the rule.
  • Loading branch information
Dimitar Banchev authored and ccojocar committed Jun 24, 2024
1 parent 3edc633 commit 2e71f37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions cwe/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ var idWeaknesses = map[string]*Weakness{
Description: "The use of a broken or risky cryptographic algorithm is an unnecessary risk that may result in the exposure of sensitive information.",
Name: "Use of a Broken or Risky Cryptographic Algorithm",
},
"328": {
ID: "328",
Description: "The product uses an algorithm that produces a digest (output value) that does not meet security expectations for a hash function that allows an adversary to reasonably determine the original input (preimage attack), find another input that can produce the same hash (2nd preimage attack), or find multiple inputs that evaluate to the same hash (birthday attack). ",
Name: "Use of Weak Hash",
},
"338": {
ID: "338",
Description: "The product uses a Pseudo-Random Number Generator (PRNG) in a security context, but the PRNG's algorithm is not cryptographically strong.",
Expand Down
2 changes: 1 addition & 1 deletion issue/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ var ruleToCWE = map[string]string{
"G304": "22",
"G305": "22",
"G306": "276",
"G401": "326",
"G401": "328",
"G402": "295",
"G403": "310",
"G404": "338",
Expand Down

0 comments on commit 2e71f37

Please sign in to comment.