Repository navigation
Sign and publish Dev enclave release statements - #1636
Draft
w3irdrobot wants to merge 8 commits into
Draft
w3irdrobot wants to merge 8 commits into
w3irdrobot wants to merge 8 commits into
Conversation
Add opensecret-release-statement-dev.yml: one reviewer-gated job in the pcr-signing-dev environment that takes a build run ID, verifies the selected OpenSecret EIF release build (master dispatch, success, commit in master history, the run's own artifact, GitHub build provenance covering image.eif, pcr.json and handoff.json, and a dev handoff that matches the EIF and measurements), then signs both approvals for that artifact under the same review: the legacy PCR0 signature with the existing key and an in-toto release statement with the Dev KMS key through pinned Cosign v3.1.4 and an explicit Rekor v2 plus timestamp signing configuration. The bundle must meet the release evidence profile (v0.3, one Rekor v2 hashedrekord entry with inclusion proof and checkpoint, one RFC 3161 timestamp, no integrated time, inclusion promise or v1 entry) and pass Cosign verification against the reviewed public key before it is retained with the EIF, uploaded to maple-attestations-dev as <PCR0>.json and read back from attestations-dev.maple.ai. AWS access is the job's OIDC token exchanged for the Dev signer role, confined to the Cosign process. The key ARN, role ARN and reviewed public key are placeholders until the signing resources exist; the job refuses to start, and the signing code refuses to call Cosign, until they are filled in. The build script now includes handoff.json in SHA256SUMS so its build mode and source are attested. The release workflow signs only prod, so Dev is never signed twice. The approval branch script accepts an earlier build commit approved from a newer master checkout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…file The PR EIF rootfs check compared SHA256SUMS with the old two-file format, so every candidate built with the attested handoff would fail it. It now requires the build script's exact three-file output and the handoff's exact fields. Its tests, the release statement tests and the approval branch tests now take their artifacts from the real build script rather than hand-built copies, and the legacy signer's checksum command is run against that output. The release bundle profile now requires integratedTime to be absent rather than accepting a present zero, and requires every log entry, inclusion proof, checkpoint, envelope, signature and timestamp object to carry exactly the fields Cosign writes. The Dev workflow uses one environment-scoped BWS token, OPENSECRET_PCR_SIGNING_BWS_ACCESS_TOKEN, for both the legacy key and the Dev publisher credential. The docs list every secret, variable and committed value the workflow needs, and say the 90-day workflow artifact is not durable rollback retention. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
check_bundle_profile ran five separate contracts in one function. It now reads as the profile's outline and calls one helper per section: the DSSE envelope, the log entry, its inclusion proof and checkpoint, the logged hashedrekord body and the RFC 3161 timestamp. Every check keeps its message and its place in the order, so the first failing check is the same for any bundle. The unused services argument is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
prepare, sign and publish each did several jobs inline. The artifact download, the KMS signing step (OIDC token file, signer-only environment, key comparison, attest-blob) and the public readback retry are now named helpers, called at the same points. Size limits carry a _BYTES unit and the bare 97, 4096 and 4 have names; the Cosign URL uses COSIGN_VERSION. target() becomes target_for() so the looked-up target can be called target, and publish loses its sleep argument, which only duplicated the READBACK_DELAY seam the tests already patch. Outputs, receipts, summaries, tool calls and every error message are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each bundle mutation now sits under its name, grouped by the profile section it breaks, instead of 38 underscore functions and a dense table. make_bundle names its fake signature, checkpoint and timestamp bytes and lays the bundle out one level per line; the bundles it builds are byte-identical to before. The workspace fixture is a context manager whose patches end with it, so a table case gets a fresh workspace without stacking patches on the previous one. Its fakes are plain scripts with their paths injected. The build script's real output and a forged artifact are separate helpers: a positive case no longer falls back to a hand-made artifact when the build script fails. Tests that checked several scenarios in sequence are split, so 28 tests become 44. No assertion or case is dropped; the real Cosign bundle is now also checked against the other-signer-key mutation, which it rejects. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rootfs consumer test ran four scenarios in one method, resetting files between them with local closures. It is now four tests: the build script's output passes, a handoff changed after the build fails the checksums, a re-hashed wrong handoff fails its content checks (one subtest per change, as before) and the old two-entry SHA256SUMS fails. release_build_candidate takes its mode, source commit, image and PCR bytes by keyword, so call sites say which is which, and writes its fake uname and nix one statement per line like the neighboring fixtures. The scripts it writes are byte-identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One method checked the dispatch surface and fixed target, the order of the job's steps, and which step each credential reaches. These are now three contract tests, and the step lookups are named one per line instead of unpacked from a generator. The assertions are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Say up front that only Dev statements exist so far, label the JSON example as the predicate rather than the whole statement, and state the client checks as requirements instead of describing them as shipped behavior. The already-approved-measurements case, the profile's failure sentence and the retention note each appeared twice; they now appear once, under publication and reruns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
A dedicated, reviewer-gated workflow that signs a Dev enclave release statement with a KMS key through Cosign and publishes the resulting Sigstore bundle. It is not runnable yet: the signing key and role do not exist, so their identifiers are placeholders that stop the job before any credential is requested. Draft until the items under "Before merge" are done.
opensecret-release-statement-dev.yml: one job in thepcr-signing-devenvironment, started with a build run ID as its only input. The environment, key, bucket and hostname are fixed in the workflow.master, successful, with its commit inmasterhistory; the artifact belongs to that run; GitHub's build attestation coversimage.eif,pcr.jsonandhandoff.json; and the handoff saysdevand agrees with the EIF digest and measurements.https://maple.ai/attestations/enclave-release/v1, with the EIF SHA-256 as subject and the environment, source, PCR0/1/2 and build run in the predicate.<PCR0>.json, then re-fetch through the public hostname, compare bytes and verify again.services/opensecret/docs/release-statements.mddocuments the mechanism and the environment configuration it needs.A change to existing builds
build_opensecret_eif.shnow includeshandoff.jsoninSHA256SUMS, so the build attestation covers the build mode.verify_opensecret_eif_rootfs.pyis updated to expect three entries, and a test runs the real build script's output through every reader of that file in this repository, for Dev and Production.Before merge
SHA256SUMS. It lives outside this repository and has not been checked.Before the first run
pcr-signing-devenvironment with the secret and variables listed in the new doc.Tested
just lane repoand the CI script tests pass (606 tests).🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.