Skip to content

Vulnerability scan #126

Vulnerability scan

Vulnerability scan #126

name: Vulnerability scan
on:
release:
types:
- published
schedule:
- cron: "0 5 * * 1"
workflow_dispatch:
jobs:
docker-image-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v6
with:
load: true
tags: ${{ github.repository }}:vuln-check
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.22.0
with:
image-ref: ${{ github.repository }}:vuln-check
format: sarif
output: trivy-results.sarif
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: trivy-results.sarif