Skip to content

Commit 2cbdd02

Browse files
committed
Upgrade FindSecBugs plugin and minor improvement to Findbugs scorecard
generator to handle a new type of issue now reported by FindSecBugs.
1 parent d47d3ad commit 2cbdd02

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
<plugin>
8686
<groupId>com.h3xstream.findsecbugs</groupId>
8787
<artifactId>findsecbugs-plugin</artifactId>
88-
<version>1.9.0</version>
88+
<version>1.10.1</version>
8989
</plugin>
9090
</plugins>
9191
</configuration>

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

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,13 @@ else if ( cwe.equals( "326" ) ) {
128128
}
129129

130130
//This is a fallback mapping for unsupported/old versions of the Find Security Bugs plugin
131+
//as defined in: findsecbugs-plugin/src/main/resources/metadata/findbugs.xml
131132
//All important bug patterns have their CWE ID associated in later versions (1.4.3+).
132133
switch ( cat ) {
133134
//Cookies
134135
case "SECIC" : return 614; // insecure cookie use
135-
case "SECCU" : return 00; // servlet cookie
136-
case "SECHOC" : return 00; // HTTP Only not set on cookie - Information Leak / Disclosure (CWE-200)??
136+
case "SECCU" : return 00; // servlet cookie
137+
case "SECHOC" : return 00; // HTTP Only not set on cookie - Information Leak / Disclosure (CWE-200)??
137138

138139
//Injections
139140
case "SECSQLIHIB" : return 564; // Hibernate Injection, child of SQL Injection
@@ -156,7 +157,7 @@ else if ( cwe.equals( "326" ) ) {
156157

157158
//Weak encryption
158159
case "SECDU" : return 327; // weak encryption DES
159-
case "CIPINT" : return 327; // weak encryption - cipher with no integrity
160+
case "CIPINT" : return 327; // weak encryption - cipher with no integrity
160161
case "PADORA" : return 327; // padding oracle -- FIXME: probably wrong
161162
case "STAIV" : return 329; // static initialization vector for crypto
162163

@@ -173,19 +174,22 @@ else if ( cwe.equals( "326" ) ) {
173174
case "SECXSS2" : return 79; // XSS
174175

175176
//XXE
176-
case "SECXXEDOC" : return 611; // XXE
177-
case "SECXXEREAD" : return 611; // XXE
178-
case "SECXXESAX" : return 611; // XXE
177+
case "SECXXEDOC" : return 611; // XXE
178+
case "SECXXEREAD" : return 611; // XXE
179+
case "SECXXESAX" : return 611; // XXE
179180

180181
//Input sources
181-
case "SECSP" : return 00; // servlet parameter - not a vuln
182-
case "SECSH" : return 00; // servlet header -- not a vuln
182+
case "SECSP" : return 00; // servlet parameter - not a vuln
183+
case "SECSH" : return 00; // servlet header - not a vuln
183184
case "SECSHR" : return 00; // Use of Request Header -- spoofable
184185
case "SECSSQ" : return 00; // servlet query - not a vuln
185186

186187
//Technology detection
187-
case "SECSC" : return 00; // found Spring endpoint - not a vuln
188-
case "SECJRS" : return 00; // JAX-RS Endpoint
188+
case "SECSC" : return 00; // found Spring endpoint - not a vuln
189+
case "SECJRS" : return 00; // JAX-RS Endpoint
190+
191+
//Configuration
192+
case "SECOPFP" : return 00; // Overly Permissive File Permissions
189193

190194
default : System.out.println( "Unknown vuln category for FindBugs: " + cat );
191195
}

0 commit comments

Comments
 (0)