Skip to content

Commit 85411f7

Browse files
committed
chore(sbom): upload cyclonedx
1 parent 791facf commit 85411f7

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/scans.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ permissions:
1212
actions: read
1313
contents: write
1414
security-events: write
15+
packages: write
1516

1617
jobs:
1718
sbom:
@@ -35,7 +36,21 @@ jobs:
3536
format: 'sarif'
3637
output: 'trivy-results.sarif'
3738
github-pat: ${{ secrets.GITHUB_TOKEN }}
38-
- name: Upload report to GitHub
39+
- name: Upload
3940
uses: github/codeql-action/upload-sarif@v3
4041
with:
4142
sarif_file: 'trivy-results.sarif'
43+
- name: Generate SBOM
44+
if: startsWith(github.ref, 'refs/tags/')
45+
uses: aquasecurity/[email protected]
46+
with:
47+
scan-type: 'fs'
48+
scan-ref: '.'
49+
format: cyclonedx
50+
output: sbom.cdx.json
51+
- name: Attach SBOM
52+
if: startsWith(github.ref, 'refs/tags/')
53+
env:
54+
GH_TOKEN: ${{ github.token }}
55+
run: |
56+
gh release upload ${{ github.ref_name }} sbom.cdx.json

0 commit comments

Comments
 (0)