@@ -136,6 +136,54 @@ jobs:
136136 ${{ steps.build-proxy.outputs.digest }}
137137 rm /tmp/cosign.key
138138
139+ - name : Install Syft
140+ run : |
141+ curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh \
142+ | sh -s -- -b /usr/local/bin
143+
144+
145+ - name : Generate SBOM + attest proxy
146+ run : |
147+ echo "${{ secrets.COSIGN_PRIVATE_KEY }}" > /tmp/cosign.key
148+ chmod 600 /tmp/cosign.key
149+
150+ syft ${{ steps.build-proxy.outputs.digest }} -o spdx-json > /tmp/sbom.spdx.json
151+
152+ COSIGN_PASSWORD="" cosign attest --yes \
153+ --key /tmp/cosign.key \
154+ --type spdxjson \
155+ --predicate /tmp/sbom.spdx.json \
156+ ${{ steps.build-proxy.outputs.digest }}
157+
158+ rm /tmp/cosign.key /tmp/sbom.spdx.json
159+
160+
161+ - name : Attest provenance proxy
162+ run : |
163+ echo "${{ secrets.COSIGN_PRIVATE_KEY }}" > /tmp/cosign.key
164+ chmod 600 /tmp/cosign.key
165+
166+ cat > /tmp/provenance.json << EOF
167+ {
168+ "buildType": "https://github.com/enclaive/garnet",
169+ "builder": {"id": "github-actions"},
170+ "invocation": {
171+ "configSource": {
172+ "uri": "git+https://github.com/enclaive/garnet",
173+ "digest": {"sha1": "${{ github.sha }}"}
174+ }
175+ }
176+ }
177+ EOF
178+
179+ COSIGN_PASSWORD="" cosign attest --yes \
180+ --key /tmp/cosign.key \
181+ --type slsaprovenance \
182+ --predicate /tmp/provenance.json \
183+ ${{ steps.build-proxy.outputs.digest }}
184+
185+ rm /tmp/cosign.key /tmp/provenance.json
186+
139187 # ── PYTHON CHECKS (pip-audit, ruff, mypy, trivy, bandit) ──
140188 python-checks :
141189 needs : [get-meta, build-proxy]
@@ -243,6 +291,53 @@ jobs:
243291 ${{ steps.build-webui.outputs.digest }}
244292 rm /tmp/cosign.key
245293
294+
295+ - name : Install Syft
296+ run : |
297+ curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh \
298+ | sh -s -- -b /usr/local/bin
299+
300+ - name : Generate SBOM + attest webui
301+ run : |
302+ echo "${{ secrets.COSIGN_PRIVATE_KEY }}" > /tmp/cosign.key
303+ chmod 600 /tmp/cosign.key
304+
305+ syft ${{ steps.build-webui.outputs.digest }} -o spdx-json > /tmp/sbom.spdx.json
306+
307+ COSIGN_PASSWORD="" cosign attest --yes \
308+ --key /tmp/cosign.key \
309+ --type spdxjson \
310+ --predicate /tmp/sbom.spdx.json \
311+ ${{ steps.build-webui.outputs.digest }}
312+
313+ rm /tmp/cosign.key /tmp/sbom.spdx.json
314+
315+ - name : Attest provenance webui
316+ run : |
317+ echo "${{ secrets.COSIGN_PRIVATE_KEY }}" > /tmp/cosign.key
318+ chmod 600 /tmp/cosign.key
319+
320+ cat > /tmp/provenance.json << EOF
321+ {
322+ "buildType": "https://github.com/enclaive/garnet",
323+ "builder": {"id": "github-actions"},
324+ "invocation": {
325+ "configSource": {
326+ "uri": "git+https://github.com/enclaive/garnet",
327+ "digest": {"sha1": "${{ github.sha }}"}
328+ }
329+ }
330+ }
331+ EOF
332+
333+ COSIGN_PASSWORD="" cosign attest --yes \
334+ --key /tmp/cosign.key \
335+ --type slsaprovenance \
336+ --predicate /tmp/provenance.json \
337+ ${{ steps.build-webui.outputs.digest }}
338+
339+ rm /tmp/cosign.key /tmp/provenance.json
340+
246341 # ── DEPLOY WEBUI ──────────────────────────────────────
247342 deploy-webui :
248343 needs : [get-meta, build-webui]
0 commit comments