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


Step 1 — Download the Bridge CLI

Visit the download index to find the right binary for your operating system:

https://repo.blackduck.com/bds-integrations-release/com/blackduck/integration/bridge/binaries/bridge-cli-bundle/latest/arrow-up-right

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.zip

Add 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-cli

Step 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

circle-info

Ensure you are using the correct JDK version required by your project before running the scan.

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