Skip to content

Add gated Production release approvals - #1683

Draft
w3irdrobot wants to merge 2 commits into
masterfrom
codex-sigprod-maple
Draft

w3irdrobot wants to merge 2 commits into
masterfrom
codex-sigprod-maple

Conversation

@w3irdrobot

@w3irdrobot w3irdrobot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What this adds

opensecret-release-statement-prod.yml, the Production sibling of the Dev release-statement workflow. One reviewer-gated job in pcr-signing-prod, started with a build run ID, makes both the legacy PCR0 signature and the Sigstore release statement for the same verified artifact, publishes the bundle to attestations.maple.ai, verifies it from the public URL, and proposes the legacy approval branch.

Read this first: what merging changes for Production

Merging removes the Production sign job from opensecret-eif-release.yml right away, and the new workflow refuses to run until its placeholders are filled in. The Production KMS key ARN, signer role ARN and public key are placeholders here, and the preflight stops on them. Between merge and that follow-up commit, the only way to approve a Production build is the manual just update-pcr-prod recipe, which signs the legacy format only.

So either merge after the Production signing resources exist, or accept the manual path in between.

Order matters when filling them in: create and protect the pcr-signing-prod environment before the commit that fills the placeholders. GitHub creates an unprotected environment for a workflow that names one that does not exist.

What else changes

  • Each environment refuses the other's evidence. A build or handoff made for dev cannot be signed by the Production workflow, and the reverse. The preflight also refuses a Production identity filled in with Dev's key ARN or public key, and the reverse.
  • Signing an older build no longer moves the current snapshot. ci_sign_pcr.sh used to copy the signed build's pcr.json over pcrDev.json or pcrProd.json every time. Now a build whose EIF inputs differ from the checkout's is treated as older: it gets its release statement, and a history entry if one is missing, and the snapshot is left alone. The log and step summary say which way it was classified and which paths decided it, and a history-only approval does not print the deployment hand-off. The classifier is deliberately wide: calling a current build older costs a rebuild; calling an older build current would set the snapshot back.
  • Settings are checked before anything is signed. The preflight checks the bucket and account ID variables, and the publisher credential is resolved before the signing steps (still handed only to the publish step). The Dev workflow gets the same order, so the two files differ only where they must; a test compares them as parsed YAML.
  • Reruns work. Running again for a build that already has a bundle replaces that object and re-verifies it. It never removes another build's bundle.
  • The unused dry_run input on opensecret-eif-release.yml goes away with the sign job; nothing in the repository passed it.
  • CI: the repo lane now runs the signing tests, with their tools declared in scripts/ci/signing-test-tools.nix.
  • Docs: release-statements.md, nitro-deploy.md, pcr-compatibility.md and the secretspec README describe the process for both environments.

How to read it

One commit, 22 files. Suggested order:

  1. .github/workflows/opensecret-release-statement-prod.yml, next to the Dev file.
  2. .github/workflows/opensecret-eif-release.yml: the removed sign job.
  3. services/opensecret/scripts/ci_sign_pcr.sh and scripts/ci/opensecret_change_detection.py: the older-build decision.
  4. scripts/ci/opensecret_release_statement.py and scripts/ci/publish_opensecret_approval.sh: preflight and publish.
  5. services/opensecret/docs/release-statements.md: the operator's view.

About 370 lines are scripts/ci/test_opensecret_legacy_signing.py, which runs the real signing script against small Git histories.

Not checked

  • Nothing here has run on a hosted runner or against a real key, bucket or Bitwarden. All signing in tests uses throwaway keys with the network cut off. The first real Production run is the first real test of the environment's settings.
  • The Cloudflare account ID is checked for format only. A well-formed wrong ID passes the preflight and fails at upload, after signing.
  • What the Bitwarden action does with an empty item ID was not observed.
  • The Dev workflow's last step now runs inside the signing shell; that change has not been seen on a hosted runner either.
  • Builds made before handoff.json was listed in SHA256SUMS are still refused.

AI assistance was used to write and review this change.

🤖 Generated with Claude Code


Proof this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

w3irdrobot and others added 2 commits November 25, 2026 01:13
Production legacy signing moves from the EIF build workflow to the Production
release statement workflow. Build and attest the selected environment first,
then dispatch its approval workflow with that successful build run ID. One
protected approval signs both formats and verifies public publication before
proposing the legacy approval branch.

Create and protect pcr-signing-prod before filling its identity placeholders.
Until it is configured, Production CI approvals and release statements are
unavailable; the existing manual update-pcr-prod recipe remains available.

Older artifacts add missing history without replacing current measurements.
Logs name that classification and omit the current-release deployment handoff
for history-only approvals. Public storage settings are checked and publisher
credentials are resolved before signing, and each environment refuses the
other's signing key.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The signer checks commit ancestry and EIF input differences. Give the
operator fixture a repository and a real source commit so it reaches
the credential and signature checks. Keep its classifier stand-in
restricted to the empty diff used by this current-build scenario.

Assert checksum and environment refusal reasons in the sibling test
to prevent unrelated setup failures from satisfying negative cases.

This branch has not been deployed

No deployments
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.

1 participant