Run CVE scan with govulncheck

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan
2025-05-15 09:35:42 +03:00
parent 2927336ecd
commit cd555cf439
2 changed files with 9 additions and 17 deletions

View File

@@ -1,31 +1,23 @@
name: cve-scan
on:
workflow_dispatch:
push:
branches:
- "master"
pull_request:
branches:
- "master"
permissions:
contents: read
jobs:
trivy:
govulncheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build image
id: build
run: |
IMAGE=test/podinfo:${GITHUB_SHA}
docker build -t ${IMAGE} .
echo "image=$IMAGE" >> $GITHUB_OUTPUT
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@v0.30.0
with:
image-ref: ${{ steps.build.outputs.image }}
format: table
exit-code: "1"
ignore-unfixed: true
vuln-type: os,library
severity: CRITICAL,HIGH
- name: Vulnerability scan
id: govulncheck
uses: golang/govulncheck-action@v1

View File

@@ -25,7 +25,7 @@ Specifications:
* Multi-arch container image with Docker buildx and GitHub Actions
* Container image signing with Sigstore cosign
* SBOMs and SLSA Provenance embedded in the container image
* CVE scanning with Trivy
* CVE scanning with govulncheck
Web API: