diff --git a/.github/workflows/polaris-scan.yml b/.github/workflows/polaris-scan.yml new file mode 100644 index 00000000..141928e1 --- /dev/null +++ b/.github/workflows/polaris-scan.yml @@ -0,0 +1,34 @@ +name: Polaris Scan + +on: + push: + branches: [master, main, develop] + +permissions: + contents: read + +jobs: + polaris-scan: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '17' + - name: Black Duck Security Scan + uses: blackduck-inc/black-duck-security-scan@v2 + with: + polaris_server_url: ${{ vars.POLARIS_URL }} + polaris_access_token: ${{ secrets.POLARIS_ACCESS_TOKEN }} + polaris_application_name: ${{ github.repository_owner }} + polaris_project_name: ${{ github.event.repository.name }} + polaris_branch_name: ${{ github.head_ref || github.ref_name }} + polaris_branch_parent_name: ${{ github.base_ref || 'master' }} + polaris_assessment_types: 'SAST' + polaris_test_sast_type: 'SAST-FULL' + coverity_args: '--all-security' + polaris_prComment_enabled: 'false' + github_token: ${{ secrets.GITHUB_TOKEN }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/polaris-workflow.yml b/.github/workflows/polaris-workflow.yml new file mode 100644 index 00000000..c7c23c43 --- /dev/null +++ b/.github/workflows/polaris-workflow.yml @@ -0,0 +1,35 @@ +# Quickstart: Black Duck Security Scan Action with polaris: +# https://documentation.blackduck.com/bundle/bridge/page/documentation/t_github-polaris-quickstart.html +name: Polaris Security Scan +on: + push: + branches: + - main + - master + - develop + - stage + - release + pull_request: + branches: + - main + - master + - develop + - stage + - release + workflow_dispatch: {} +jobs: + polaris: + runs-on: ubuntu-latest + steps: + - name: Checkout Source + uses: actions/checkout@v4 + + - name: Polaris Security Scan + id: polaris-scan + uses: blackduck-inc/black-duck-security-scan@v2 + with: + ### SCANNING: Required fields + polaris_server_url: ${{ vars.POLARIS_URL }} + polaris_access_token: ${{ secrets.POLARIS_ACCESS_TOKEN }} + ### ASSESSMENT TYPES + polaris_assessment_types: SCA,SAST # Comma-separated list: SAST,SCA,DAST diff --git a/coverity.yaml b/coverity.yaml new file mode 100644 index 00000000..607a89fc --- /dev/null +++ b/coverity.yaml @@ -0,0 +1,4 @@ +capture: + build: + clean-command: mvn -B clean + build-command: mvn -B -DskipTests package