Skip to content

Commit c037b25

Browse files
committed
Add GH workflow to generate SBOM with Trivy #1729
Signed-off-by: tdruez <[email protected]>
1 parent 9d41ad3 commit c037b25

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Generate SBOM with Trivy
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
generate-sbom:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Run Trivy in GitHub SBOM mode and submit results to Dependency Graph
19+
uses: aquasecurity/[email protected]
20+
with:
21+
scan-type: 'image'
22+
image-ref: 'python:3.13-slim'
23+
format: 'github'
24+
output: 'dependency-results.sbom.json'
25+
severity: "MEDIUM,HIGH,CRITICAL"
26+
scanners: "vuln"
27+
28+
- name: Upload trivy report as a Github artifact
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: trivy-sbom-report
32+
path: '${{ github.workspace }}/dependency-results.sbom.json'
33+
retention-days: 20 # 90 is the default

0 commit comments

Comments
 (0)