Skip to content

Commit 3637360

Browse files
committed
Modification to the mapping of FindBugs report parser.
Update the version of Find Security Bugs to the latest release.
1 parent 5ec064e commit 3637360

File tree

2 files changed

+16
-25
lines changed

2 files changed

+16
-25
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<plugin>
6262
<groupId>com.h3xstream.findsecbugs</groupId>
6363
<artifactId>findsecbugs-plugin</artifactId>
64-
<version>1.4.0</version>
64+
<version>1.4.3</version>
6565
</plugin>
6666
</plugins>
6767
</configuration>

src/main/java/org/owasp/benchmark/score/parsers/FindbugsReader.java

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -105,35 +105,26 @@ private static int figureCWE( TestCaseResult tcr, Node cwenode, Node catnode) {
105105
if ( cwe.equals( "23" ) || cwe.equals( "36" ) ) {
106106
cwe = "22";
107107
}
108+
// FSB identify DES/DESede as CWE-326 (Inadequate Encryption Strength) while Benchmark
109+
// marked it as CWE-327 (Use of a Broken or Risky Cryptographic Algorithm)
110+
else if ( cwe.equals( "326" ) ) {
111+
cwe = "327";
112+
}
108113
return Integer.parseInt( cwe );
109114
}
110-
115+
111116
switch( cat ) {
112-
case "SECCU" : return 614; // insecure cookie use
113-
case "SECPR" : return 330; // weak random
114-
case "SECLDAPI" : return 90; // LDAP injection
115-
case "SECPTO" : return 22; // path traversal
116-
case "SECPTI" : return 22; // path traversal
117-
case "CIPINT" : return 327; // weak encryption - cipher with no integrity
118-
case "PADORA" : return 327; // padding oracle -- FIXME: probably wrong
119-
case "SECXPI" : return 643; // XPATH injection
120-
case "SECWMD" : return 328; // weak hash
121-
case "SECCI" : return 78; // command injection
122-
case "SECDU" : return 327; // weak encryption DES
123-
case "SECXRW" : return 79; // XSS
124-
case "SECXSS1" : return 79; // XSS
125-
case "SECXSS2" : return 79; // XSS
126-
case "SECXXEDOC" : return 611; // XXE - Probably DOM Parser
127-
case "SECSQLIHIB" : return 564; // Hibernate Injection, child of SQL Injection
128-
case "SECXXESAX" : return 611; // XXE - SAX Parser
129-
case "STAIV" : return 329; // static initialization vector for crypto
130117

131-
case "SECSP" : return 00; // servlet parameter - not a vuln
132-
case "SECSH" : return 00; // servlet header -- not a vuln
133-
case "SECSSQ" : return 00; // servlet query - not a vuln
134-
118+
//Padding oracle (no specific CWE .. and not analyze by benchmark)
119+
case "PADORA" : return 00; // servlet cookie - not a vuln
120+
//Cookies
121+
case "SECCU" : return 00; // servlet cookie - not a vuln
122+
//Others informational elements
123+
case "SECSP" : return 00; // servlet parameter - not a vuln
124+
case "SECSH" : return 00; // servlet header -- not a vuln
125+
case "SECSSQ" : return 00; // servlet query - not a vuln
135126

136-
default : System.out.println( "Unknown category: " + cat );
127+
default : System.out.println( "Unknown category: " + cat );
137128
}
138129

139130
return 0;

0 commit comments

Comments
 (0)