Skip to content

Harden release notes and validate updates and helper messages - #117

Merged
fif7y merged 1 commit into
fif7y:rosterfrom
akshaymaloo:fix/release-notes-message-validation
Oct 30, 2026
Merged

fif7y merged 1 commit into
fif7y:rosterfrom
akshaymaloo:fix/release-notes-message-validation

Conversation

@akshaymaloo

Copy link
Copy Markdown

Scope

Smaller replacement for #114, targeting roster as requested in #114 (comment).

Kept

  • Release-note CSP, HTTPS link policy, and nonpersistent WebKit storage, unchanged from the accepted part of Authenticate helper IPC and harden release authenticity #114.
  • Ed25519 verification of the generated DMG against the exported app's public key and the appcast enclosure length. A missing appcast tool or failed verification stops the release.
  • Helper message checks: 4 MiB encoded-message limit before decoding/dispatch, bounded item count/text/image data, unique item titles, and finite/bounded geometry and opacity. Both receiving call sites validate decoded commands/events before handling them.

Left unchanged

  • The existing CFMessagePort transport. No sockets, temporary-directory endpoints, signature checks on helper peers, executable-path checks, or debugger restrictions.
  • project.yml and Sparkle dependency selection. No Sparkle bump or new pin.
  • The original spctl ... || true behavior for the stapled, non-code-signed DMG.
  • Signing-tool discovery and the rest of the release pipeline. The pipeline change here is limited to update-signature verification and failing when appcast tooling is absent.

The message checks validate payloads; they deliberately do not introduce peer authentication.

Validation

On macOS 27.2 / Xcode 27.1:

  • 6 HelperProtocolTests passed, including valid messages, the exact message-size boundary, oversized valid JSON, item counts, duplicate titles, UTF-8 byte lengths, image data, geometry, and event validation.
  • 9 release-note app cases passed, including actual WebKit script/resource blocking. The app and both embedded helpers build successfully with Sparkle 2.9.6 (ac2def288cbff5cfc7df3ffef6abdf45b72bcb0a). The version was selected only in the ignored, generated local lockfile for this compatibility check; the PR does not change dependency configuration.
  • 8 offline release/signature tests passed. These explicitly cover spctl returning exit 3 without blocking verification, invalid signatures remaining fatal, missing tooling, and cryptographic acceptance/rejection of generated and tampered fixtures.
  • bash -n scripts/release.sh and git diff --check passed.

A production notarized release was not run. Release orchestration is covered by offline test doubles; update-signature verification is exercised with real Ed25519 fixtures.

Narrow the security changes to the subset requested on PR 114, based on roster. Keep CFMessagePort, Sparkle dependency configuration, and nonfatal DMG spctl assessment unchanged. Add payload validation and update-signature verification with focused regression tests.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 165b0dbb-9a37-49a5-b437-05c62fcaa0a2
@akshaymaloo
akshaymaloo marked this pull request as ready for review October 30, 2026 01:01
@fif7y

fif7y commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Hey @akshaymaloo, this is exactly the scope I was hoping for, thanks!

I ran the new update check against the real 0.3.4-beta.1 DMG and it passes, and a copy with one byte changed fails. Your tests pass too, and the release notes popover keeps its height with the new policy.

Merging it now, it should be in the next beta.

@fif7y
fif7y merged commit 10391af into fif7y:roster Oct 30, 2026
1 check passed
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants