Skip to content

Commit 914ecee

Browse files
committed
new workflow added
1 parent dc51916 commit 914ecee

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Generate SBOM with Trivy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
jobs:
13+
generate-sbom:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Run Trivy to generate SBOM
21+
uses: aquasecurity/trivy-action@master
22+
with:
23+
scan-type: 'fs'
24+
format: 'spdx-json'
25+
output: 'sbom-spdx.json'
26+
27+
- name: Upload SBOM as artifact
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: sbom-spdx
31+
path: sbom-spdx.json
32+
retention-days: 30

0 commit comments

Comments
 (0)