As an alternative to the Black Duck Security Scan Action, the Bridge CLI can be downloaded and directly executed in a GitHub workflow. It has all the functionality of the plugin, but requires an additional step to download the Bridge CLI.
To discover more about the Black Duck Security Scan Action and what it can do, take a look at the overview page.
Prerequisites
- The following reading is recommended before starting this quickstart:
- For security reasons, it is advisable to use GitHub Actions secrets or repository variables to store credentials and access tokens.
- Add the following secrets and variables in your repository settings:
Variable Type Description Example SRM_URLRepository Variable SRM server URL https://srm.example.comSRM_APIKEYSecret SRM API key REPLACE_WITH_YOUR_APIKEYBRIDGECLI_LINUX64Repository Variable Bridge CLI download URL for Linux https://repo.blackduck.com/artifactory/bds-integrations-release/com/blackduck/integration/bridge/binaries/bridge-cli-bundle/latest/bridge-cli-bundle-linux64.zip
- The instructions below use the Bridge
COVERITY_BUILD_COMMANDandCOVERITY_CLEAN_COMMANDenvironment variables to specify the build and clean commands. - See Using Bridge with compiled languages and the Coverity section in Client scan tool parameters for an overview of the various methods available for configuring Bridge CLI 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 BRIDGE_SRM_BRANCH_PARENT parameter has not been set.
When scanning new non-default branches, e.g. develop, stage or release, the BRIDGE_SRM_BRANCH_PARENT parameter must be set to the name of the default branch, e.g. main. An example is shown in the Quickstart code example in the Instructions section.
For further troubleshooting, enable the optional log archiving by uncommenting the Save Logs step in the workflow file.