Skip to content

Commit 4b283bc

Browse files
committed
chore(actions): added SBOM scan
1 parent a868adc commit 4b283bc

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/scans.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: SBOM scans
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
release:
8+
types:
9+
- published
10+
11+
permissions:
12+
actions: read
13+
contents: write
14+
security-events: write
15+
16+
jobs:
17+
sbom:
18+
name: SBOM
19+
runs-on: ubuntu-22.04
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Generate
23+
uses: aquasecurity/[email protected]
24+
with:
25+
scan-type: 'fs'
26+
scan-ref: '.'
27+
format: 'github'
28+
output: 'dependency-results.sbom.json'
29+
github-pat: ${{ secrets.GITHUB_TOKEN }}
30+
- name: Scan
31+
uses: aquasecurity/[email protected]
32+
with:
33+
scan-type: 'fs'
34+
scan-ref: '.'
35+
format: 'sarif'
36+
output: 'trivy-results.sarif'
37+
github-pat: ${{ secrets.GITHUB_TOKEN }}
38+
- name: Upload report to GitHub
39+
uses: github/codeql-action/upload-sarif@v3
40+
with:
41+
sarif_file: 'trivy-results.sarif'
42+
- name: Upload SARIF artifact
43+
uses: actions/upload-artifact@v4
44+
with:
45+
path: 'trivy-results.sarif'
46+
name: sarif-report

0 commit comments

Comments
 (0)