@@ -113,13 +113,56 @@ else if ( cwe.equals( "326" ) ) {
113113 return Integer .parseInt ( cwe );
114114 }
115115
116+ //This is a fallback mapping for unsupported/old versions of the Find Security Bugs plugin
117+ //All important bug patterns have their CWE ID associated in later versions (1.4.3+).
116118 switch ( cat ) {
117-
118- //Padding oracle (no specific CWE .. and not analyze by benchmark)
119- case "PADORA" : return 00 ; // servlet cookie - not a vuln
120119 //Cookies
121- case "SECCU" : return 00 ; // servlet cookie - not a vuln
122- //Others informational elements
120+ case "SECIC" : return 614 ; // insecure cookie use
121+ case "SECCU" : return 00 ; // servlet cookie
122+
123+ //Injections
124+ case "SECSQLIHIB" : return 564 ; // Hibernate Injection, child of SQL Injection
125+ case "SECSQLIJDO" : return 72 ;
126+ case "SECSQLIJPA" : return 72 ;
127+ case "SECSQLISPRJDBC" : return 72 ;
128+ case "SECSQLIJDBC" : return 72 ;
129+
130+ //LDAP injection
131+ case "SECLDAPI" : return 90 ; // LDAP injection
132+
133+ //XPath injection
134+ case "SECXPI" : return 643 ; // XPATH injection
135+
136+ //Command injection
137+ case "SECCI" : return 78 ; // command injection
138+
139+ //Weak random
140+ case "SECPR" : return 330 ; // weak random
141+
142+ //Weak encryption
143+ case "SECDU" : return 327 ; // weak encryption DES
144+ case "CIPINT" : return 327 ; // weak encryption - cipher with no integrity
145+ case "PADORA" : return 327 ; // padding oracle -- FIXME: probably wrong
146+ case "STAIV" : return 329 ; // static initialization vector for crypto
147+
148+ //Weak hash
149+ case "SECWMD" : return 328 ; // weak hash
150+
151+ //Path traversal
152+ case "SECPTO" : return 22 ; // path traversal
153+ case "SECPTI" : return 22 ; // path traversal
154+
155+ //XSS
156+ case "SECXRW" : return 79 ; // XSS
157+ case "SECXSS1" : return 79 ; // XSS
158+ case "SECXSS2" : return 79 ; // XSS
159+
160+ //XXE
161+ case "SECXXEDOC" : return 611 ; // XXE
162+ case "SECXXEREAD" : return 611 ; // XXE
163+ case "SECXXESAX" : return 611 ; // XXE
164+
165+ //Input sources
123166 case "SECSP" : return 00 ; // servlet parameter - not a vuln
124167 case "SECSH" : return 00 ; // servlet header -- not a vuln
125168 case "SECSSQ" : return 00 ; // servlet query - not a vuln
0 commit comments