Skip to content

Commit 8598589

Browse files
committed
chore: lots more tweaks
1 parent 48886b4 commit 8598589

7 files changed

Lines changed: 20 additions & 98 deletions

.github/workflows/demo-build-and-scan-docker-image.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66

77
env:
88
TRACKING_OPT_OUT: 'true'
9+
CDXGEN_DEBUG_MODE: 'debug' # recommended for more verbose output from cdxgen
910

1011
jobs:
1112
build-and-sbom:
@@ -27,12 +28,10 @@ jobs:
2728
run: npm install -g @cyclonedx/cdxgen
2829

2930
- name: Build Docker image
30-
run: |
31-
docker build -f ./ci/image.Dockerfile -t herodevs/eol-scan:local .
31+
run: docker build -f ./ci/demo.Dockerfile -t herodevs/demo-image:local .
3232

3333
- name: Generate SBOM for local Docker image
34-
run: |
35-
cdxgen -t docker -o sbom.json -r herodevs/eol-scan:local
34+
run: cdxgen -t docker -o sbom.json -r herodevs/demo-image:local
3635

3736
- name: Verify SBOM exists
3837
run: ls -l sbom.json
@@ -60,8 +59,7 @@ jobs:
6059
path: .
6160

6261
- name: Run EOL scan
63-
run: |
64-
npx @herodevs/cli@beta scan eol --file=sbom.json
62+
run: npx @herodevs/cli@beta scan eol --file=sbom.json
6563

6664
- name: Upload HD report
6765
uses: actions/upload-artifact@v4

.github/workflows/demo-docker-buildx-sbom-scan.yml

Lines changed: 0 additions & 73 deletions
This file was deleted.

.github/workflows/demo-scan-docker-image.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ permissions:
99

1010
env:
1111
TRACKING_OPT_OUT: 'true'
12+
CDXGEN_DEBUG_MODE: 'debug' # recommended for more verbose output from cdxgen
1213

1314
jobs:
1415
generate-sbom:
@@ -25,11 +26,10 @@ jobs:
2526
run: npm install -g @cyclonedx/cdxgen
2627

2728
- name: Pull Docker image
28-
run: docker pull ghcr.io/herodevs/eol-scan:latest
29+
run: docker pull mcr.microsoft.com/playwright:v1.50.0-noble
2930

3031
- name: Generate SBOM for Docker image
31-
run: |
32-
cdxgen -t docker -o sbom.json -r ghcr.io/herodevs/eol-scan:latest
32+
run: cdxgen -t docker -o sbom.json -r mcr.microsoft.com/playwright:v1.50.0-noble
3333

3434
- name: Upload SBOM artifact
3535
uses: actions/upload-artifact@v4
@@ -54,8 +54,7 @@ jobs:
5454
path: .
5555

5656
- name: Run EOL scan
57-
run: |
58-
npx @herodevs/cli@beta scan eol --file=sbom.json
57+
run: npx @herodevs/cli@beta scan eol --file=sbom.json
5958

6059
- name: Upload HD report
6160
uses: actions/upload-artifact@v4

.github/workflows/demo-scan-with-image.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,10 @@ jobs:
1818
ref: main
1919

2020
- name: Run EOL Scan with Docker
21-
run: |
22-
# Create output directory
23-
mkdir -p output
24-
25-
# Run container with volume mount to write report
26-
docker run --rm \
27-
-v ${{ github.workspace }}/output:/workspace \
28-
-w /workspace \
29-
ghcr.io/herodevs/eol-scan -s
21+
run: docker run -v "$PWD":/app ghcr.io/herodevs/eol-scan --save
3022

3123
- name: Upload artifact
3224
uses: actions/upload-artifact@v4
3325
with:
3426
name: my-eol-report
35-
path: output/herodevs.report.json
27+
path: ./herodevs.report.json

.github/workflows/demo-scan.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
node-version: '22'
2222

2323
- name: Run EOL Scan
24-
run: npx @herodevs/cli@beta
24+
run: npx @herodevs/cli@beta scan eol -s
2525

2626
- name: Upload artifact
2727
uses: actions/upload-artifact@v4
2828
with:
2929
name: my-eol-report
30-
path: herodevs.report.json
30+
path: ./herodevs.report.json

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ pnpm-lock.yaml
1212
**/tsconfig.tsbuildinfo
1313
.envrc
1414

15-
# Various SBOM Output Files
15+
# Various SBOM Test Output Files
1616
herodevs.report.json
1717
herodevs.sbom.json
18-
bom.json
18+
bom.json
19+
sbom.json

ci/demo.Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This image is used in the demo GitHub workflows to show a minimal docker image scan
2+
3+
FROM mcr.microsoft.com/playwright:v1.50.0-noble
4+
WORKDIR /app
5+
CMD ["node", "--version"]

0 commit comments

Comments
 (0)