-
Notifications
You must be signed in to change notification settings - Fork 9
62 lines (50 loc) · 1.52 KB
/
demo-scan-docker-image.yml
File metadata and controls
62 lines (50 loc) · 1.52 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: (DEMO) HeroDevs CLI Scan Docker Image
on:
workflow_dispatch: {}
permissions:
packages: read
env:
TRACKING_OPT_OUT: 'true'
CDXGEN_DEBUG_MODE: 'debug' # recommended for more verbose output from cdxgen
jobs:
generate-sbom:
name: Generate SBOM From Docker Image
environment: demo
runs-on: ubuntu-latest
steps:
- name: Set up Node.js
uses: actions/setup-node@v6.1.0
with:
node-version-file: '.nvmrc'
- name: Install cdxgen
run: npm install -g @cyclonedx/cdxgen
- name: Pull Docker image
run: docker pull mcr.microsoft.com/playwright:v1.50.0-noble
- name: Generate SBOM for Docker image
run: cdxgen -t docker -o sbom.json -r mcr.microsoft.com/playwright:v1.50.0-noble
- name: Upload SBOM artifact
uses: actions/upload-artifact@v6
with:
name: cdxgen-sbom-json
path: sbom.json
scan-sbom:
name: Run HeroDevs EOL Scan
runs-on: ubuntu-latest
needs: generate-sbom
steps:
- name: Set up Node.js
uses: actions/setup-node@v6.1.0
with:
node-version-file: '.nvmrc'
- name: Download SBOM artifact
uses: actions/download-artifact@v8
with:
name: cdxgen-sbom-json
path: .
- name: Run EOL scan
run: npx @herodevs/cli scan eol --file=sbom.json --save
- name: Upload HD report
uses: actions/upload-artifact@v6
with:
name: herodevs-report
path: herodevs.report.json