|
| 1 | +# |
| 2 | +# BSD 3-Clause License |
| 3 | +# Copyright (C) 2026 Intel Corporation |
| 4 | +# SPDX-License-Identifier: BSD-3-Clause |
| 5 | +# |
| 6 | +name: Scan On Demand |
| 7 | + |
| 8 | +on: |
| 9 | + workflow_dispatch: |
| 10 | + inputs: |
| 11 | + branch: |
| 12 | + description: 'Branch to scan' |
| 13 | + required: true |
| 14 | + default: 'main' |
| 15 | + |
| 16 | +permissions: {} |
| 17 | + |
| 18 | +concurrency: |
| 19 | + group: ${{ github.workflow }}-${{ inputs.branch }} |
| 20 | + cancel-in-progress: true |
| 21 | + |
| 22 | +jobs: |
| 23 | + scan: |
| 24 | + name: Scan On Demand |
| 25 | + runs-on: ubuntu-latest |
| 26 | + permissions: |
| 27 | + contents: read |
| 28 | + |
| 29 | + steps: |
| 30 | + - name: Clean up previous run |
| 31 | + env: |
| 32 | + WORKSPACE: ${{ github.workspace }} |
| 33 | + run: | |
| 34 | + find "$WORKSPACE" -mindepth 1 -maxdepth 1 -exec rm -rf {} + |
| 35 | + rm -rf /tmp/trivy-* |
| 36 | +
|
| 37 | + - name: Checkout repository |
| 38 | + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 39 | + with: |
| 40 | + ref: ${{ inputs.branch }} |
| 41 | + fetch-depth: 0 |
| 42 | + persist-credentials: false |
| 43 | + |
| 44 | + - name: ShellCheck |
| 45 | + uses: ./.github/actions/analysis/shellcheck |
| 46 | + |
| 47 | + - name: zizmor Scan |
| 48 | + uses: ./.github/actions/analysis/zizmor |
| 49 | + |
| 50 | + - name: cppcheck |
| 51 | + uses: ./.github/actions/analysis/cppcheck |
| 52 | + |
| 53 | + # - name: Coverity Scan |
| 54 | + # uses: ./.github/actions/analysis/coverity |
| 55 | + # with: |
| 56 | + # coverity-url: ${{ secrets.COVERITY_URL }} |
| 57 | + # coverity-user: ${{ secrets.COVERITY_ARTIFACTORY_USER }} |
| 58 | + # coverity-password: ${{ secrets.COVERITY_ARTIFACTORY_PASSWORD }} |
| 59 | + |
| 60 | + - name: Trivy Scan |
| 61 | + uses: ./.github/actions/analysis/trivy |
| 62 | + |
| 63 | + - name: Upload scan reports |
| 64 | + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 |
| 65 | + if: always() |
| 66 | + with: |
| 67 | + name: DVLED-SW-TK-ScanOnDemand-${{ inputs.branch }}-${{ github.run_id }} |
| 68 | + path: ${{ github.workspace }}/reports/ |
| 69 | + retention-days: 30 |
0 commit comments