Repository navigation
SDK: verify enclave release statements in TypeScript sessions, report-only - #1668
Draft
w3irdrobot wants to merge 2 commits into
Draft
w3irdrobot wants to merge 2 commits into
w3irdrobot wants to merge 2 commits into
Conversation
Add the verifier side of release-approval checking, not yet used by any session. A release bundle is accepted only when it fits under a byte cap, names no JSON member twice, passes the pinned Sigstore browser verifier's strict managed-key profile with a given approval key and trusted root (DSSE signature, one Rekor v2 entry with its inclusion proof and checkpoint, one RFC 3161 timestamp), and carries an in-toto release statement for the expected environment and all three PCRs. Repository and commit are returned as audit data only. The reported log index is the one the inclusion proof covers. The repeated-member check lets JSON.parse validate the text, then walks string and bracket tokens with one stack instead of parsing JSON by hand. Sigstore's production trusted root is embedded and loaded apart from the policy code. Tests run the shared managed-key corpus byte for byte and the published Dev release bundle, kept as served with its SHA-256 beside it and out of the formatter. The SDK lane stages the reviewed Dev signing key and trusted root next to the SDK so the tests compare against them, and changes to either now select that lane. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After the existing Nitro and PCR checks accept a remote enclave, start a release-approval observation without waiting for it. It finds the bundle for the authenticated PCRs in a verified in-memory cache, in the bundles shipped with the SDK, or by a bounded fetch from the environment's fixed host, verifies it with that environment's approval key, and logs a pass or a failure category with public release identity only. It never changes, delays or fails a session, and its errors are dropped. Loopback development servers, whose documents are not authenticated, are not observed. Only the Dev approval key ships; Production reports approval-key-not-configured and never falls back to it. The published Dev release bundle is embedded as served and verified as text. Failures, 404s and timeouts are never cached. The packed-package check confirms that the ESM and UMD builds carry each published bundle with its pinned SHA-256 and that no WebAssembly ships. The Research desktop app may connect to the two bundle hosts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Maple development preview: https://53c85879.maple-ca8.pages.dev Commit: Uses development API, billing, flags and PCR configuration. Cloudflare Access applies. |
This branch was successfully 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
The TypeScript SDK now checks an enclave's signed release statement during Transport V2 session setup and logs the result. It is report-only: it never changes, delays or fails a session, and there is no UI.
After the existing Nitro and PCR checks accept a remote enclave, the SDK starts a background check that:
attestations-dev.maple.aiorattestations.maple.ai);sigstore-browserfork's strict managed-key profile: DSSE signature, one Rekor v2 entry with its inclusion proof and checkpoint, one RFC 3161 timestamp;release evidence: passor a failure category, with public release identity only.How to read it
Two commits, in order:
sdk/src/lib/releaseEvidence/verification.ts, the repeated-JSON-member check, the embedded trusted root and the tests. 100 of its 114 files are a copied test corpus undersdk/test/fixtures/managed-key/.sdk/src/lib/transportV2/client.ts, the packed-package check, the Research desktop CSP and CI lane routing. About 1,100 lines, and all of the session risk.Things worth knowing
approval-key-not-configured, makes no request and never falls back to the Dev key.@freedomofpress/sigstore-browserfrom theMaplePrivacyLabs/sigstore-browserfork, pinned by commit to a branch with committed build output and no install scripts.Checked
just lane sdk-ts: 471 pass, 0 fail, 0 skipped on the branch head; 446 pass on the first commit alone.just lane repopasses.scripts/ci/opensecret-release/in the SDK lane, and a change to either selects that lane.Not checked
🤖 Generated with Claude Code