@@ -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