Skip to content

Commit df289ab

Browse files
committed
ci: restore trivy security job
1 parent 345cb05 commit df289ab

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,30 @@ jobs:
103103
run: |
104104
safety check
105105
106+
security:
107+
runs-on: ubuntu-latest
108+
if: github.event_name != 'workflow_call'
109+
permissions:
110+
security-events: write
111+
contents: read
112+
steps:
113+
- uses: actions/checkout@v4
114+
115+
- name: Run Trivy vulnerability scanner
116+
uses: aquasecurity/trivy-action@master
117+
with:
118+
scan-type: 'fs'
119+
scan-ref: '.'
120+
format: 'sarif'
121+
output: 'trivy-results.sarif'
122+
severity: 'CRITICAL,HIGH'
123+
124+
- name: Upload Trivy scan results to GitHub Security tab
125+
uses: github/codeql-action/upload-sarif@v3
126+
if: always()
127+
with:
128+
sarif_file: 'trivy-results.sarif'
129+
106130
build:
107131
runs-on: ubuntu-latest
108132
needs: [test]

0 commit comments

Comments
 (0)