To integrate a Black Duck Security Scan Extension pipeline with Polaris a full scan should be run followed by Pull Request scans. A Pull Request scan discovers new issues on the feature branch which are not on the target branch.
For further details follow the interactive tutorial for integrating Polaris with Black Duck Security Scan Extension.
Prerequisites
-
The following reading is recommended before starting this quickstart:
- Install the Black Duck Security Scan Extension into the ADO organization.
- An Azure Access Token with sufficient privileges for contributing to Pull Requests to allow the pipeline to inject Pull Request review comments, create Fix Pull Requests and upload SARIF reports.
- For security reasons, it is advisable not to store credentials directly in the pipeline. The recommended approach is to use secured variables.
- The following Black Duck Security Scan Extension parameters are required to enable injecting review comments into Pull Requests, create Fix Pull Requests and upload SARIF reports:Important: Pull Request comments will not be injected, Fix Pull Requests will not be created and SARIF reports will not be uploaded if these parameters and the prerequisites are not configured.
Parameter Description Example polaris_application_nameThe name of the Polaris application. For users that do not have a concurrent license this should be created before running the pipeline. $(Build.Repository.Name)polaris_prcomment_enabledWhen true, this enables PR comments."true"polaris_fixpr_enabledWhen truethis enables Fix Pull Requests."true"azure_tokenAn Azure Access Token required to inject review comments and upload SARIF reports. $(System.AccessToken)Note: The Black Duck Security Scan Extension integrates with Polaris via Bridge CLI. Additional scan configuration options not available through the template's parameter set can be specified by defining relevant Bridge CLI environment variables within the workflow job. -
Add the following secrets and variables ():
Variable Type Description Example POLARIS_SERVERURLVariable Polaris Server URL https://polaris.blackduck.comPOLARIS_ACCESSTOKENSecret Polaris Access Token REPLACE_WITH_YOUR_TOKEN - Polaris uses Coverity to perform SAST assessments. Coverity requires additional configuration for compiled languages. For languages that use a build system (such as C++, Java, etc.), Coverity must be configured with build and clean commands to capture and analyze the build.
- The instructions below use pipeline parameters to specify build and clean commands.
- See Using Bridge with compiled languages for an explanation of the various methods available for configuring Bridge to integrate with Coverity to capture and analyze the build for compiled languages.
Instructions
Troubleshooting and support
If a pipeline error is encountered similar to the example below, then it is likely that the user credentials used to integrate with the Polaris server do not have a concurrent subscription.
Automatic application creation will fail for users with a parallel subscription. To create the application manually before running the pipeline, consult create an application in Polaris.