mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-02-14 18:29:52 +00:00
Merge pull request #398 from stefanprodan/govulncheck
Run CVE scan with govulncheck
This commit is contained in:
24
.github/workflows/cve-scan.yml
vendored
24
.github/workflows/cve-scan.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user