Daily Vulnerability Scan #425
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: Daily Vulnerability Scan | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '49 15 * * *' | |
env: | |
IMAGE_NAME: pgschk/alpine-toolkit | |
IMAGE_TAG: latest-extended | |
SEVERITY: 'CRITICAL,HIGH' | |
jobs: | |
scan: | |
permissions: | |
security-events: write | |
name: Daily Trivy Vulnerability Scan | |
runs-on: ubuntu-latest | |
steps: | |
- name: Run Trivy vulnerability scanner | |
uses: aquasecurity/trivy-action@0.29.0 | |
with: | |
image-ref: '${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}' | |
ignore-unfixed: true | |
vuln-type: 'os,library' | |
format: 'sarif' | |
output: 'trivy-results.sarif' | |
severity: ${{ env.SEVERITY }} | |
- name: Upload Trivy scan results to GitHub Security tab | |
uses: github/codeql-action/upload-sarif@v3 | |
if: always() | |
with: | |
sarif_file: 'trivy-results.sarif' |