Quick Start Guide
In this section, you will learn how to use CodeSecTools.
This guide mainly used the tool on Java projects, it is perfectly possible to run it on any project that language is supported.
1. Prerequisites
For this guide, there are two ways to install the tool:
Normal installation
-
You will need to install the following packages:
gitcloc- Java Development Kit (17)
maven
-
And the following SAST tools:
Docker image
A Docker image used to run tests is available with the prerequisites installed. You can use it to test CodeSecTools without installing extra packages on your system.
⚠️ However, this container is intended for running tests, not for normal usage. Therefore, any data and results inside the container will be deleted when you exit.
Please perform a normal installation if you want to keep your results.
2. Installation
Normal installation
Docker image
To start the Docker container, run the command:
⚠️ The container will be deleted when you exit.
3. First run
Install completion (optional)
Download external resources
This command downloads datasets, rules, and plugins required for the SAST tools.
For each external resource, you will be prompted with resource information and, most importantly, its license/term.
Check the integration status
This command allows you to check if a SAST tool or dataset is available.
If not, it will specify what is missing.
For this guide, the status for Bearer, SemgrepCE, and SpotBugs should be Full ✅.
4. Common Use Cases
Analysis with multiple SAST tools
One important feature of CodeSecTools is the ability to run multiple SAST tools in order to:
- aggregate all the results to take advantage of each SAST tool's strengths (detecting specific vulnerabilities);
- cross-verify results and increase the confidence that a finding is a true positive.
Here are some analyses running CodeSecTools on vulnerable projects:
cyclonedx-core-java (CVE-2025-64518)
Vulnerability details are from Github Advisory.
- Weakness: CWE-611 (Improper Restriction of XML External Entity Reference).
- Introduced in commit 162aa59.
- Patched in pull request #737.
- Vulnerable file:
src/main/java/org/cyclonedx/CycloneDxSchema.java.
Download the vulnerable version of the project:
git clone https://github.com/CycloneDX/cyclonedx-core-java
cd cyclonedx-core-java
git checkout 162aa59
Compile the project to generate Java bytecode for SAST tools that require it:
Run analysis with all SAST tools:
Generate figures and report:
Open the project report (~/.codesectools/output/AllSAST/cyclonedx-core-java/report/home.html).
The report of the vulnerable file is shown here:
Some issues have been found by the tools in the vulnerable file, and the file is ranked high (high score) overall among all other files where issues were found.
SpotBugs is the only tool that detected issues and correctly identified the vulnerability (exact CWE ID).
conductor (CVE-2025-26074)
Vulnerability details are from Github Advisory.
- Weakness: CWE-78 (Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')).
- Patched in commit e981650.
- Vulnerable file:
core/src/main/java/com/netflix/conductor/core/events/ScriptEvaluator.java. - Note: the patch did not modify the vulnerable file but other files, which attenuated the vulnerability.
Download the vulnerable version of the project:
Compile the project to generate Java bytecode for SAST tools that require it:
Run analysis with all SAST tools:
Generate figures and report:
Open the project report (~/.codesectools/output/AllSAST/conductor/report/home.html).
The report of the vulnerable file is shown here:
Only one issue has been found by the tools in the vulnerable file, and the file is ranked low (low score) overall among all other files where issues were found.
SemgrepCE is the only tool that detected issues and partially identified the vulnerability.
It has detected a code injection that could leads to an OS command injection.
Note: If we did not know that a vulnerability existed, we would have had to verify it (by attempting to exploit it) because the eval function is a feature.
Benchmarking SAST tool
It is possible to benchmark any SAST tool on any dataset that are integrated to CodeSecTools thanks to the prior integration:
If the SAST tool requires artifacts, the expected artifacts and build command are provided:
cstools spotbugs benchmark BenchmarkJava_java
╭──────────────────────── SpotBugs - PrebuiltSAST ────────────────────────╮
│ │
│ Please build BenchmarkJava before running the benchmark │
│ Build command: mvn clean compile │
│ Full command: (cd │
│ /home/michel/.codesectools/cache/BenchmarkJava && mvn clean compile) │
│ Expected arteficts: │
│ /home/michel/.codesectools/cache/BenchmarkJava/target/classes/org/owasp │
│ /benchmark/testcode/*.class │
╰─────────────────────────────────────────────────────────────────────────╯
Then generating figures using the analysis output:
cstools spotbugs plot BenchmarkJava_java --overwrite
Figure overview saved at /home/michel/.codesectools/output/SpotBugs/BenchmarkJava_java/_figures/overview.png
Figure top_cwes saved at /home/michel/.codesectools/output/SpotBugs/BenchmarkJava_java/_figures/top_cwes.png
Figures:

