Scheduled CVE vulnerability scan of published images. #34
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: vulnerability-scan-schedule | ||
run-name: Scheduled CVE vulnerability scan of published images. | ||
env: | ||
REGISTRY: ghcr.io | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
summary: | ||
description: 'Summary of the scheduled scan.' | ||
required: false | ||
default: 'Trivy CVE scan of published images for ${{ github.ref_name}}' | ||
Check failure on line 11 in .github/workflows/vulnerability-scan.yml GitHub Actions / vulnerability-scan-scheduleInvalid workflow file
|
||
jobs: | ||
setup-matrix: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- if: github.ref_name == '5.x' | ||
uses: druzsan/setup-matrix@v2 | ||
with: | ||
matrix: | | ||
images: ${{ vars.IMAGES }} | ||
exclude: | ||
- images: mailpit | ||
- if: github.ref_name != '5.x' | ||
uses: druzsan/setup-matrix@v2 | ||
with: | ||
matrix: | | ||
images: ${{ vars.IMAGES }} | ||
exclude: | ||
- images: mailpit | ||
- id: setup-matrix | ||
run: echo "matrix=$MATRIX" >> $GITHUB_OUTPUT | ||
outputs: | ||
matrix: ${{ steps.setup-matrix.outputs.matrix }} | ||
vulnerability-scan-schedule: | ||
runs-on: ubuntu-latest | ||
needs: setup-matrix | ||
strategy: | ||
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }} | ||
steps: | ||
- name: Set summary | ||
run: echo "summary=${{ github.event.inputs.summary }}" >> $GITHUB_STEP_SUMMARY | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.ref }} | ||
- name: Scan for vulnerabilities | ||
id: scan | ||
uses: crazy-max/ghaction-container-scan@v3 | ||
with: | ||
image: ${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.images }}:${{ github.ref_name }} | ||
dockerfile: ./images/${{ matrix.images }} | ||
- name: Upload SARIF file | ||
if: ${{ steps.scan.outputs.sarif != '' }} | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: ${{ steps.scan.outputs.sarif }} |