Skip to content

coverity-ss-action

coverity-ss-action #42

# example workflow for Coverity scans using the Black Duck Security Scan Action
# https://github.com/marketplace/actions/black-duck-security-scan
name: coverity-ss-action
on:
push:
branches: [ main, master, develop, stage, release ]
pull_request:
branches: [ main, master, develop, stage, release ]
workflow_dispatch:
jobs:
coverity:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
cache: maven
# designate the Coverity idir as something to cache, for more details see:
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows
- name: Restore Coverity iDir
uses: actions/cache/restore@v4
id: cache-coverity-idir
with:
path: .bridge/**/idir
key: ${{ github.event.repository.name }}-${{ github.ref_name }}-${{ runner.os }}
- name: Coverity Scan
uses: blackduck-inc/black-duck-security-scan@v2
with:
coverity_url: ${{ vars.COVERITY_URL }}
coverity_user: ${{ secrets.COV_USER }}
coverity_passphrase: ${{ secrets.COVERITY_PASSPHRASE }}
coverity_policy_view: ${{ github.event_name != 'pull_request' && 'Outstanding Issues' || '' }}
coverity_prComment_enabled: true
coverity_build_command: mvn -B -DskipTests package
coverity_clean_command: mvn -B clean
# coverity_local: true
github_token: ${{ secrets.GITHUB_TOKEN }}
include_diagnostics: false
- name: Save Coverity iDir
if: always()
uses: actions/cache/save@v4
with:
path: .bridge/**/idir
key: ${{ steps.cache-coverity-idir.outputs.cache-primary-key }}