@@ -124,14 +124,23 @@ jobs:
124
124
nydusify check --target ${{ steps.meta.outputs.tags }}-nydus
125
125
if : github.ref == 'refs/heads/master'
126
126
continue-on-error : true
127
+ - name : save private key to file
128
+ run : |
129
+ echo $SBOM_SIGN_PRIVATE_KEY_DATA > private.key
130
+ env :
131
+ SBOM_SIGN_PRIVATE_KEY_DATA : ${{ secrets.SBOM_SIGN_PRIVATE_KEY }}
127
132
- name : Attach cdx sbom
128
133
run : |
129
134
corepack pnpm install --config.strict-dep-builds=true --package-import-method copy --frozen-lockfile
130
135
node bin/cdxgen.js -t docker -o cdxgen-oci-image.cdx.json ghcr.io/cyclonedx/cdxgen:latest
136
+ node bin/verify.js -i cdxgen-oci-image.cdx.json --public-key contrib/bom-signer/public.key
131
137
oras attach --artifact-type sbom/cyclonedx ghcr.io/cyclonedx/cdxgen:latest ./cdxgen-oci-image.cdx.json:application/json
132
138
oras discover --format tree ghcr.io/cyclonedx/cdxgen:latest
133
139
continue-on-error : true
134
140
if : startsWith(github.ref, 'refs/tags/')
141
+ env :
142
+ SBOM_SIGN_ALGORITHM : ${{ secrets.SBOM_SIGN_ALGORITHM }}
143
+ SBOM_SIGN_PRIVATE_KEY : private.key
135
144
- name : Attach cdx sbom to release
136
145
uses : softprops/action-gh-release@v2
137
146
if : startsWith(github.ref, 'refs/tags/')
@@ -174,14 +183,23 @@ jobs:
174
183
push : true
175
184
tags : ${{ steps.meta2.outputs.tags }}
176
185
labels : ${{ steps.meta2.outputs.labels }}
186
+ - name : save private key to file
187
+ run : |
188
+ echo $SBOM_SIGN_PRIVATE_KEY_DATA > private.key
189
+ env :
190
+ SBOM_SIGN_PRIVATE_KEY_DATA : ${{ secrets.SBOM_SIGN_PRIVATE_KEY }}
177
191
- name : Attach cdx sbom
178
192
run : |
179
193
corepack pnpm install --config.strict-dep-builds=true --package-import-method copy --frozen-lockfile
180
194
node bin/cdxgen.js -t docker -o cdxgen-secure-oci-image.cdx.json ghcr.io/cyclonedx/cdxgen-secure:latest
195
+ node bin/verify.js -i cdxgen-secure-oci-image.cdx.json --public-key contrib/bom-signer/public.key
181
196
oras attach --artifact-type sbom/cyclonedx ghcr.io/cyclonedx/cdxgen-secure:latest ./cdxgen-secure-oci-image.cdx.json:application/json
182
197
oras discover --format tree ghcr.io/cyclonedx/cdxgen-secure:latest
183
198
continue-on-error : true
184
199
if : startsWith(github.ref, 'refs/tags/')
200
+ env :
201
+ SBOM_SIGN_ALGORITHM : ${{ secrets.SBOM_SIGN_ALGORITHM }}
202
+ SBOM_SIGN_PRIVATE_KEY : private.key
185
203
- name : Attach cdx secure sbom to release
186
204
uses : softprops/action-gh-release@v2
187
205
if : startsWith(github.ref, 'refs/tags/')
@@ -235,14 +253,23 @@ jobs:
235
253
push : true
236
254
tags : ${{ steps.meta2.outputs.tags }}
237
255
labels : ${{ steps.meta2.outputs.labels }}
256
+ - name : save private key to file
257
+ run : |
258
+ echo $SBOM_SIGN_PRIVATE_KEY_DATA > private.key
259
+ env :
260
+ SBOM_SIGN_PRIVATE_KEY_DATA : ${{ secrets.SBOM_SIGN_PRIVATE_KEY }}
238
261
- name : Attach cdx sbom
239
262
run : |
240
263
corepack pnpm install --config.strict-dep-builds=true --package-import-method copy --frozen-lockfile
241
264
node bin/cdxgen.js -t docker -o cdxgen-deno-oci-image.cdx.json ghcr.io/cyclonedx/cdxgen-deno:latest
265
+ node bin/verify.js -i cdxgen-deno-oci-image.cdx.json --public-key contrib/bom-signer/public.key
242
266
oras attach --artifact-type sbom/cyclonedx ghcr.io/cyclonedx/cdxgen-deno:latest ./cdxgen-deno-oci-image.cdx.json:application/json
243
267
oras discover --format tree ghcr.io/cyclonedx/cdxgen-deno:latest
244
268
continue-on-error : true
245
269
if : startsWith(github.ref, 'refs/tags/')
270
+ env :
271
+ SBOM_SIGN_ALGORITHM : ${{ secrets.SBOM_SIGN_ALGORITHM }}
272
+ SBOM_SIGN_PRIVATE_KEY : private.key
246
273
- name : Attach cdx deno sbom to release
247
274
uses : softprops/action-gh-release@v2
248
275
if : startsWith(github.ref, 'refs/tags/')
@@ -342,14 +369,23 @@ jobs:
342
369
push : true
343
370
tags : ${{ steps.meta5.outputs.tags }}
344
371
labels : ${{ steps.meta5.outputs.labels }}
372
+ - name : save private key to file
373
+ run : |
374
+ echo $SBOM_SIGN_PRIVATE_KEY_DATA > private.key
375
+ env :
376
+ SBOM_SIGN_PRIVATE_KEY_DATA : ${{ secrets.SBOM_SIGN_PRIVATE_KEY }}
345
377
- name : Attach cdx sbom
346
378
run : |
347
379
corepack pnpm install --config.strict-dep-builds=true --package-import-method copy --frozen-lockfile
348
380
node bin/cdxgen.js -t docker -o cdxgen-bun-oci-image.cdx.json ghcr.io/cyclonedx/cdxgen-bun:latest
381
+ node bin/verify.js -i cdxgen-bun-oci-image.cdx.json --public-key contrib/bom-signer/public.key
349
382
oras attach --artifact-type sbom/cyclonedx ghcr.io/cyclonedx/cdxgen-bun:latest ./cdxgen-bun-oci-image.cdx.json:application/json
350
383
oras discover --format tree ghcr.io/cyclonedx/cdxgen-bun:latest
351
384
continue-on-error : true
352
385
if : startsWith(github.ref, 'refs/tags/')
386
+ env :
387
+ SBOM_SIGN_ALGORITHM : ${{ secrets.SBOM_SIGN_ALGORITHM }}
388
+ SBOM_SIGN_PRIVATE_KEY : private.key
353
389
- name : Attach cdx bun sbom to release
354
390
uses : softprops/action-gh-release@v2
355
391
if : startsWith(github.ref, 'refs/tags/')
0 commit comments