You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Installed-release qualification now binds proof bytes, target reports, the checkout commit, workflow run, signer workflow, and the top-level evidence record into one attested chain. Target reports must name the expected target and carry an exact passing schema; injected verification failures remain hermetic and never fall through to ambient GitHub state.
Verification
bun test scripts/verify-mc-host-release-evidence.test.ts: 23 passed
bun run typecheck
bun run lint
Remaining Qualification
The protected qualification workflow and real registry/platform evidence remain external. npm publication is intentionally skipped.
Reviewed scripts/verify-mc-host-release-evidence.ts and its test file. This is a solid security-hardening change with two real, well-targeted fixes:
Attestation fallback bypass (the main bug fix) — previously options.verifyAttestation?.(...) ?? (fallback)() meant an injected verifier that legitimately returns null (a rejection) would fall through to the ambient gh attestation verify call instead of being treated as a rejection, since ?? doesn't distinguish "not provided" from "returned null." resolveAttestationVerification fixes this by keying off whether the injected function itself is undefined, not its return value. The new test (an injected attestation rejection never invokes the ambient fallback) directly pins this behavior. Good catch — this is exactly the kind of bug that could let a compromised/misbehaving verifier silently escalate to a passing ambient check in test/mocked contexts.
Target proof content wasn't actually checked (validateTargetTestReport) — previously the target proof's expectedObservations.test_report_path/test_report_sha256 were computed by echoing back whatever the actual observations claimed (once format/hash-consistency checks passed), so the drift check was tautological — it never verified the referenced report actually asserted passed: true for the right target/schema. validateTargetTestReport now parses the report and enforces schema, target, and passed === true explicitly. The new parametrized test (failed / wrong-schema / wrong-target) exercises exactly the gap this closes. This looks like the more important of the two fixes from a security-gating standpoint — without it, GA qualification could previously be gated on a test report that never actually passed, as long as the hash chain was internally consistent.
Both fixes are well covered by tests, and I traced the existing test fixtures (installProofArtifacts) to confirm they already produce schema-conformant, passed: true reports, so no other tests are silently broken by the stricter check.
Minor observations (non-blocking)
The options.verifyAttestation === undefined ? undefined : () => options.verifyAttestation?.(...) pattern is repeated twice with an arguably-redundant ?. inside the closure (once the outer ternary already established the property is defined). This is likely there because TS narrowing of options.<prop> doesn't reliably persist across the closure boundary — worth a one-line comment if the redundancy is intentional, otherwise harmless.
verifyAttestationWithGitHub nicely deduplicates what were two near-identical inline spawnSync IIFEs — good simplification alongside the behavioral fix.
No security or correctness issues found beyond what's already fixed by this PR; no additional bugs identified.
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
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.
Summary
Installed-release qualification now binds proof bytes, target reports, the checkout commit, workflow run, signer workflow, and the top-level evidence record into one attested chain. Target reports must name the expected target and carry an exact passing schema; injected verification failures remain hermetic and never fall through to ambient GitHub state.
Verification
bun test scripts/verify-mc-host-release-evidence.test.ts: 23 passedbun run typecheckbun run lintRemaining Qualification
The protected qualification workflow and real registry/platform evidence remain external. npm publication is intentionally skipped.
Stack
Layer 6 of 7 above #46. Parent: #62. Next: #65.