Skip to content

Vulnerability scan #143

Vulnerability scan

Vulnerability scan #143

name: Vulnerability scan
on:
release:
types:
- published
schedule:
- cron: "0 1 * * 1"
workflow_dispatch:
jobs:
docker-image-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Docker image
uses: docker/build-push-action@v4
with:
load: true
tags: ${{ github.repository }}:vuln-check
cache-from: type=gha
cache-to: type=gha,mode=max
secrets: GHP_AUTH_TOKEN=${{ secrets.GITHUB_TOKEN }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
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@v2
with:
sarif_file: trivy-results.sarif