This quickstart explains how to set up the Black Duck Security Scan Template to integrate with a SRM project to run a full scan, triggered by push and merge events on specified branches.
After the scan completes diagnostic logs will be exported as GitLab build artifacts.
Important: Please note that scanning Merge Requests, injecting review comments and creating SARIF reports is not currently supported for pipelines that integrate the Black Duck Security Scan Template with Software Risk Manager.
Prerequisites
- The following reading is recommended:
- Access to a GitLab repository with admin access.
- Access to a Software Risk Manager (SRM) server instance.
- An SRM role that allows creation of authentication tokens.
- An SRM API Key to enable the Black Duck Security Scan Template to integrate with the Software Risk Manager instance.
- For security reasons, it is advisable not to store credentials directly in the workflow. The recommended approach is to use masked and hidden variables. Important: It is adviseable that the variables are added as project variables. Group variable inheritance can cause scans to fail under certain conditions. Be sure to set the mask variable flag for
SRM_API_KEYto avoid exposure in the CI logs. - Add the following secrets and variables ():
Variable Type Description Example SRM_URLMasked Software Risk Manager Server URL https://srm.blackduck.comSRM_API_KEYMasked and hidden Software Risk Manager API Key A_SRM_API_KEY - Software Risk Manager 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
Follow the steps below to configure the Black Duck Security Scan Template to run a full scan:
Troubleshooting and support
If a pipeline error is encountered similar to the example below, then it is likely that organization firewall rules maybe restricting access to the template.
Attention: Unable to create pipeline Project `blackduck-inc/black-duck-security-scan` not found or access denied! Make sure any includes in the pipeline configuration are correctly defined.
The recommended solution is to check that the template is referenced correctly and then perform one of the following actions:
- Arrange access with the organization's IT department.
- Use a GitLab self managed runner.