Skip to content

Commit

Permalink
ci: add schedule for trivy scans
Browse files Browse the repository at this point in the history
  • Loading branch information
dklimpel committed Jul 4, 2024
1 parent b8ff782 commit 27fa562
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/docker-goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
platforms: ${{ env.PLATFORMS }}

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
uses: aquasecurity/trivy-action@0.23.0
with:
image-ref: ghcr.io/${{ github.repository_owner }}/goss:master
format: "sarif"
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/trivy-schedule.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Trivy Code Scanning

on:
schedule:
- cron: "0 3 * * 5"
workflow_dispatch:

jobs:
trivy-scan:
name: Trivy scan
runs-on: ubuntu-latest
permissions:
packages: read
security-events: write

steps:
- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
with:
image-ref: ghcr.io/${{ github.repository_owner }}/goss:latest
format: "sarif"
output: "trivy-results.sarif"

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: "trivy-results.sarif"

0 comments on commit 27fa562

Please sign in to comment.