Generating a Polaris SAST Report
Introduction
This guide walks you through using the Black Duck Bridge CLI to run a Polaris SAST scan and export the results as a .sarif.json file that can be submitted to Mobb.
Pre-Requisites
A Polaris account with an active access token. See Generating a Polaris Access Token for instructions.
Access to a terminal (Linux, macOS, or Windows).
For Java projects that require compilation: the appropriate JDK and Maven or Gradle installed.
Step 1 — Download the Bridge CLI
Visit the download index to find the right binary for your operating system:
Linux example
wget https://repo.blackduck.com/bds-integrations-release/com/blackduck/integration/bridge/binaries/bridge-cli-bundle/latest/bridge-cli-bundle-linux64.zip
unzip bridge-cli-bundle-linux64.zipAdd the binary to your PATH so it is accessible from anywhere:
echo 'export PATH="$HOME/bridge-cli-bundle-linux64:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Verify the installation
bridge-cliStep 2 — Set your Polaris Access Token
Step 3 — Run the Scan
The key parameter to enable SARIF output is polaris.reports.sarif.create=true.
Example: Project with no compilation required (e.g. JavaScript/TypeScript)
Example: Java project requiring compilation with Maven
Example: Java project requiring compilation with Gradle
Step 4 — Locate the SARIF Report
Once the scan completes, the .sarif.json report will be written inside your project directory under:
For example, if you scanned webgoat:
This is the file you will upload to Mobb. See Polaris Integration with Mobb for next steps.
Last updated