Skip to content

Commit 1608059

Browse files
committed
Minor tweaks to runContrast scripts and add placeholder file so a directory gets created on git pull.
1 parent 38e6722 commit 1608059

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

runBenchmark_wContrast.bat

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
@ECHO OFF
22
IF EXIST tools\Contrast\contrast.jar (
3-
IF EXIST tools\Contrast\findings (
4-
DEL \F \Q tools\Contrast\findings
3+
IF EXIST tools\Contrast\working (
4+
DEL \F \Q tools\Contrast\contrast.log
55

6-
RMDIR \S tools\Contrast\working
6+
RMDIR \S tools\Contrast\cache
77

88
ECHO ""
99

@@ -18,5 +18,5 @@ IF EXIST tools\Contrast\contrast.jar (
1818
COPY tools\Contrast\working\contrast.log results\Benchmark_1.2beta-Contrast.log
1919

2020
) ELSE (
21-
ECHO Given that Contrast is a commercial product, you have to have a licensed version of Contrast in order to run it on the Benchmark. If you have access to Contrast, download the Java 1.5 version of contrast.jar from the Team Server and put it into the /tools/Contrast folder, and then rerun this script.
22-
)
21+
ECHO Contrast is a commercial product, so you need a licensed version of Contrast in order to run it on the Benchmark. If you have access to Contrast, download the Contrast Agent for Java (contrast.jar) from the Team Server and put it into the /tools/Contrast folder, and then rerun this script.
22+
)

runBenchmark_wContrast.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22

33
if [ -f tools/Contrast/contrast.jar ]; then
44

5-
if [ -d tools/Contrast/findings ]; then
5+
if [ -d tools/Contrast/working ]; then
66

7-
rm -r tools/Contrast/findings
8-
rm -r tools/Contrast/working
7+
rm -r tools/Contrast/working/cache
8+
rm -r tools/Contrast/working/contrast.log
99
echo ""
1010
echo "Previous Contrast results in tools/Contrast/findings removed"
1111
echo ""
1212

1313
fi
1414

15-
chmod 755 src/main/resources/insecureCmd.sh
15+
chmod 755 target/classes/insecureCmd.sh
1616
mvn clean package cargo:run -Pdeploywcontrast
1717

1818
echo "Copying Contrast report to results directory"
1919
cp tools/Contrast/working/contrast.log results/Benchmark_1.2beta-Contrast.log
2020

2121
else
2222

23-
echo "Given that Contrast is a commercial product, you have to have a licensed version of Contrast in order to run it on the Benchmark. If you have access to Contrast, download the Java 1.5 version of contrast.jar from the Team Server and put it into the /tools/Contrast folder, and then rerun this script."
23+
echo "Given that Contrast is a commercial product, you have to have a licensed version of Contrast in order to run it on the Benchmark. If you have access to Contrast, download the Contrast Agent (contrast.jar) from the Team Server and put it into the /tools/Contrast folder, and then rerun this script."
2424

2525
fi

tools/Contrast/readme.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Contrast is a commercial tool. If you are interested in running Contrast on the Benchmark, you'll have to get a license for it from the vendor just like you would for any commercial tool. Once you have it, you need to place the contrast.jar file in this directory in order to run the Benchmark with Contrast using one of the runBenchmark_wContrast scripts, and then crawl the Benchmark to generate scan results with one of the runCrawler scripts.
2+
3+
See the Tool Scanning Tips page at OWASP (https://www.owasp.org/index.php/Benchmark#tab=Tool_Scanning_Tips) for the latest instructions on how to scan the Benchmark with any vulnerability detection tool, including Contrast.

0 commit comments

Comments
 (0)