Skip to content

Commit

Permalink
ci: add trivy to ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nobbs committed Jul 18, 2024
1 parent 9f307f0 commit 7fc3033
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,38 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

trivy:
runs-on: ubuntu-latest

permissions:
contents: read
security-events: write
actions: read

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod

- name: Download Go modules
run: go mod download

- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@0.24.0
with:
scan-type: "fs"
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"

build:
runs-on: ubuntu-latest

Expand Down

0 comments on commit 7fc3033

Please sign in to comment.