Skip to content

Commit

Permalink
ci: add trivy scan
Browse files Browse the repository at this point in the history
  • Loading branch information
c-seeger committed Mar 6, 2024
1 parent 538fb40 commit f6f739c
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/trivy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Trivy Scan

on:
schedule:
- cron: "45 17 * * *" # need to use UTC time here
workflow_dispatch:


jobs:
trivy_scan:
name: Trivy Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'docker.io/virtomize/mail2most:latest'
format: 'sarif'
output: 'trivy-results.sarif'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
if: always()
with:
sarif_file: 'trivy-results.sarif'

0 comments on commit f6f739c

Please sign in to comment.