Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
8ac6dc5
fix(docker): deprecated MAINTAINER instruction
PauloASilva Jul 4, 2024
63b11d6
fix(docker): legacy "ENV key value" format
PauloASilva Jul 4, 2024
109e3ed
Bump com.github.spotbugs:spotbugs-maven-plugin from 4.9.3.1 to 4.9.3.2
dependabot[bot] Jun 27, 2025
99d7530
Merge pull request #332 from OWASP-Benchmark/dependabot/maven/com.git…
davewichers Jun 27, 2025
eae3c16
Bump org.owasp.esapi:esapi from 2.6.2.0 to 2.7.0.0
dependabot[bot] Jun 30, 2025
6be8ea9
Merge pull request #333 from OWASP-Benchmark/dependabot/maven/org.owa…
davewichers Jun 30, 2025
520e8d1
Bump org.apache.maven.plugins:maven-enforcer-plugin from 3.5.0 to 3.6.0
dependabot[bot] Jul 2, 2025
a8bd437
Merge pull request #334 from OWASP-Benchmark/dependabot/maven/org.apa…
davewichers Jul 2, 2025
5aa8320
Bump com.diffplug.spotless:spotless-maven-plugin from 2.44.5 to 2.45.0
dependabot[bot] Jul 8, 2025
d706e9c
Merge pull request #335 from OWASP-Benchmark/dependabot/maven/com.dif…
davewichers Jul 8, 2025
b79b28f
Bump org.apache.maven.plugins:maven-enforcer-plugin from 3.6.0 to 3.6.1
dependabot[bot] Jul 16, 2025
ecbd3a2
Bump commons-io:commons-io from 2.19.0 to 2.20.0
dependabot[bot] Jul 21, 2025
e1dcc84
Bump com.fasterxml.jackson.core:jackson-databind from 2.19.1 to 2.19.2
dependabot[bot] Jul 21, 2025
d9348d6
Bump com.diffplug.spotless:spotless-maven-plugin from 2.45.0 to 2.46.1
dependabot[bot] Jul 22, 2025
d087c0c
Bump commons-codec:commons-codec from 1.18.0 to 1.19.0
dependabot[bot] Jul 23, 2025
2df9e37
Merge pull request #336 from OWASP-Benchmark/dependabot/maven/org.apa…
davewichers Jul 24, 2025
8b46536
Merge pull request #339 from OWASP-Benchmark/dependabot/maven/commons…
davewichers Jul 24, 2025
baf2a74
Merge pull request #340 from OWASP-Benchmark/dependabot/maven/com.fas…
davewichers Jul 24, 2025
91df53e
Merge pull request #341 from OWASP-Benchmark/dependabot/maven/com.dif…
davewichers Jul 24, 2025
e2734b2
Merge pull request #342 from OWASP-Benchmark/dependabot/maven/commons…
davewichers Jul 24, 2025
a8a92a3
Bump com.github.spotbugs:spotbugs from 4.9.3 to 4.9.4
dependabot[bot] Aug 11, 2025
fb9e3c7
Bump org.codehaus.cargo:cargo-maven3-plugin from 1.10.20 to 1.10.21
dependabot[bot] Aug 11, 2025
87aad45
Bump actions/checkout from 4 to 5
dependabot[bot] Aug 12, 2025
bc16ff9
Merge pull request #347 from OWASP-Benchmark/dependabot/maven/com.git…
davewichers Aug 17, 2025
177d79d
Merge pull request #348 from OWASP-Benchmark/dependabot/maven/org.cod…
davewichers Aug 17, 2025
eb87c89
Merge pull request #349 from OWASP-Benchmark/dependabot/github_action…
davewichers Aug 17, 2025
9b45fb6
Bump actions/setup-java from 4 to 5
dependabot[bot] Aug 21, 2025
0303430
Merge pull request #351 from OWASP-Benchmark/dependabot/github_action…
davewichers Aug 21, 2025
21b66e6
Bump com.github.spotbugs:spotbugs-maven-plugin from 4.9.3.2 to 4.9.4.0
dependabot[bot] Aug 22, 2025
79bb497
Merge pull request #352 from OWASP-Benchmark/dependabot/maven/com.git…
davewichers Aug 22, 2025
fc267b1
Bump com.fasterxml.jackson.core:jackson-databind from 2.19.2 to 2.20.0
dependabot[bot] Aug 29, 2025
9a0a151
Merge pull request #353 from OWASP-Benchmark/dependabot/maven/com.fas…
davewichers Aug 29, 2025
16cea00
Bump org.apache.httpcomponents.core5:httpcore5 from 5.3.4 to 5.3.5
dependabot[bot] Sep 1, 2025
0b3ad0d
Merge pull request #354 from OWASP-Benchmark/dependabot/maven/org.apa…
davewichers Sep 2, 2025
638cefe
Bump com.github.spotbugs:spotbugs-maven-plugin from 4.9.4.0 to 4.9.4.1
dependabot[bot] Sep 3, 2025
458f168
Merge pull request #355 from OWASP-Benchmark/dependabot/maven/com.git…
davewichers Sep 3, 2025
20b5b54
Bump org.codehaus.mojo:versions-maven-plugin from 2.18.0 to 2.19.0
dependabot[bot] Sep 5, 2025
2944f55
Merge pull request #356 from OWASP-Benchmark/dependabot/maven/org.cod…
davewichers Sep 5, 2025
18aed35
Bump com.github.spotbugs:spotbugs-maven-plugin from 4.9.4.1 to 4.9.4.2
dependabot[bot] Sep 8, 2025
e0c6487
Merge pull request #357 from OWASP-Benchmark/dependabot/maven/com.git…
davewichers Sep 8, 2025
bececc2
Bump com.github.spotbugs:spotbugs from 4.9.4 to 4.9.5
dependabot[bot] Sep 15, 2025
2664051
Bump org.codehaus.cargo:cargo-maven3-plugin from 1.10.21 to 1.10.22
dependabot[bot] Sep 15, 2025
cb8a418
Bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.3 to 3.5.4
dependabot[bot] Sep 15, 2025
995308f
Merge pull request #359 from OWASP-Benchmark/dependabot/maven/com.git…
davewichers Sep 15, 2025
44d817c
Merge pull request #360 from OWASP-Benchmark/dependabot/maven/org.cod…
davewichers Sep 15, 2025
5a1e8ae
Merge pull request #361 from OWASP-Benchmark/dependabot/maven/org.apa…
davewichers Sep 15, 2025
2ba0781
Bump com.github.spotbugs:spotbugs-maven-plugin from 4.9.4.2 to 4.9.5.0
dependabot[bot] Sep 16, 2025
ccbe389
Merge pull request #362 from OWASP-Benchmark/dependabot/maven/com.git…
davewichers Sep 16, 2025
2e430b2
Bump com.github.spotbugs:spotbugs from 4.9.5 to 4.9.6
dependabot[bot] Sep 17, 2025
cfdcf07
Merge pull request #363 from OWASP-Benchmark/dependabot/maven/com.git…
davewichers Sep 17, 2025
74b5649
Bump com.github.spotbugs:spotbugs-maven-plugin from 4.9.5.0 to 4.9.6.0
dependabot[bot] Sep 18, 2025
9011af6
Merge pull request #364 from OWASP-Benchmark/dependabot/maven/com.git…
davewichers Sep 18, 2025
c9304de
Bump org.codehaus.mojo:versions-maven-plugin from 2.19.0 to 2.19.1
dependabot[bot] Sep 22, 2025
37b4f5d
Bump org.apache.maven.plugins:maven-compiler-plugin
dependabot[bot] Sep 22, 2025
d676548
Bump org.apache.httpcomponents.core5:httpcore5 from 5.3.5 to 5.3.6
dependabot[bot] Sep 22, 2025
5da8522
Merge pull request #365 from OWASP-Benchmark/dependabot/maven/org.cod…
davewichers Sep 22, 2025
f6257a3
Merge pull request #366 from OWASP-Benchmark/dependabot/maven/org.apa…
davewichers Sep 22, 2025
8e67df1
Merge pull request #367 from OWASP-Benchmark/dependabot/maven/org.apa…
davewichers Sep 22, 2025
846a7c7
Upgrade Tomcat 9 to latest version.
Sep 25, 2025
5bd80cf
Bump org.apache.httpcomponents.client5:httpclient5 from 5.5 to 5.5.1
dependabot[bot] Sep 29, 2025
01bfc49
Merge pull request #369 from OWASP-Benchmark/dependabot/maven/org.apa…
davewichers Sep 29, 2025
96aee66
Bump org.apache.maven.plugins:maven-enforcer-plugin from 3.6.1 to 3.6.2
dependabot[bot] Oct 3, 2025
946daf2
Bump org.apache.maven.plugins:maven-dependency-plugin
dependabot[bot] Oct 3, 2025
dffaae9
Bump org.codehaus.mojo:extra-enforcer-rules from 1.10.0 to 1.11.0
dependabot[bot] Oct 6, 2025
9d31db3
Merge pull request #370 from OWASP-Benchmark/dependabot/maven/org.apa…
davewichers Oct 6, 2025
61fc67e
Merge pull request #371 from OWASP-Benchmark/dependabot/maven/org.apa…
davewichers Oct 6, 2025
6240c5e
Merge pull request #372 from OWASP-Benchmark/dependabot/maven/org.cod…
davewichers Oct 6, 2025
28a9ea3
Bump github/codeql-action from 3 to 4
dependabot[bot] Oct 8, 2025
8f01d79
Merge pull request #373 from OWASP-Benchmark/dependabot/github_action…
davewichers Oct 8, 2025
b259a1f
Bump org.apache.maven.plugins:maven-pmd-plugin from 3.27.0 to 3.28.0
dependabot[bot] Oct 13, 2025
eacbd3c
Bump org.codehaus.cargo:cargo-maven3-plugin from 1.10.22 to 1.10.23
dependabot[bot] Oct 13, 2025
fb26969
Merge pull request #374 from OWASP-Benchmark/dependabot/maven/org.apa…
davewichers Oct 14, 2025
60e72a2
Merge pull request #375 from OWASP-Benchmark/dependabot/maven/org.cod…
davewichers Oct 14, 2025
e4b59d5
Bump com.github.spotbugs:spotbugs from 4.9.6 to 4.9.7
dependabot[bot] Oct 15, 2025
b917e08
Merge pull request #376 from OWASP-Benchmark/dependabot/maven/com.git…
davewichers Oct 15, 2025
3f099cc
Bump com.github.spotbugs:spotbugs-maven-plugin from 4.9.6.0 to 4.9.7.0
dependabot[bot] Oct 15, 2025
0e1dc67
Merge pull request #377 from OWASP-Benchmark/dependabot/maven/com.git…
davewichers Oct 15, 2025
8b17201
Bump org.codehaus.cargo:cargo-maven3-plugin from 1.10.23 to 1.10.24
dependabot[bot] Oct 16, 2025
7ae3cbd
Merge pull request #379 from OWASP-Benchmark/dependabot/maven/org.cod…
davewichers Oct 16, 2025
65a0531
Bump com.github.spotbugs:spotbugs from 4.9.7 to 4.9.8
dependabot[bot] Oct 20, 2025
6eef016
Bump com.github.spotbugs:spotbugs-maven-plugin from 4.9.7.0 to 4.9.8.1
dependabot[bot] Oct 20, 2025
03f0fa3
Merge pull request #380 from OWASP-Benchmark/dependabot/maven/com.git…
davewichers Oct 20, 2025
7e418db
Merge branch 'master' into dependabot/maven/com.github.spotbugs-spotb…
davewichers Oct 20, 2025
2397772
Merge pull request #381 from OWASP-Benchmark/dependabot/maven/com.git…
davewichers Oct 20, 2025
7255141
Bump org.apache.maven.plugins:maven-antrun-plugin from 3.1.0 to 3.2.0
dependabot[bot] Oct 21, 2025
8a24961
Merge pull request #382 from OWASP-Benchmark/dependabot/maven/org.apa…
davewichers Oct 21, 2025
25d3b02
Bump org.apache.maven.plugins:maven-war-plugin from 3.4.0 to 3.5.0
dependabot[bot] Oct 27, 2025
68b0dd9
Bump actions/upload-artifact from 4 to 5
dependabot[bot] Oct 27, 2025
ce8bc00
Merge pull request #383 from OWASP-Benchmark/dependabot/maven/org.apa…
davewichers Oct 27, 2025
6693123
Merge pull request #384 from OWASP-Benchmark/dependabot/github_action…
davewichers Oct 27, 2025
096d215
Bump com.fasterxml.jackson.core:jackson-databind from 2.20.0 to 2.20.1
dependabot[bot] Oct 31, 2025
2565f29
Merge pull request #385 from OWASP-Benchmark/dependabot/maven/com.fas…
davewichers Oct 31, 2025
1244735
Fix runBearer.sh script so docker now works in the tighter/more const…
Oct 31, 2025
2665e65
Minor tweaks to runCodeQL.sh and README.
davewichers Nov 1, 2025
63e07ad
Bump commons-codec:commons-codec from 1.19.0 to 1.20.0
dependabot[bot] Nov 6, 2025
314b2af
Bump commons-io:commons-io from 2.20.0 to 2.21.0
dependabot[bot] Nov 10, 2025
5f60686
Bump org.apache.maven.plugins:maven-release-plugin from 3.1.1 to 3.2.0
dependabot[bot] Nov 10, 2025
0320c5d
Bump org.codehaus.cargo:cargo-maven3-plugin from 1.10.24 to 1.10.25
dependabot[bot] Nov 10, 2025
c3063e1
Merge pull request #386 from OWASP-Benchmark/dependabot/maven/commons…
davewichers Nov 17, 2025
4a09861
Merge pull request #388 from OWASP-Benchmark/dependabot/maven/commons…
davewichers Nov 17, 2025
1a010c8
Merge pull request #389 from OWASP-Benchmark/dependabot/maven/org.apa…
davewichers Nov 17, 2025
c2f1c12
Merge pull request #390 from OWASP-Benchmark/dependabot/maven/org.cod…
davewichers Nov 17, 2025
2cf91fa
Upgrade spotless dependency and maven workflow since spotless now
davewichers Nov 19, 2025
b74c1df
Update Dockerfile to use java 17
Nov 21, 2025
f0de687
Bump actions/checkout from 5 to 6
dependabot[bot] Nov 21, 2025
1253554
Merge pull request #394 from roksui/vm
davewichers Nov 21, 2025
4fb9a3c
Merge pull request #395 from OWASP-Benchmark/dependabot/github_action…
davewichers Nov 21, 2025
17f30c8
Minor enhancements to some tool scripts.
davewichers Nov 21, 2025
ec7def2
Bump com.github.spotbugs:spotbugs-maven-plugin from 4.9.8.1 to 4.9.8.2
dependabot[bot] Nov 24, 2025
d3f1e08
Bump org.codehaus.mojo:versions-maven-plugin from 2.19.1 to 2.20.0
dependabot[bot] Nov 24, 2025
c2f4f46
Merge pull request #396 from OWASP-Benchmark/dependabot/maven/com.git…
davewichers Nov 24, 2025
4d7dfa9
Merge pull request #397 from OWASP-Benchmark/dependabot/maven/org.cod…
davewichers Nov 24, 2025
633afab
Bump org.codehaus.mojo:versions-maven-plugin from 2.20.0 to 2.20.1
dependabot[bot] Nov 25, 2025
2bdd0c4
Merge pull request #398 from OWASP-Benchmark/dependabot/maven/org.cod…
davewichers Nov 25, 2025
cbcb9ea
Bump org.apache.maven.plugins:maven-resources-plugin from 3.3.1 to 3.4.0
dependabot[bot] Dec 2, 2025
b50ec2a
Bump org.apache.maven.plugins:maven-assembly-plugin from 3.7.1 to 3.8.0
dependabot[bot] Dec 2, 2025
e70b8da
Bump org.apache.maven.plugins:maven-war-plugin from 3.5.0 to 3.5.1
dependabot[bot] Dec 2, 2025
ed937c0
Bump org.apache.maven.plugins:maven-release-plugin from 3.2.0 to 3.3.0
dependabot[bot] Dec 4, 2025
685692c
Merge pull request #399 from OWASP-Benchmark/dependabot/maven/org.apa…
davewichers Dec 4, 2025
2be9e9e
Merge pull request #400 from OWASP-Benchmark/dependabot/maven/org.apa…
davewichers Dec 4, 2025
938b2a2
Merge pull request #401 from OWASP-Benchmark/dependabot/maven/org.apa…
davewichers Dec 4, 2025
4943dbb
Merge pull request #402 from OWASP-Benchmark/dependabot/maven/org.apa…
davewichers Dec 4, 2025
02fb88d
Bump org.apache.maven.plugins:maven-release-plugin from 3.3.0 to 3.3.1
dependabot[bot] Dec 15, 2025
21e104c
Bump org.apache.httpcomponents.core5:httpcore5 from 5.3.6 to 5.4
dependabot[bot] Dec 15, 2025
0d0d1be
Bump actions/upload-artifact from 5 to 6
dependabot[bot] Dec 15, 2025
b0b465b
Merge pull request #405 from OWASP-Benchmark/dependabot/maven/org.apa…
davewichers Dec 15, 2025
13c9863
Merge pull request #406 from OWASP-Benchmark/dependabot/maven/org.apa…
davewichers Dec 15, 2025
f139ec1
Merge pull request #407 from OWASP-Benchmark/dependabot/github_action…
davewichers Dec 15, 2025
5ed20d1
Upgrade Tomcat version.
Dec 15, 2025
45bab03
Bump org.apache.httpcomponents.client5:httpclient5 from 5.5.1 to 5.6
dependabot[bot] Dec 22, 2025
df45f14
Merge pull request #408 from OWASP-Benchmark/dependabot/maven/org.apa…
davewichers Dec 29, 2025
0fa4076
Bump org.codehaus.cargo:cargo-maven3-plugin from 1.10.25 to 1.10.26
dependabot[bot] Jan 5, 2026
2f279f9
Merge pull request #409 from OWASP-Benchmark/dependabot/maven/org.cod…
davewichers Jan 5, 2026
dc9abba
fix wrong hostname
darkspirit510 Jan 11, 2026
3b4bdf5
fix-outdated-urls
darkspirit510 Jan 11, 2026
e8ca871
Merge pull request #410 from darkspirit510/fix-sonarqube-reader
davewichers Jan 11, 2026
7fefbf8
Merge pull request #230 from PauloASilva/fix/dockerfile
davewichers Jan 11, 2026
e36b028
Add instructions on how to publish the updated Benchmark for Java Doc…
davewichers Jan 11, 2026
6ff6662
remove linebreaks
darkspirit510 Jan 11, 2026
36f30ff
Merge pull request #411 from darkspirit510/fix-urls
davewichers Jan 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
# Get full history for spotless ratchetFrom
with:
fetch-depth: 0

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
queries: security-extended, security-experimental, security-and-quality
Expand All @@ -43,10 +43,10 @@ jobs:
run: mvn -DskipTests=true install

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4

- name: Upload Output
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: ${{ matrix.language }} SARIF
path: ${{ runner.workspace }}/results/*.sarif
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v4
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
java-version: '11'
distribution: 'zulu'
java-version: 17
distribution: zulu
- name: Run Spotless check
run: mvn spotless:check
- name: Create WAR
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# OWASP Benchmark
The OWASP Benchmark Project is a Java test suite designed to verify the speed and accuracy of vulnerability detection tools. It is a fully runnable open source web application that can be analyzed by any type of Application Security Testing (AST) tool, including SAST, DAST (like <a href="https://www.zaproxy.org/">ZAP</a>), and IAST tools. The intent is that all the vulnerabilities deliberately included in and scored by the Benchmark are actually exploitable so its a fair test for any kind of application vulnerability detection tool. The Benchmark also includes scorecard generators for numerous open source and commercial AST tools, and the set of supported tools is growing all the time.
# OWASP Benchmark for Java
The OWASP Benchmark Project is a Java test suite designed to verify the speed and accuracy of vulnerability detection tools. It is a fully runnable open source web application that can be analyzed by any type of Application Security Testing (AST) tool, including SAST, DAST (like <a href="https://www.zaproxy.org/">ZAP</a>), and IAST tools. The intent is that all the vulnerabilities deliberately included in and scored by the Benchmark are actually exploitable so it's a fair test for any kind of application vulnerability detection tool.

The Benchmark project also includes scorecard generators for numerous open source and commercial AST tools, and the set of supported tools is growing all the time. This scoring capability is implemented in the BenchmarkUtils project, which is at: https://github.com/OWASP-Benchmark/BenchmarkUtils.

The project documentation is all on the OWASP site at the <a href="https://owasp.org/www-project-benchmark">OWASP Benchmark</a> project pages. Please refer to that site for all the project details.

The current latest release is v1.2. Note that all the releases that are available here: https://github.com/OWASP/Benchmark/releases are historical. The latest release is always available live by simply cloning or pulling the head of this repository (i.e., git pull).
The current latest release is v1.2. Note that all the releases that are available here: https://github.com/OWASP-Benchmark/BenchmarkJava/releases, are historical. The latest release is always available live by simply cloning or pulling the head of this repository (i.e., git pull).

Running Benchmark Itself:
* runBenchmark.sh - run the Benchmark Web Application (accessible via local machine only)
* runRemoteAccessibleBenchmark.sh - like the above but allows port 8443 to be accessible outside the machine Benchmark is running on.
8 changes: 4 additions & 4 deletions VMs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# This dockerfile builds a container that pulls down and runs the latest version of BenchmarkJava
FROM ubuntu:latest
MAINTAINER "Dave Wichers dave.wichers@owasp.org"
LABEL org.opencontainers.image.authors="Dave Wichers dave.wichers@owasp.org"

RUN apt-get update
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata
RUN apt-get install -q -y \
openjdk-11-jre-headless \
openjdk-11-jdk \
openjdk-17-jre-headless \
openjdk-17-jdk \
git \
maven \
wget \
Expand Down Expand Up @@ -35,7 +35,7 @@ RUN useradd -d /home/bench -m -s /bin/bash bench
RUN echo bench:bench | chpasswd

RUN chown -R bench /owasp/
ENV PATH /owasp/BenchmarkJava:$PATH
ENV PATH=/owasp/BenchmarkJava:$PATH

# start up Benchmark once, for 60 seconds, then kill it, so the additional dependencies required to run it are downloaded/cached in the image as well.
# exit 0 is required to return a 'success' code, otherwise the timeout returns a failure code, causing the Docker build to fail.
Expand Down
3 changes: 3 additions & 0 deletions VMs/buildDockerImage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ fi
docker image rm benchmark:latest
docker build -t benchmark .

# Once verified/tested, to publish an update to the OWASP Benchmark Docker image, run the following:
# docker push owasp/benchmark:latest

46 changes: 23 additions & 23 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.18.0</version>
<version>1.20.0</version>
</dependency>

<!-- mvn dependency:analyze says this is an unused declared dependency, but its wrong. Get this runtime error if it's not included: Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.commons.dbcp.BasicDataSource] for bean with name 'dataSource' defined in class path resource [context.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource -->
Expand All @@ -637,7 +637,7 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.19.0</version>
<version>2.21.0</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -765,13 +765,13 @@
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>5.5</version>
<version>5.6</version>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents.core5</groupId>
<artifactId>httpcore5</artifactId>
<version>5.3.4</version>
<version>5.4</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -810,7 +810,7 @@
<dependency>
<groupId>org.owasp.esapi</groupId>
<artifactId>esapi</artifactId>
<version>2.6.2.0</version>
<version>2.7.0.0</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -854,7 +854,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.19.1</version>
<version>2.20.1</version>
</dependency>
</dependencies>

Expand All @@ -880,17 +880,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.7.1</version>
<version>3.8.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.8.1</version>
<version>3.9.0</version>
<configuration>
<usedDependencies>
<dependency>com.sun.jersey:jersey-servlet</dependency>
Expand All @@ -904,7 +904,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.1.1</version>
<version>3.3.1</version>
</plugin>
</plugins>
</pluginManagement>
Expand All @@ -924,7 +924,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.14.0</version>
<version>3.14.1</version>
<configuration>
<fork>true</fork>
<meminitial>1000m</meminitial>
Expand All @@ -942,12 +942,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.5.0</version>
<version>3.6.2</version>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>extra-enforcer-rules</artifactId>
<version>1.10.0</version>
<version>1.11.0</version>
</dependency>
</dependencies>
<executions>
Expand Down Expand Up @@ -1005,7 +1005,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.27.0</version>
<version>3.28.0</version>
</plugin>

<plugin>
Expand All @@ -1017,7 +1017,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<version>3.4.0</version>
</plugin>

<plugin>
Expand All @@ -1038,13 +1038,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.3</version>
<version>3.5.4</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.4.0</version>
<version>3.5.1</version>
<configuration>
<webXml>${maven.war.webxml}</webXml>
</configuration>
Expand All @@ -1053,13 +1053,13 @@
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven3-plugin</artifactId>
<version>1.10.20</version>
<version>1.10.26</version>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.18.0</version>
<version>2.20.1</version>
</plugin>

<!-- SpotBugs Static Analysis - the successor to FindBugs -->
Expand Down Expand Up @@ -1104,7 +1104,7 @@
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.44.5</version>
<version>3.1.0</version>
<configuration>
<!-- optional: limit format enforcement to just the files changed by this feature branch -->
<ratchetFrom>origin/master</ratchetFrom>
Expand Down Expand Up @@ -1249,13 +1249,13 @@
<version.fluido>2.1.0</version.fluido>
<!-- hibernate is up to rev 6+. But 4.0.0. causes this error: symbol: org.hibernate.classic.Session not found -->
<version.hibernate>3.6.10.Final</version.hibernate>
<version.spotbugs.maven>4.9.3.1</version.spotbugs.maven>
<version.spotbugs>4.9.3</version.spotbugs>
<version.spotbugs.maven>4.9.8.2</version.spotbugs.maven>
<version.spotbugs>4.9.8</version.spotbugs>
<!-- Spring 6.x requires Java 17 -->
<version.springframework>5.3.39</version.springframework>
<!-- Tomcat 10 moves from Java EE to Jakarta EE, moving packages javax.* to jakarta.* - code changes likely required to address this change. -->
<tomcat.major.version>9</tomcat.major.version>
<version.tomcat>9.0.97</version.tomcat>
<version.tomcat>9.0.113</version.tomcat>
<tomcat.url>https://archive.apache.org/dist/tomcat/tomcat-${tomcat.major.version}/v${version.tomcat}/bin/apache-tomcat-${version.tomcat}.zip</tomcat.url>
</properties>

Expand Down
18 changes: 16 additions & 2 deletions scripts/runBearer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

# Check for install/updates at https://github.com/bearer/bearer

# For this script to work, you need to change the permissions on the results/ directory to 777
# so docker can write the results file into the results/ folder

source scripts/requireCommand.sh

requireCommand docker
Expand All @@ -10,6 +13,17 @@ docker pull bearer/bearer --platform linux/amd64

benchmark_version=$(scripts/getBenchmarkVersion.sh)
bearer_version=$(docker run --platform linux/amd64 bearer/bearer bearer --version | grep -o '[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+')
result_file="/src/results/Benchmark_$benchmark_version-Bearer-v$bearer_version.json"
result_file="results/Benchmark_$benchmark_version-Bearer-v$bearer_version.json"
temp_result_file="$result_file.tmp"
docker_result_file="/benchmark/$temp_result_file"

# if you set the Docker userid to match the current user id with: --user $(id -u):$(id -g) you get a suspicious git repository error
docker run --platform linux/amd64 --rm -v "${PWD}:/benchmark" bearer/bearer scan /benchmark/src/main/ --format jsonv2 --output "$docker_result_file" > /dev/null

# Because the docker userid and current user ID might be different, we write the Bearer result to a temp file.
# Then copy it to the desired file name, and then delete the temp file.
#
# We can't just chown the file to the right user ID as Unix won't allow that.
cp $temp_result_file $result_file
rm -f $temp_result_file

docker run --platform linux/amd64 --rm -v "${PWD}:/src" bearer/bearer scan /src/src/main/ --format jsonv2 --output "$result_file" > /dev/null
2 changes: 1 addition & 1 deletion scripts/runCodeQL.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## For Rosetta 2, run: lsbom -f /Library/Apple/System/Library/Receipts/com.apple.pkg.RosettaUpdateAuto.bom - And if it returns a list of files, it's installed.

# This then runs the CodeQL scan:
## The following CodeQL query is a big complex. I had to raise an issue with the CodeQL team to figure out how to do this.
## The following CodeQL query is a bit complex. I had to raise an issue with the CodeQL team to figure out how to do this.
## The issue raised and the answer that documents this query is here: https://github.com/github/codeql/issues/18518#issuecomment-2730684184
benchmark_version=$(scripts/getBenchmarkVersion.sh)
../../tools/codeql-home/codeql/codeql database analyze owasp-benchmark codeql/java-queries:codeql-suites/java-security-extended.qls --format=sarifv2.1.0 --output=results/Benchmark_1.2-codeql_java-security-extended.sarif -j0 --download
Expand Down
5 changes: 3 additions & 2 deletions scripts/runFindBugs.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# source "scripts/verifyBenchmarkPluginAvailable.sh" - Don't have .bat version of this (yet)

# FindBugs is dead, so this specifies the specific (last) version of findbugs. Its version is not defined in the pom.xml file.
# The buildtime elements when invoking the findbugs-maven-plugin leverage the buildtime extension specified in: .mvn/extensions.xml
CALL mvn compile org.codehaus.mojo:findbugs-maven-plugin:3.0.5:findbugs -Dbuildtime.output.csv=true -Dbuildtime.output.csv.file=../data/out.csv
CALL mvn org.owasp:benchmarkutils-maven-plugin:append-time -DtoolName=findbugs
call mvn compile org.codehaus.mojo:findbugs-maven-plugin:3.0.5:findbugs -Dbuildtime.output.csv=true -Dbuildtime.output.csv.file=../data/out.csv
call mvn org.owasp:benchmarkutils-maven-plugin:append-time -DtoolName=findbugs

8 changes: 5 additions & 3 deletions scripts/runFindSecBugs.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# source "scripts/verifyBenchmarkPluginAvailable.sh" - Don't have .bat version of this (yet)
# The buildtime elements when invoking the findbugs-maven-plugin leverage the buildtime extension specified in: .mvn/extensions.xml
CALL mvn compile -Pfindsecbugs -Dbuildtime.output.csv=true -Dbuildtime.output.csv.file=../data/out.csv
CALL mvn org.owasp:benchmarkutils-maven-plugin:append-time -DtoolName=findsecbugs

# The buildtime elements when invoking the findbugs-maven-plugin thru the findsecbugs profile leverage the
# buildtime extension specified in: .mvn/extensions.xml
call mvn compile -Pfindsecbugs -Dbuildtime.output.csv=true -Dbuildtime.output.csv.file=../data/out.csv
call mvn org.owasp:benchmarkutils-maven-plugin:append-time -DtoolName=findsecbugs

3 changes: 2 additions & 1 deletion scripts/runFindSecBugs.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
source "scripts/verifyBenchmarkPluginAvailable.sh"
# The buildtime elements when invoking the findbugs-maven-plugin leverage the buildtime extension specified in: .mvn/extensions.xml
# The buildtime elements when invoking the findbugs-maven-plugin thru the findsecbugs profile leverage the
# buildtime extension specified in: .mvn/extensions.xml
mvn compile -Pfindsecbugs -Dbuildtime.output.csv=true -Dbuildtime.output.csv.file=../data/out.csv
mvn org.owasp:benchmarkutils-maven-plugin:append-time -DtoolName=findsecbugs

6 changes: 3 additions & 3 deletions scripts/runPMD.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# source "scripts/verifyBenchmarkPluginAvailable.sh" - Don't have .bat version of this (yet)
# The buildtime elements when invoking the findbugs-maven-plugin leverage the buildtime extension specified in: .mvn/extensions.xml
CALL mvn compile pmd:pmd -Dbuildtime.output.csv=true -Dbuildtime.output.csv.file=../data/out.csv
CALL mvn org.owasp:benchmarkutils-maven-plugin:append-time -DtoolName=pmd
# The buildtime elements when invoking the PMD plugin leverage the buildtime extension specified in: .mvn/extensions.xml
call mvn compile pmd:pmd -Dbuildtime.output.csv=true -Dbuildtime.output.csv.file=../data/out.csv
call mvn org.owasp:benchmarkutils-maven-plugin:append-time -DtoolName=pmd

2 changes: 1 addition & 1 deletion scripts/runPMD.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source "scripts/verifyBenchmarkPluginAvailable.sh"
# The buildtime elements when invoking the findbugs-maven-plugin leverage the buildtime extension specified in: .mvn/extensions.xml
# The buildtime elements when invoking the PMD plugin leverage the buildtime extension specified in: .mvn/extensions.xml
mvn compile pmd:pmd -Dbuildtime.output.csv=true -Dbuildtime.output.csv.file=../data/out.csv
mvn org.owasp:benchmarkutils-maven-plugin:append-time -DtoolName=pmd

4 changes: 3 additions & 1 deletion scripts/runSnykSAST.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Install Snyk per: https://docs.snyk.io/snyk-cli/install-or-update-the-snyk-cli
# Before running this, you must first run: snyk auth (and then authenticate) so snyk code is authorized to run.

benchmark_version=$(scripts/getBenchmarkVersion.sh)
Snyk_version=$(snyk -v)

snyk code --sarif-file-output=results/Benchmark_$benchmark_version-snykCodeCli-v$Snyk_version.sarif
snyk code test --sarif-file-output=results/Benchmark_$benchmark_version-snykCodeCli-v$Snyk_version-$SECONDS.sarif

4 changes: 3 additions & 1 deletion scripts/runSnykSAST_OnWindows.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Install Snyk per: https://docs.snyk.io/snyk-cli/install-or-update-the-snyk-cli
# Before running this, you must first run: snyk auth (and then authenticate) so snyk code is authorized to run.

benchmark_version=$(scripts/getBenchmarkVersion.sh)
Snyk_version=$(snyk-win -v)

snyk-win code test --sarif-file-output=results/Benchmark_$benchmark_version-snykCodeCli-v$Snyk_version.sarif
snyk-win code test --sarif-file-output=results/Benchmark_$benchmark_version-snykCodeCli-v$Snyk_version-$SECONDS.sarif

Loading