Skip to content

publishing: refuse an unsigned release, attach SBOMs and provenance, and chant release verify (#4049) - #4082

Merged
lex00 merged 1 commit into
mainfrom
feat/4049-release-signing
Oct 18, 2026
Merged

lex00 merged 1 commit into
mainfrom
feat/4049-release-signing

Conversation

@lex00

@lex00 lex00 commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Closes #4049

Publishing checks the release's signature, attaches SBOMs and provenance to every target, and chant release verify checks a release offline. Stacked on #4048 (PR #4080); retargeted to main once that merges.

  • chant release publish refuses any release with no cut whose signature verifies against .chant/allowed_signers at base, with or without a release gate (release-unsigned, release-signature-unverified). --allow-unsigned publishes anyway with a warning, except under identity.gates.release. --require-provenance refuses a run with no OIDC token (publish-provenance-missing). Requirement 1 (cut signs with the releaser's key) was done by trust: signed green tags and run statements, a role for who may cut a release, signed release records #4031.
  • chant release verify <label|digest> [--json], offline: the release and its cuts from local chant/lifecycle, and .chant/allowed_signers with its signed history at the release's own commit, plus the release file's digest. A key added after the release's commit does not make an older release verify.
  • Every target attaches an in-toto Statement v1 (predicate https://intentius.io/chant/release/v1) over its digests, carrying the cut's ssh signature and whether the run had OIDC; no clock values, so a resumed run sends the same bytes. Attached in stage, before anything is visible.
  • npm: each package carries its SBOM at its root (sbom.spdx.json and the like, or the file sbom names), refused without one unless sbom: false. In CI provenance is npm's --provenance, and after the reveal the target runs npm audit signatures in an empty temp directory (publish-npm-audit-failed on failure). From a workstation the release signature is the only provenance, and the docs say so.
  • OCI: the SBOM and the statement are pushed by digest as referrers whose subject is the image. Forge: the SBOM and release.intoto.json go on the draft as assets. The SBOM for OCI and forge is the declared file, else one written from the nearest lockfile by the existing hermetic BOM writer.
  • chant's statement is not itself OIDC-signed; an OIDC-signed image attestation is left to CI (for example actions/attest-build-provenance), as the docs say.

Level-0 output changes

On the exceptions page, #2525 and CHANGELOG: publish refuses an unsigned or unverified release without a gate (--allow-unsigned and --require-provenance are new); new codes publish-provenance-missing, publish-sbom-missing, publish-sbom-invalid, publish-npm-audit-failed; an npm package without an SBOM is refused; OCI and forge targets attach two more items; in CI the npm reveal also runs npm install and npm audit signatures; output and --json gain the attachments; declarations take sbom; release verify is new.

Acceptance

  • chant release verify <version> passes for a signed release and fails for an unsigned one and for one signed by an unlisted key, with tests (release-verify.test.ts, release-verify.e2e.test.ts).
  • chant release publish refuses an unsigned release, with a test (release-publish.test.ts, release.e2e.test.ts, release-verify.e2e.test.ts).
  • SBOMs and provenance attached for npm and OCI targets, checked in CI with npm audit signatures for npm (publish-targets.test.ts "SBOMs and provenance (publishing: sign releases with the workstation key and attach SBOMs and provenance #4049)"; release-publish-targets.e2e.test.ts publishes a signed release CI-style with a fake npm, asserts the recorded audit signatures call, checks the image's referrers carry the SBOM and the signed statement, and that release verify passes).

Checks

  • npx tsx scripts/typecheck.ts: no regressions (26 baselined)
  • npx tsx scripts/check-lexicons.ts: no untracked tier-1 failures
  • publish, resume, release-publish, release-verify, release e2e, main, no-listener, no-egress, level-0 goldens: 242 passed with GITHUB_SHA, GITHUB_RUN_ID and CI set, after rebasing on publishing: resume after a failure without republishing, and all-or-nothing visibility #4048
  • lint-docs-sentences (no regressions), lint-prompts, check-docs-diataxis, ./scripts/build-docs.sh: pass
  • Nothing was published anywhere real; the real repository's chant/lifecycle was unchanged.

@lex00
lex00 changed the base branch from feat/4048-publish-resume to main October 18, 2026 04:00
…and chant release verify (#4049)

chant release publish now refuses a release none of whose cuts carries a
signature that verifies against .chant/allowed_signers at base
(release-unsigned, release-signature-unverified), where it refused one only
under identity.gates.release. --allow-unsigned publishes it with a warning
and never overrides the release gate. --require-provenance refuses a run
with no OIDC token (publish-provenance-missing).

Each target attaches an SBOM and the release's provenance statement when it
stages, so nothing is visible before they are attached. The statement is an
in-toto Statement v1 (predicate https://intentius.io/chant/release/v1) over
the target's digests that carries the cut's ssh signature and says whether
the run had OIDC. npm: each package carries its SBOM at its root
(publish-sbom-missing otherwise, unless sbom: false), npm's --provenance is
the provenance in CI, and the reveal runs npm install and npm audit
signatures in an empty directory (publish-npm-audit-failed). OCI: the SBOM
and the statement are pushed by digest as referrers of the image. Forge: both
go on the draft as assets. The OCI and forge SBOM is the file sbom names, or
sbom.spdx.json written from the member's lockfile with the hermetic BOM
writer, dated with the cut's time so a resume sends the same bytes.

chant release verify <label|digest> checks a release offline against
.chant/allowed_signers at the release's commit, with its signed history, as
workspace evidence verify reads the policy at a revision.

Tests use throwaway keys in temp repos, the fake npm (now with install and
audit signatures), the registry fake and the forge fake. Level-0 row and
changelog entry added.

(#4049)
@lex00
lex00 force-pushed the feat/4049-release-signing branch from 40b8d3d to 97d79ad Compare October 18, 2026 04:01
@lex00
lex00 merged commit 7283abc into main Oct 18, 2026
11 checks passed
@lex00
lex00 deleted the feat/4049-release-signing branch October 18, 2026 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

publishing: sign releases with the workstation key and attach SBOMs and provenance

1 participant