Skip to content

fix(desktop): prevent update downgrades - #46277

Open
opencode-agent[bot] wants to merge 1 commit into
v2from
electron-audit-11
Open

fix(desktop): prevent update downgrades#46277
opencode-agent[bot] wants to merge 1 commit into
v2from
electron-audit-11

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Summary

  • keep desktop updates on the stable latest channel
  • explicitly reject older release versions after assigning the channel
  • cover the updater policy with a focused test

Why

The production updater enabled downgrades while remaining on one stable channel. Stale or incorrectly replaced update metadata could therefore make clients install an older, potentially vulnerable build. Rollback is not part of this update flow, so older releases should not be accepted as updates.

Checks

  • GOMAXPROCS=2 bun typecheck (packages/desktop)
  • bun test src/main/updater/config.test.ts src/main/updater/index.test.ts (13 pass)
  • bun x prettier --check src/main/updater/config.ts src/main/updater/config.test.ts src/main/updater/platform.ts
  • git diff --check
  • full desktop bun test: 90 pass; host Node 18 lacks node:sqlite for drafts.test.ts

Requested by: @Hona (Hona via Slack)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant