0pt's own "P007 pattern" release chain (added 2026-09-14) genuinely failed the ADR-W16-003 promotion bar an audit (2026-09-15) checked it against: syft/cosign installed via curl + a freshly-refetched checksums file (not a pinned, out-of-band-verified digest), no vulnerability scan of the built digest at all, cosign signed only the bare digest (no in-toto/SLSA statement, no source-SHA/build-identity/environment/SBOM-hash binding, no scoped key identity), and evidence committed straight back into this same mutable repo (siax/production-evidence/*.json, siax/source-bundles/*.json -- nine such commits already existed in this repo's history, deleted in this change). Delegates every bar item (1-7: pinned-tool install, SBOM, blocking vuln scan, in-toto attestation, scoped-key signing, pubkey verification, AUD0/ST0RE evidence storage) to sax3l/siax-templates' real, reviewed G17 reference implementation (PR #51, merged, pinned at 384e35060b91ea78ec045e14af114abf5d5eb23b), checked out at CI runtime via the SIAX_CI_TOKEN org secret this repo already had wired for a different cross-repo write -- picked over a vendored copy (the mechanism st0re/cl0ud/ api0 used) because 0pt has no prior vendoring convention anywhere in this repo. Matches aud0/h0st's own migrations for the same reason. See .siax/hooks/README.md for the full composition-mechanism rationale. .siax/hooks/G17.sh is the adapter: owns only 0pt-specific values (image repo, key identity, and a license-allowlist policy measured against 0pt's own real SBOM -- 280 components, one genuine new finding this pass caught that the old gate never checked at all: gcompat's NCSA license, triaged and allowed as the real OS-substrate license it is). cd.yml's own real signed-artifact wait/verify gate (predates this migration, genuinely 0pt-specific -- polls the registry for release.yml's artifact, verifies before triggering Coolify) is KEPT, updated from `cosign verify` (bare digest) to `cosign verify-attestation --type ...` to match the new attestation format `cosign attest` produces. A fresh cosign keypair was generated for this migration -- the previously committed cosign.pub had no corresponding private-key secret ever provisioned on this repo (the old release.yml's own comment confirms: "NOT YET SET on sax3l/0pt as of this writing"), so there was no real existing key material to carry forward. G20 (live-digest-equality) deliberately NOT wired in this pass: 0pt has no Coolify application provisioned and no /version endpoint for it to poll against -- see .siax/hooks/README.md "G20 -- deliberately not wired yet" for what would need to exist first. Verified for real during this migration (see PR description for the full evidence): a real image built from this repo's own Dockerfile, pushed to a local registry, SBOM'd (syft), scanned (trivy, 0 CRITICAL/HIGH findings), DSSE-attested (cosign attest) and verified (cosign verify-attestation) against the new cosign.pub, submitted to a mock AUD0 server enforcing the real eventInputSchema contract, plus three real tamper-rejection negative controls (wrong key, wrong predicate type, never-attested digest) against this exact artifact, plus the reference implementation's own 29/29-assertion selftest (including a real live check against production api.aud0.siax.io). Co-Authored-By: Claude Sonnet 5 <[email protected]>
.siax/hooks/ -- 0pt's G17 (signed-deploy gate) adapter
What this is
G17.sh in this directory is a thin adapter: it sets 0pt-specific
values (image repo, environment, key identity, license policy) and then
execs the real, reviewed reference implementation checked out at CI
runtime from sax3l/siax-templates (ci/v2/reference-hooks/G17.sh). This
repo does not own, fork, or duplicate any of the ADR-W16-003 bar-item logic
itself -- see G17.sh's own header for the full rationale and the audit
that motivated replacing 0pt's prior ad hoc gate.
Composition mechanism: pinned-commit checkout at CI runtime
.gitea/workflows/release.yml clones sax3l/siax-templates at a pinned
commit into a scratch directory before invoking .siax/hooks/G17.sh,
authenticated with the SIAX_CI_TOKEN org secret. This was chosen over a
vendored copy under .siax/hooks/vendor/ (the mechanism st0re, cl0ud
and api0 used for their own G17 migrations) because 0pt has no existing
vendored-copy convention anywhere in this repo -- confirmed by searching
.gitea/workflows/ and .siax/ for any prior "vendor" pattern before
choosing -- while it does already reference SIAX_CI_TOKEN with the
exact same git.siax.io authenticated-clone idiom this change reuses (the
now-deleted evidence-commit-push step in the old release.yml used the
identical x-access-token/oauth2 bearer pattern for a different
cross-repo write). Reusing a pattern this repo already has proof it can
authenticate with is a smaller, lower-risk change than introducing a new
vendoring convention for this alone. sax3l/aud0 and sax3l/h0st's own
G17 migrations independently reached the same conclusion for the same
reason.
Why not a uses: reusable workflow
Gitea Actions on this fleet resolves a called repository anonymously
regardless of the caller's own auth, so uses: sax3l/siax-templates/...@ref
404s against any private sax3l repo. See ci/shim/ci.yml in
siax-templates for the fuller writeup. Checkout-at-runtime with an
authenticated clone is the only mechanism that works against a private
template repo on this Gitea instance.
Pin status
Pinned to sax3l/siax-templates main at
384e35060b91ea78ec045e14af114abf5d5eb23b (2026-09-15) -- PR #51
(feat/g17-signed-deploy-gate-adr-w16-003) merged, plus follow-up fixes
#56/#57 (SPDX compound-license-expression evaluation, exercised live by
this adapter's own G17_LICENSE_ALLOW policy) and #59 (G20 retry logic;
not used by 0pt yet, see below). .gitea/workflows/release.yml's own
SIAX_TEMPLATES_PINNED_SHA step refuses to run if siax-templates main
has moved past this exact commit -- bumping the pin is a reviewed,
source-controlled diff to that one line, never a silent re-resolution.
G20 (live-digest-equality) -- deliberately not wired yet
The reference implementation's bar item 8 proxy (G20, "does the running
service's own /version endpoint report the sha that was actually signed")
needs two things 0pt does not have today, confirmed live before writing
this file:
- A provisioned Coolify application.
.gitea/workflows/cd.yml's own guard step already fails closed on a literalCOOLIFY_APP_IDplaceholder -- 0pt has never been deployed to the fleet. - A
/version(or equivalent) endpoint.app/api/hashealth/andready/routes but no route reporting a build SHA, and the Dockerfile declares noARG GIT_SHA/ARG BUILD_TIMEto bake one in.
Wiring G20 against nothing live would be decorative, not a real check --
the exact anti-pattern this whole migration replaces. Once both exist
(Simon provisions the Coolify app; a follow-up adds a /api/version route
and the Dockerfile ARGs, the same small change h0st's own migration
made), copy G20.sh + its own single-job .gitea/workflows/ g20-live-verify.yml from h0st or aud0's repo as the starting point --
as its own workflow file, not a second job appended to cd.yml: Gitea
1.26 on this fleet resolves org-level secrets (SIAX_CI_TOKEN,
AUD0_INGEST_TOKEN) only for the first job of a multi-job workflow
file (learned the hard way on h0st's and aud0's own migrations).
Required secrets (not yet set on sax3l/0pt as of this migration)
Same prerequisite every prior migration needed before its release.yml
went green:
REGISTRY_USER/REGISTRY_TOKEN--git.cloud.siax.iopush (already required by the OLD release.yml too; unchanged).COSIGN_PRIVATE_KEY/COSIGN_PASSWORD-- the private half of this repo'scosign.pub. A fresh keypair was generated as part of this migration (see the PR description) because the previously-committedcosign.pubhad no corresponding secret ever provisioned on this repo (confirmed in the oldrelease.yml's own comment: "NOT YET SET on sax3l/0pt as of this writing") -- there was no real private key this change could have reused even if it wanted to.AUD0_INGEST_TOKEN/AUD0_TENANT_ID-- new requirement vs. the old gate (which never wrote to AUD0 at all). Needs asiax-svc-g17workload-identity client provisioned in Zitadel, same open item every prior migration recorded (seeG17-ADR-W16-003.md"What this pass could not test against production, and why" insiax-templates).SIAX_CI_TOKEN-- already exists on this repo (used previously for the now-deleted evidence-commit push); reused here for thesiax-templatescheckout.
Until these are set, release.yml fails closed on its first real run --
same honest behaviour as the gate it replaces, and the same prerequisite
cl0ud/st0re/aud0/api0/h0st each had before their own release.yml
went green.