Skip to content

Commit f74e1b4

Browse files
author
Dave Wichers
committed
A few tweaks to Semgrep Reader for a few new CWEs not previously seen.
1 parent 5fbe55e commit f74e1b4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugin/src/main/java/org/owasp/benchmarkutils/score/parsers/SemgrepReader.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ public static int translate(int cwe) {
140140
case 406: // Insufficient Control of Network Message Volume (Network Amplification)
141141
case 415: // Double Free
142142
case 416: // Use After Free
143+
case 427: // Uncontrolled Search Path Element
143144
case 441: // Unintended Proxy or Intermediary ('Confused Deputy')
144145
case 444: // HTTP Request/Response Smuggling
145146
case 451: // User Interface (UI) Misrepresentation of Critical Information
@@ -165,6 +166,7 @@ public static int translate(int cwe) {
165166
case 665: // CWE vuln mapping DISCOURAGED: Improper Initialization
166167
case 667: // Improper Locking
167168
case 668: // CWE vuln mapping DISCOURAGED: Exposure of Resource to Wrong Sphere
169+
case 673: // External Influence of Sphere Definition
168170
case 676: // Use of Potentially Dangerous Function
169171
case 681: // Incorrect Conversion between Numeric Types
170172
case 682: // CWE vuln mapping DISCOURAGED: Incorrect Calculation
@@ -202,13 +204,14 @@ public static int translate(int cwe) {
202204
case 1021: // TapJacking: Improper Restriction of Rendered UI Layers or Frames
203205
case 1104: // Use of Unmaintained Third Party Components
204206
case 1204: // Generation of Weak Initialization Vector (IV)
207+
case 1220: // Insufficient Granularity of Access Control
205208
case 1275: // Sensitive Cookie with Improper SameSite Attribute
206209
case 1323: // Improper Management of Sensitive Trace Data
207210
case 1333: // Inefficient Regular Expression Complexity (e.g., RegexDOS)
208211
case 1336: // Improper Neutralization of Special Elements Used in a Template Engine
209212
// TODO: Map to some type of injection?
210213
case 1390: // Weak Authentication
211-
break; // Don't care - So return CWE 'as is'
214+
return cwe; // Don't care - So return CWE 'as is'
212215

213216
// Translated CWEs:
214217
case 696: // Incorrect Behavior Order
@@ -238,6 +241,7 @@ public static int translate(int cwe) {
238241
case 611: // CweNumber.XXE;
239242
case 614: // CweNumber.INSECURE_COOKIE;
240243
case 643: // CweNumber.XPATH_INJECTION;
244+
case 770: // Allocation of Resources Without Limits or Throttling
241245
case 1004: // CweNumber.COOKIE_WITHOUT_HTTPONLY;
242246
return cwe;
243247

0 commit comments

Comments
 (0)