-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (27 loc) · 906 Bytes
/
snyk-sbom.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Snyk - Software Bill of Materials (SBOM)
on:
release:
types: [published]
jobs:
security:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup Node
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: '22.6.0'
- name: Install Snyk CLI
run: npm install -g snyk
- name: Generate SBOM
run: snyk sbom --format=cyclonedx1.5+json --all-projects > sbom.json
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- name: Upload SBOM
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: sbom.json
path: sbom.json
repo-token: ${{ secrets.GITHUB_TOKEN }}
content-type: application/json