1
0
mirror of https://github.com/tommytran732/Matrix.to-Docker synced 2024-11-22 10:01:34 -05:00

Add clair vulnerability scanner

Signed-off-by: Tommy <contact@tommytran.io>
This commit is contained in:
Tommy 2024-06-12 01:17:20 -07:00
parent 1a9dd596ed
commit 0924408ecd
Signed by: Tomster
GPG Key ID: 555C902A34EC968F

View File

@ -67,8 +67,8 @@ jobs:
env: env:
TAGS: ${{ steps.meta.outputs.tags }} TAGS: ${{ steps.meta.outputs.tags }}
scan: trivy:
name: Scan current image & report results name: Scan current image with Trivy
needs: build needs: build
permissions: permissions:
security-events: write security-events: write
@ -88,3 +88,24 @@ jobs:
uses: github/codeql-action/upload-sarif@v3 uses: github/codeql-action/upload-sarif@v3
with: with:
sarif_file: 'trivy-results.sarif' sarif_file: 'trivy-results.sarif'
category: trivy
clair:
name: Scan current image with Clair
needs: build
permissions:
security-events: write
runs-on: "ubuntu-latest"
steps:
- name: Run Clair vulnerability scanner
uses: quay/clair-action@main
with:
image-ref: 'ghcr.io/tommytran732/matrix.to'
format: sarif
output: clair_results.sarif
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'clair_results.sarif'
category: clair