fix(release): gate release identity, model/updater admission, and platform trust - #1126
fix(release): gate release identity, model/updater admission, and platform trust#1126seonghobae wants to merge 87 commits into
Conversation
📝 WalkthroughWalkthrough릴리스 정체성 검증 스크립트를 추가했습니다. Changes릴리스 정체성 검증
Estimated code review effort: 3 (Moderate) | ~20 minutes 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: 검증 성공 후 빌드 및 게시 허용
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. 🚥 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 and the Distribution/update portion of #1180 on the existing release owner. This PR owns exact release identity, commercial model-artifact admission/evidence/inventory binding, native platform trust, exact package/updater receipts, fail-closed updater admission, static updater-manifest publication, hosted release re-verification, GitHub immutable-release attestation, updater security metadata, and the Rust-first anti-replay/rollback decision core. It consumes #1181 as a legal prerequisite; it does not decide or manufacture model rights or signing authority.
Exact current identity
develop@314ddeae7b775a4957594b599358c8255617eb2e.fix/trusted-release-version-identity-960.9df9e61592c006f7bfb94008c94427ef40a1bc0c.develop.788e8bd82285e5380f498cf8ec425ab1d64e26d6; protected workflow/security delta is not being rolled back.Release/update authority already implemented
verify_release_identity.pycomposes version, model and updater policy gates. Tag packaging runs that preflight before release artifact creation. Windows/macOS tag packaging additionally requires native signature/notarization trust evidence; unsigned PR/develop builds remain validation evidence only.release/model-artifact-policy.jsonremainsblockedfor upstreamdemucs/htdemucs/955717e8-8726e21a.thbecause commercial pretrained-weight rights are not established. Future admission requires exact model bytes/full SHA-256, rights/provenance/loader-policy evidence bytes and one matching supplemental-inventory entry. #1181 owns the legal decision and #770 owns rights-cleared real-audio scientific acceptance.release/updater-policy.jsonalso remainsblocked: no organization-approved updater public key or production endpoint exists in repository authority. Future admission must agree across bounded policy JSON, Tauri config, locked Cargo dependency graph and executable updater initialization. No placeholder key, endpoint or signing secret is fabricated.Tagged packaging emits target-qualified release receipts binding version/tag, full source commit, platform/architecture/triple, installer checksums and exact Tauri updater bundle/signature bytes.
select_release_assets.pyre-admits the four target graphs after Actions artifact transfer.build_updater_manifest.pybuilds deterministic exact-tag static updater JSON; hosted draft and published assets are downloaded again and byte-compared, followed bygh release verifyandgh release verify-assetagainst GitHub immutable-release attestation.Updater security metadata
Fresh review against #960 found that the Tauri static manifest carried exact URL/signature content but did not itself identify the receipt-authorized updater bundle digest or
minimumSupportedVersion. Tauri exposes the original response throughUpdate.raw_json, so future replay/compatibility decisions need exact authenticated evidence in that response.57ced89e61529a984010c8b351fef54cac543b6frequires exact full source commit, policy version floor and per-target updater bundle size/full SHA-256.21ee4ff52789659cbf70db33c24d9e925fb8d4f1adds deterministic top-levelbandscopemetadata derived only from admitted receipts and fixedrelease/updater-policy.json.209f58e7e647df836be50fa31c90a751829cca38documents the Tauri/TUF claim boundary.857e1e9324e29f896d5bad6216631bd723fd1f65rejects duplicate policy authority and non-canonical version floors.This metadata is not a second signing mechanism: Tauri
.sigremains artifact authenticity authority, while GitHub immutable-release attestation remains hosted publication evidence.Rust anti-replay / rollback core
The next repository-owned #960 gap was that replay/rollback policy existed only as a requirement. RED
4467a9e80b3fa7e7e7a95cb1ff7606749606b3d0requires repository CI to execute a standalone locked Rust Distribution suite.1339cfd44aef17743a770449651ee9a233baf4e5and0fbb2e8a5396e5b5b123704537e0c4b9719a92e3establish the dependency-freeapps/desktop/distribution-core; causal fix42fdeed9a1ddf57d807889e61dee864b931b62a2implements the decision contract.d80a4775f5be719b39eab85a1e78094b8f43c160makes compiler warnings and missing public rustdoc hard failures.The core now fails closed on malformed stable versions, malformed source/digest identity, invalid or mismatched targets, clients below the automatic-update compatibility floor, candidate rollback, metadata older than locally highest-seen authenticated evidence, and same-version source/digest equivocation. A previously authenticated highest-seen release can be reoffered without being treated as newly fresh. Known-good rollback is allowed only when the target is actually older and can read the current on-disk project schema.
The core is intentionally network/filesystem/Tauri/installer independent. Highest-seen state belongs to Distribution and must be persisted after authenticated metadata admission even when installation is deferred; Project Persistence remains owner only of project bytes/schema truth. Positive production runtime wiring still waits for real updater authority rather than manufacturing a key/endpoint.
cd25fab5f40f6379f5b2c25017510f4b6f3378cfdoctors updater traceability around this boundary,a0a9eecc977375cf540a3bc04cce82292c6a583cregisters the bounded context inARCHITECTURE.md, and9df9e61592c006f7bfb94008c94427ef40a1bc0cestablishes the previously missingdocs/product-technical-gap-baseline.mdwith buyer-visible release/audio/UI gaps.Current verification
Exact current-head hosted workflows exist for
9df9e61592c006f7bfb94008c94427ef40a1bc0c;build-baseline,ci,sbom,Security Scan,SAST Semgrep, andCodeQL PRare non-terminal at the latest read. Predecessor results are not transferred and no exact-head GREEN is claimed.Fresh formal review inventory has no qualifying non-author
APPROVED. The remaining unresolved signer-authority finding is still valid: repository source cannot supply organization-approved Windows publisher/certificate/private-key/timestamp authority, Apple Developer ID/Team ID/notarization credentials, or the approved updater signing/public-key + production endpoint authority. Keep Draft; do not fabricate these values or self-approve.Remaining scope
This PR does not claim #960, #1180 or #1181 complete. Repository-owned runtime work still includes authenticated
Update.raw_jsonadmission into the Rust core, crash-safe highest-seen Distribution state/reload, offline-safe update checks, truncated/partial/disk-full/cancel/first-launch recovery, last-known-good installer retention and packaged wrong-key/signature/digest/replay/target acceptance on Windows/macOS. Positive production signature acceptance needs external approved updater authority.Security Notes
Merge gate
Keep Draft and unmerged while exact-head hosted evidence is non-terminal, qualifying independent current-head approval is absent, valid findings remain, or actual release prerequisites are unprovisioned. Never self-approve, bypass protection, weaken a gate, fabricate rights/signing/updater authority, or transfer predecessor GREEN.