fix(release): gate release identity and platform trust - #1126
fix(release): gate release identity and platform trust#1126seonghobae wants to merge 17 commits into
Conversation
📝 WalkthroughWalkthrough릴리스 정체성 검증 스크립트를 추가했습니다. Changes릴리스 정체성 검증
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The release guard now stops builds and publication when version metadata or the release tag disagrees. No actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant ReleaseIdentityJob
participant VerifyReleaseIdentity
participant ReleaseMetadata
participant BuildAndPublish
ReleaseIdentityJob->>VerifyReleaseIdentity: verify_release_identity.py 실행
VerifyReleaseIdentity->>ReleaseMetadata: VERSION 및 JSON 버전 읽기
ReleaseMetadata-->>VerifyReleaseIdentity: 버전 메타데이터 반환
VerifyReleaseIdentity-->>ReleaseIdentityJob: 검증 결과 반환
ReleaseIdentityJob->>BuildAndPublish: 검증 성공 후 빌드 및 게시 허용
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
| "--expected-identity", | ||
| os.environ.get("BANDSCOPE_WINDOWS_PUBLISHER_SUBJECT", ""), |
There was a problem hiding this comment.
🔴 Tagged releases cannot produce artifacts
Tag builds pass an empty BANDSCOPE_WINDOWS_PUBLISHER_SUBJECT into verify_tag_platform_trust; no workflow job defines either required signer identity. Every platform packager fails before upload, so publication never runs.
Prompt for agents
The tag-triggered jobs in .github/workflows/build-baseline.yml invoke package_desktop_artifact.py without defining BANDSCOPE_WINDOWS_PUBLISHER_SUBJECT or BANDSCOPE_APPLE_TEAM_ID. They also contain no signing or notarization setup, so the newly mandatory platform trust verifier rejects every tagged build before artifact upload. Add the required release configuration and platform signing/notarization flow to the owning build jobs, expose the expected identities explicitly, and add workflow-level tests proving real tag jobs receive these values. Keep pull-request and branch builds unsigned if intended, while ensuring tagged builds can create verifiable artifacts.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Validated on current implementation head d33bb96ec1794c02492fea3e8cd5e36280709eae: this remains a real blocker. The verifier is correctly fail-closed, but the tag jobs do not yet possess an organization-approved Windows signing identity/certificate/timestamp authority or Apple Team ID/Developer ID/notarization authority. The PR title/body now state this explicitly and the thread remains unresolved; no signer identity, secret, timestamp service, or Apple authority will be fabricated in repository source. Once those external authorities are provisioned, the existing #960 owner must wire them into tag-only build steps and prove signed/notarized artifacts before upload.
There was a problem hiding this comment.
Revalidated after the non-force protected-base restack. Exact current head is b0bfbd2333f8f0a8eb2f8058f74cf985331aaebe, with develop@889d782e88b4df28dcbb4ae3cfd6d99ef85d9844 as an ancestor and behind_by=0; the seven release-owned files are unchanged. This finding remains valid for the same external prerequisite: no repository-owned source can supply an approved Windows publisher/certificate/timestamp authority or Apple Team ID/Developer ID/notarization credential. The PR is Draft and this thread stays unresolved. No predecessor-head check/review receipt transfers.
Advances #960 on the existing Distribution/Update owner. This PR owns two release-quality boundaries: exact version identity and fail-closed platform trust before a version-tag build can hand artifacts to immutable publication.
Exact current identity
develop@889d782e88b4df28dcbb4ae3cfd6d99ef85d9844.fix/trusted-release-version-identity-960.b0bfbd2333f8f0a8eb2f8058f74cf985331aaebe.d33bb96ec1794c02492fea3e8cd5e36280709eaeand protecteddevelop@889d782e88b4df28dcbb4ae3cfd6d99ef85d9844.apps/desktop/src-tauri/Cargo.lock; this branch does not own that file and adopts the protected blob exactly. Fresh comparison reportsbehind_by=0and exactly the seven release-owned files listed below.Version identity boundary
scripts/checks/verify_release_identity.pyfails closed unlessVERSION, rootpackage.json, the Tauri bundle version, and an applicablev*tag identify the same release. The tag build workflow owns arelease-identityprerequisite; all Windows/macOS build jobs and immutable publication depend on it.Platform trust boundary
scripts/checks/verify_release_platform_trust.pyand the existing packager distinguish unsigned validation artifacts from publishable release artifacts:Validon every emitted.exe/.msiand an exact approved publisher subject supplied asBANDSCOPE_WINDOWS_PUBLISHER_SUBJECT.codesignverification of the application bundle, the exact approvedBANDSCOPE_APPLE_TEAM_ID, a valid stapled notarization ticket on the DMG, and successful Gatekeeper assessment.Current valid blocker: release authority is not provisioned
Current review correctly identified that the repository can verify platform trust but the tag jobs still have no organization-approved signing/notarization authority wired into the build. No repository source contains or should invent these identities or secrets.
Before this PR can become merge-ready as a usable tag-release path, the organization must provision and approve:
Windows
The tag job must then import/use that certificate only for the release build, configure Tauri with the resulting certificate thumbprint plus SHA-256 and the approved timestamp URL, and retain the current exact-subject post-build verification before upload.
macOS
The tag job must then provide Tauri's signing/notarization environment only to the release build and retain current codesign/Team-ID/stapler/Gatekeeper verification before upload.
The repository must not guess a certificate subject, Team ID, timestamp authority, Apple account, signing provider, PFX/P12/P8 material, or secret name/value as though it were organization truth. Until those external identities exist, tag publication is intentionally fail-closed rather than silently producing an unsigned release.
TDD / causal repair chain
764e06c26c55ca6cf8c771389c010e6b0476e95e: RED contract for platform trust and tag-publication ownership.13da983984ab5fa1069acee31af02f5464cd2747: native Authenticode/codesign/Team-ID/stapler/Gatekeeper verifier.8de728b680c2657a6fc5e6bffb54dfe3861a76b3: packager-owned tag trust verification before artifact upload.d33bb96ec1794c02492fea3e8cd5e36280709eae: workflow/order and Windows/macOS verifier regression coverage.b0bfbd2333f8f0a8eb2f8058f74cf985331aaebe: non-force protected-base restack; no release-owned semantic delta changed.The initial test-only head and every predecessor/cancelled/superseded hosted run are historical only.
Scope boundary
This PR does not claim #960 complete. After real signer authority is provisioned and wired, #960 still requires signed updater manifests, signature-verified updater consumption, staged rollout, rollback/repair, integrated checksums/SBOM/provenance/signature publication, version identity parity in shipped UI, and one exact integrated protected-head release receipt.
Current
develop...HEADsemantic delta is seven files only:.github/workflows/build-baseline.yml,scripts/checks/verify_release_identity.py,scripts/checks/verify_release_platform_trust.py,scripts/harness/quickcheck.sh,scripts/release/package_desktop_artifact.py, and the two release trust/version regression suites.Merge gate
Keep Draft and unmerged while release credentials/identities are unprovisioned, while any valid signing-wiring review finding remains unresolved, or while current-head evidence is incomplete. A qualifying exact head must have every applicable protected required check terminal-success, zero valid unresolved current-head findings, a qualifying independent non-author last-push approval, and ordinary protected-branch acceptance. Never self-approve, bypass protection, weaken a gate, or fabricate release evidence.