Skip to content

Commit b6d25cb

Browse files
authored
NO-JIRA: add(gha): trivy security scanning of filesystem sources (#1324)
1 parent 480f20a commit b6d25cb

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/security.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# https://github.com/ruivieira/trustyai-explainability-python/blob/main/.github/workflows/security.yaml
2+
---
3+
name: Security
4+
"on":
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
workflow_dispatch:
10+
jobs:
11+
build:
12+
name: Trivy scan (fs)
13+
runs-on: ubuntu-24.04
14+
permissions:
15+
contents: read
16+
security-events: write
17+
steps:
18+
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Trivy scan
23+
uses: aquasecurity/trivy-action@dc5a429b52fcf669ce959baa2c2dd26090d2a6c4 # 0.32.0
24+
with:
25+
scan-type: 'fs'
26+
format: 'sarif'
27+
output: 'trivy-results.sarif'
28+
severity: 'MEDIUM,HIGH,CRITICAL'
29+
exit-code: '0'
30+
ignore-unfixed: false
31+
32+
- name: Update Security tab
33+
uses: github/codeql-action/upload-sarif@v3
34+
with:
35+
sarif_file: 'trivy-results.sarif'

0 commit comments

Comments
 (0)