ci(release): require complete, verified desktop assets before publishing

Merged
QN
14h ago
+1118-134

User description

Summary

  • Require the complete Linux, Windows, and Apple Silicon release asset matrix, including all required installer signatures, per-target SBOMs, and third-party notices.
  • Validate latest.json against exactly the supported updater platforms, expected release URLs, and matching signature sidecars.
  • Cryptographically verify every signed target package against the updater public key embedded in tauri.conf.json before bundle upload. Add a protected-main workflow-dispatch preflight that signs a throwaway payload and proves valid, tampered, and wrong-key outcomes without publishing artifacts.
  • Stage releases as drafts, read the complete uploaded inventory back with sizes and SHA-256 digests, and publish only after exact verification. Existing published tags cannot be overwritten; failures leave an unpublished draft.

Validation

  • Focused Biome checks: PASS.
  • releaseAssetsGuard, releaseSecurityGate, and workflowPolicy: 85 tests PASS.
  • PR_BUDGET_BASE=origin/main pnpm run ci:prepush: PASS, including workflow policy and TypeScript.
  • Four outgoing commits are SSH-signed and verified.
  • Full three-OS bundle execution and the actual stored-key workflow-dispatch probe remain hosted qualification steps after this PR is merged; they are not represented as locally completed.

Security and scope

This change preserves exact-tag signature verification and the exact-ref OSV gate. It does not change release versions, the updater public key, branch protection, security waivers, or native OS code-signing claims. A partially uploaded draft is never marked public; only the same tag's unpublished draft can be resumed after the full local asset gate passes.

Related: #1201, #574, #575.

Summary by Sourcery

Harden desktop release publishing so only complete, cryptographically verified, and exactly matched assets can become public.

New Features:

  • Add a protected-main signing preflight that validates the configured updater key with valid, tampered, and wrong-key signatures.
  • Require and validate the complete Linux, Windows, and Apple Silicon release asset matrix, including installer signatures, SBOMs, notices, and updater metadata.

Bug Fixes:

  • Prevent incomplete, malformed, mismatched, or cryptographically invalid desktop assets from being published.
  • Prevent overwriting an already published release for an existing tag.

Enhancements:

  • Stage releases as drafts and verify the uploaded and published inventories, sizes, and SHA-256 digests before and after publication.

CI:

  • Harden the Tauri release workflow with fail-closed asset collection, pre-upload signature verification, exact updater manifest validation, and protected release publication checks.

Documentation:

  • Document the signed desktop release flow, draft publication safeguards, and current platform matrix.

Tests:

  • Add coverage for release asset completeness, updater manifest validation, remote inventory verification, and workflow security policy.

Chores:

  • Update documented test-count metrics and the unreleased changelog.

Summary by cubic

Tightens desktop release publishing so only a complete, cryptographically verified asset set becomes public. Releases are staged as drafts, compared against the validated local inventory and SHA-256 digests, and published only on exact match; existing published tags are never overwritten.

  • Requires the full installer matrix (Linux deb/rpm/AppImage, Windows setup/MSI, macOS dmg and updater archive), per-target SBOMs, and third-party notices before a draft can be created.
  • Verifies every signed updater payload against the public key in tauri.conf.json in each bundle job and validates all three latest.json entries against expected URLs and signature sidecars.
  • Adds a workflow_dispatch preflight on protected main that signs a throwaway payload and proves valid, tampered, and wrong-key outcomes without publishing artifacts.
  • Stages the release as a draft, reads back uploaded asset sizes and digests via release-assets-guard.mjs remote, and fails closed on missing, extra, empty, mismatched, or malformed files; revalidates the staged tag and inventory immediately before publication, and again after the draft becomes public.
  • Matches both space and dot spellings of Tauri bundle basenames while rejecting ambiguous duplicates, and dispatches CLI modes only through own properties so inherited Object entries cannot bypass validation.

Summary by CodeRabbit

  • Release Reliability
    • Releases are published only after required platform installers, signatures, and supporting files pass validation.
    • Uploaded assets are checked against the expected inventory and file digests before publication.
    • Existing published releases are not overwritten, and releases are staged as drafts before publication.
    • Manual signing checks are available for runs on the protected main branch.
  • Documentation
    • Updated desktop release guidance and reported test totals.
  • Tests
    • Added coverage for release files, updater manifests, uploaded assets, and workflow policies.

CodeAnt-AI Description

Require complete, verified desktop assets before publishing releases

What Changed

  • Tag releases now require the full Linux, Windows, and Apple Silicon installer, signature, software inventory, and notices set, with updater entries for exactly those supported platforms.
  • Updater packages are verified before upload. Releases stay unpublished until the uploaded files match the validated inventory, and published releases for the same tag cannot be overwritten.
  • A protected-main preflight checks that the configured updater key accepts valid signatures and rejects tampered or wrong-key signatures, without publishing assets.

Impact

✅ Fewer incomplete desktop releases
✅ Verified updater downloads for Linux, Windows, and Apple Silicon
✅ Published release tags protected from overwrite

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.