Skip to content

Commit a782add

Browse files
authored
Updates SBOM generation (#3200)
* Updates SBOM generation * Fix pinning
1 parent 791d0a8 commit a782add

2 files changed

Lines changed: 82 additions & 69 deletions

File tree

.github/workflows/sbom.yaml

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

.github/workflows/sboms.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Generated by `sbomify-action wizard`. Re-run the wizard to update.
2+
# sbomify-action wizard v1
3+
name: sboms
4+
on:
5+
push:
6+
tags: ['v*']
7+
workflow_dispatch:
8+
jobs:
9+
sbom:
10+
name: ${{ matrix.name }}
11+
runs-on: ubuntu-latest
12+
permissions:
13+
id-token: write # required to mint the GitHub OIDC JWT
14+
contents: read
15+
attestations: write
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
include:
20+
- name: anthias-javascript
21+
component_name: Anthias - JavaScript
22+
component_id: LCkvzm8qaL
23+
lockfile: bun.lock
24+
sbom_format: cyclonedx
25+
output_file: anthias-javascript.cdx.json
26+
- name: anthias-python
27+
component_name: Anthias - Python
28+
component_id: Vhc4zm8pdV
29+
lockfile: uv.lock
30+
sbom_format: cyclonedx
31+
output_file: anthias-python.cdx.json
32+
- name: anthias-marketing-site
33+
component_name: Anthias - Marketing Site
34+
component_id: DAAUcQBwTx6P
35+
lockfile: website/bun.lock
36+
sbom_format: cyclonedx
37+
output_file: anthias-marketing-site.cdx.json
38+
steps:
39+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
40+
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
41+
with:
42+
path: .sbomify-cache
43+
key: sbomify-${{ runner.os }}
44+
- id: ver
45+
run: |
46+
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
47+
echo "v=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
48+
else
49+
echo "v=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
50+
fi
51+
- uses: sbomify/sbomify-action@ac8b0d423c90447f3011ef8ab5f9ff2e854c6931 # v26.2.0
52+
env:
53+
COMPONENT_ID: ${{ matrix.component_id }}
54+
COMPONENT_NAME: ${{ matrix.component_name }}
55+
COMPONENT_VERSION: ${{ steps.ver.outputs.v }}
56+
LOCK_FILE: ${{ matrix.lockfile }}
57+
UPLOAD: 'true'
58+
AUGMENT: 'true'
59+
ENRICH: 'true'
60+
SBOM_FORMAT: ${{ matrix.sbom_format }}
61+
OUTPUT_FILE: ${{ matrix.output_file }}
62+
API_BASE_URL: https://app.sbomify.com
63+
SBOMIFY_CACHE_DIR: ${{ github.workspace }}/.sbomify-cache
64+
SYFT_CACHE_DIR: ${{ github.workspace }}/.sbomify-cache/syft
65+
PRODUCT_RELEASE: '["HQRDDqHBiQH5:${{ steps.ver.outputs.v }}"]'
66+
# ---------------------------------------------------------------------
67+
# Build-provenance attestation (SLSA v1)
68+
# ---------------------------------------------------------------------
69+
# Where this step is supported:
70+
# * Public repository on any GitHub plan (Free, Pro, Team, Enterprise)
71+
# — uses the public-good Sigstore instance (Fulcio + Rekor public log).
72+
# * Private / internal repository on GitHub Enterprise Cloud
73+
# — uses GitHub's private Sigstore instance (scoped to the repo).
74+
# Where it is NOT supported and the workflow will fail:
75+
# * Private / internal repository on GitHub Free, Pro, or Team.
76+
# * Any repository on GitHub Enterprise Server (self-hosted).
77+
# If you hit one of the unsupported configurations, either upgrade to
78+
# GitHub Enterprise Cloud, make the repo public, or remove this step.
79+
# Reference: https://github.com/actions/attest-build-provenance
80+
- uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
81+
with:
82+
subject-path: '${{ github.workspace }}/${{ matrix.output_file }}'

0 commit comments

Comments
 (0)