File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 environment : demo
1414 runs-on : ubuntu-latest
1515 steps :
16+ - name : Checkout repo
17+ uses : actions/checkout@v4
18+ with :
19+ ref : main
20+
1621 - name : Set up Node.js
1722 uses : actions/setup-node@v4
1823 with :
2833 - name : Generate SBOM for local Docker image
2934 run : |
3035 cdxgen -t docker -o sbom.json -r herodevs/eol-scan:local
36+
37+ - name : Verify SBOM exists
38+ run : ls -l sbom.json
3139
3240 - name : Upload SBOM artifact
3341 uses : actions/upload-artifact@v4
5967 uses : actions/upload-artifact@v4
6068 with :
6169 name : herodevs-report
62- path : herodevs.report.json
70+ path : ./ herodevs.report.json
Original file line number Diff line number Diff line change 99
1010jobs :
1111 build-and-sbom :
12- name : Build Docker image & Generate SBOM
13- environment : demo
12+ name : Build Docker Image & Generate SBOM
1413 runs-on : ubuntu-latest
14+ environment : demo
1515 steps :
16+ # Checkout the repo
17+ - name : Checkout repo
18+ uses : actions/checkout@v4
19+ with :
20+ ref : main
21+
22+ # Set up Node.js
1623 - name : Set up Node.js
1724 uses : actions/setup-node@v4
1825 with :
@@ -21,28 +28,26 @@ jobs:
2128 - name : Set up Docker Buildx
2229 uses : docker/setup-buildx-action@v3
2330
24- - name : Enable BuildKit experimental features
25- run : |
26- export DOCKER_CLI_EXPERIMENTAL=enabled
27-
28- - name : Build Docker image and generate SBOM
31+ - name : Build Docker image with SBOM
2932 run : |
3033 docker buildx build \
31- --file ./ ci/image.Dockerfile \
34+ --file ci/image.Dockerfile \
3235 --tag herodevs/eol-scan:local \
33- --sbom=type=cyclonedx,output=sbom.json \
3436 --platform linux/amd64 \
35- --load \
36- .
37+ --sbom=type=cyclonedx,output=sbom.json \
38+ --load
39+
40+ - name : Verify SBOM
41+ run : ls -l sbom.json
3742
3843 - name : Upload SBOM artifact
3944 uses : actions/upload-artifact@v4
4045 with :
41- name : docker-buildx -sbom-json
46+ name : cdxgen -sbom-json
4247 path : sbom.json
4348
4449 scan-sbom :
45- name : Run HD Scan
50+ name : Run HeroDevs EOL Scan
4651 runs-on : ubuntu-latest
4752 needs : build-and-sbom
4853 steps :
5459 - name : Download SBOM artifact
5560 uses : actions/download-artifact@v4
5661 with :
57- name : docker-buildx -sbom-json
62+ name : cdxgen -sbom-json
5863 path : .
5964
6065 - name : Run EOL scan
Original file line number Diff line number Diff line change @@ -12,17 +12,24 @@ jobs:
1212 runs-on : ubuntu-latest
1313 environment : demo
1414 steps :
15- - uses : actions/checkout@v4
15+ - name : Checkout repository
16+ uses : actions/checkout@v4
1617 with :
1718 ref : main
1819
1920 - name : Run EOL Scan with Docker
20- uses : docker://ghcr.io/herodevs/eol-scan
21- with :
22- args : " -s"
23-
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
30+
2431 - name : Upload artifact
2532 uses : actions/upload-artifact@v4
2633 with :
2734 name : my-eol-report
28- path : herodevs.report.json
35+ path : output/ herodevs.report.json
You can’t perform that action at this time.
0 commit comments