Vulnerability scan #128
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 | |
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 |