fix(release): make exact artifact handoff acyclic - #1791
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughChangesExact artifact handoff
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant GitHubActions
participant Signer
participant Verifier
Caller->>Verifier: Seal source identity without artifact digest
Caller->>GitHubActions: Upload evidence artifact
GitHubActions-->>Caller: Return artifact ID and digest
Caller->>Signer: Pass artifact receipt
Signer->>GitHubActions: Re-fetch same-run artifact metadata
GitHubActions-->>Signer: Return verified metadata
Signer->>Verifier: Verify inner evidence files
Verifier-->>Signer: Return valid handoff
Signer->>Signer: Sign verified artifact
Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Independent review — approveRead the full diff directly (all 6 files), not just the description. Verified the core fix is real and correctly scoped:
Verification run myself, not just trusted from the PR's own checkboxes:
Security boundary claims cross-checked against the actual diff, not taken on faith: six-file cardinality, checksum binding, and CycloneDX validation are untouched by this diff (confirmed via the unrelated test count staying the same); the new step only adds a stricter, GitHub-metadata-backed check, it does not weaken or make best-effort any existing check. No caller-controlled source is checked out or executed in either job (confirmed against the existing sparse-checkout/ Minor, non-blocking nit: several changed files (the workflow, the doctoring doc, the script) now end without a trailing newline — harmless, but worth a quick Given exact-head checks are genuinely queued (chicken-and-egg, not failing) and the requested independent review is now done, marking ready and proceeding with the standing bypass-merge authorization for this pattern. |
Problem
Fixes #1782.
The exact-artifact reusable required the post-upload GitHub Actions artifact digest inside
source-identity.json, even though that identity file is itself part of the six-file upload whose bytes determine the digest. A normal caller therefore could not construct the handoff deterministically without a cryptographic fixed point.RED → repair
RED
c18d6789f602ed19022a0c21a964b510ce5543a9adds an explicit contract that the inner identity must be constructible before GitHub returns the upload receipt and that the outer receipt must be verified again before credentialed signing.The repair then:
evidence_artifact_digestfrom the exact innersource-identity.jsonshape while preserving the reusable workflow input as the outer receipt (cc58723ffc88dd5d3c3173ca2bfd5c092cc3f26a);b56726530a7e54fa37616c0fec3119b2e9c35326);actions: readto the credentialed signer and independently re-fetches artifact ID/name/digest/run/expiry immediately before downloading/signing (2d13615b0c1eb948b58e6b0af5d65890d660dc03);be107f2e19875147a04a83c4712b9af07dc859cc);${{ github.workflow_sha }}verifier source, recovery, and the two-stage verification sequence match code (fe610c3e5bf8b478fba13b93a89ab1b62b3155b0).Security boundary preserved
The six-file cardinality, strict JSON, checksum binding, per-subject CycloneDX 1.7 root binding, immutable artifact ID/name/digest verification, source repository/SHA binding, OIDC separation, repeated verification before signing, online attestation verification, and offline evidence export remain fail-closed. The post-upload digest is not weakened or made best-effort; it is moved to the only layer where it can exist without self-reference: GitHub Actions metadata.
No caller-controlled source is executed in either trusted job. No provider/model policy or product-local release behavior is copied into this owner repository.
Keep Draft until exact-head checks and independent review are complete. LineageWeave #925 must consume only a protected immutable SHA after this owner fix merges; it must not pin this branch.
Summary by CodeRabbit
보안 및 검증 개선
문서