Skip to content

Commit 586cc94

Browse files
author
Dave Wichers
committed
Add BanditReader for Python and add new vuln category for new Python
Benchmark being developed.
1 parent 2ee0942 commit 586cc94

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

library/src/main/resources/categories.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,14 @@
123123
<isInjection>true</isInjection>
124124
<shortname>SQLI</shortname>
125125
</category>
126+
<category>
127+
<id>tempfile</id>
128+
<name>Insecure Temporary File</name>
129+
<cwe>377</cwe>
130+
<childof>668</childof>
131+
<parentof>378,379</parentof>
132+
<shortname>TEMP</shortname>
133+
</category>
126134
<category>
127135
<id>trustbound</id>
128136
<name>Trust Boundary</name>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/**
2+
* OWASP Benchmark Project
3+
*
4+
* <p>This file is part of the Open Web Application Security Project (OWASP) Benchmark Project For
5+
* details, please see <a
6+
* href="https://owasp.org/www-project-benchmark/">https://owasp.org/www-project-benchmark/</a>.
7+
*
8+
* <p>The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
9+
* of the GNU General Public License as published by the Free Software Foundation, version 2.
10+
*
11+
* <p>The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY
12+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13+
* PURPOSE. See the GNU General Public License for more details.
14+
*
15+
* @author Dave Wichers
16+
* @created 2025
17+
*/
18+
package org.owasp.benchmarkutils.score.parsers.sarif;
19+
20+
import org.owasp.benchmarkutils.score.ResultFile;
21+
22+
/**
23+
* This reader is made for the datadog-static-analyzer available on <a
24+
* href="https://github.com/DataDog/datadog-static-analyzer">...</a>. It uses the SARIF file
25+
* produces by the tool.
26+
*/
27+
public class BanditReader extends SarifReader {
28+
29+
public BanditReader() {
30+
super("Bandit", false, CweSourceType.TAG);
31+
}
32+
33+
@Override
34+
public String toolName(ResultFile resultFile) {
35+
return "Bandit";
36+
}
37+
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import org.owasp.benchmarkutils.score.TestSuiteResults;
3131
import org.owasp.benchmarkutils.score.parsers.csv.SemgrepCSVReader;
3232
import org.owasp.benchmarkutils.score.parsers.csv.WhiteHatDynamicReader;
33+
import org.owasp.benchmarkutils.score.parsers.sarif.BanditReader;
3334
import org.owasp.benchmarkutils.score.parsers.sarif.CodeQLReader;
3435
import org.owasp.benchmarkutils.score.parsers.sarif.ContrastScanReader;
3536
import org.owasp.benchmarkutils.score.parsers.sarif.DatadogSastReader;
@@ -56,6 +57,7 @@ public static List<Reader> allReaders() {
5657
new AppScanDynamicReader(),
5758
new AppScanSourceReader(),
5859
new ArachniReader(),
60+
new BanditReader(),
5961
new BearerReader(),
6062
new BlackDuckReader(),
6163
new BurpJsonReader(),

0 commit comments

Comments
 (0)