Skip to content

fix(web): say a wallet scan can also give the settings-sync key - #752

Merged
PastaPastaPasta merged 5 commits into
masterfrom
fix/scan-safety-sync-key
Nov 27, 2026
Merged

PastaPastaPasta merged 5 commits into
masterfrom
fix/scan-safety-sync-key

Conversation

@PastaPastaPasta

@PastaPastaPasta PastaPastaPasta commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

On a network with forge-user (testnet and mainnet), the wallet QR step's Details say that disabling a key undoes a code you didn't trust. That isn't the whole story: the same approval can also give the page the settings-sync key, which reads every synced storage profile, credentials included. Disabling keys doesn't take that key back.

The details now end with one more line. It shows only when the request actually asks for the sync key, so not on a no-sync retry:

An approval can also give the key that reads the storage settings you sync, credentials included. Disabling keys doesn't take that back: move sync to a new key.

The link goes to the procedure #766 added and tested on testnet with a real wallet:

  1. Disable the site's signing key.
  2. Move sync to a new key from the recovery phrase.
  3. Rotate the credentials.
  4. Add the new key on your other devices.

This was held until that procedure existed, because rotating credentials alone re-synced them under the key the site had.

Copy only: no change to data, storage or formats.

Tests:

  • components/auth: 63 pass, including the line with its link, and its absence where nothing syncs;
  • lib/docs/catalog.test.ts checks that the anchor names a real heading;
  • tsc and copy lint are clean.
  • An Opus review approved the change with suggestions. Both are applied: the line now comes after the "Disable its key" step, matching the guide's order, and it follows the request's sync binding.

UI proof

Testnet build, headless Chromium, wallet QR step with Details open. The QR code and countdown change with every request. Index.

Before: exact base, master f854e0d0 After: PR head 1981bc79

Closes #751's web-copy half (the procedure itself shipped in #766).

🤖 Generated with Claude Code

On a network with forge-user, the QR step's details said a scan you didn't
trust is undone by disabling its key. A wallet sign-in there also gives the
sync key, which reads synced storage credentials, and disabling keys doesn't
take it back. The details now say so and link to rotating those credentials.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

ScanSafety now conditionally shows a settings-sync key warning based on its syncs prop, which defaults from ACTIVE_NETWORK. The warning links to credential-rotation guidance. Tests cover both sync states.

Changes: Sync-key warning

Layer / File(s) Summary
Warning condition, guidance, and tests
forge-web/components/auth/scan-warning.tsx, forge-web/lib/docs-links.ts, forge-web/components/auth/scan-warning.test.tsx
ScanSafety accepts an optional syncs prop and defaults it from ACTIVE_NETWORK.v2?.user. When enabled, it warns that the key can read synced storage settings, including credentials, and links to the rotation guide. Tests check the warning and link when enabled, and its absence when disabled.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

Possibly related PRs

Merge Risk: Minimal · up to 37e8d

This change adds a warning to the wallet QR details on networks where settings sync is available, with a link to the recovery guide. It is copy-only and does not change data or storage. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the wallet QR scan warning now says the approval can also give the settings-sync key. It uses the conventional fix(web) prefix and is specific, so a reader can tell wh…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is mostly complete. It explains the problem (disabling a key does not revoke the settings-sync key), what changed (one new Details line, shown only when the request asks for the sync k…
Full details: Title check

Explanation

The title names the main change: the wallet QR scan warning now says the approval can also give the settings-sync key. It uses the conventional fix(web) prefix and is specific, so a reader can tell what changed.

Full details: Description check

Explanation

The description is mostly complete. It explains the problem (disabling a key does not revoke the settings-sync key), what changed (one new Details line, shown only when the request asks for the sync key), why the link waits on the procedure from #766, and the test results. It also includes a UI proof section with before and after screenshots. The template's checklist items are not addressed: it does not say whether make check-rust and make check-web were run (it names tsc and copy lint instead), and it does not mention rule vectors, which probably do not apply to a copy-only change. The docs guide item is partly covered by the link to an existing guide. The description also cites an Opus review and a 'Claude Code' attribution, which is not template content but is harmless.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0e08e9d5-4cbd-42e3-bacd-c28fe2ef7b6a
Commits

Reviewing files that changed from the base of the PR and between f854e0d and 37e8dbf.

Files selected for processing: 3

  • forge-web/components/auth/scan-warning.test.tsx
  • forge-web/components/auth/scan-warning.tsx
  • forge-web/lib/docs-links.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@PastaPastaPasta

Copy link
Copy Markdown
Owner Author

Holding this one; it isn't merged yet. An independent review (Opus) approves the component change: the line is accurate and shows exactly where forge-user is deployed. But it found a blocker in the advice the line links to.

  • Why rotating doesn't help yet: the settings-sync key a wallet hands out is always the same derived key. Synced profiles and repo shares are encrypted under keys derived from it (identity-synced-state.md §4).
  • How the guide leaks new credentials: rotate-storage-credentials.md step 2 updates the profile, and both dg storage add and the web Settings → Storage sync that update. Step 3 then refreshes shares. So whoever took the sync key can read the new credentials too.
  • What would fix it: until Settings sync: a lookalike site can take the sync key, and it can't be rotated or stopped #751 lets sync move to a new key, the line and the guide must keep rotated credentials off sync, or stop implying that rotating ends the exposure.
  • Still open: the web half of that procedure isn't settled. The web app's sign-out only locks the vault and keeps the sync key in the browser, so I'm not writing steps I haven't verified.

Next: fix the copy and the guide together, test the procedure end to end on testnet, then merge.


🤖 Posted autonomously by Claude (claude-opus-5-5) on behalf of pasta.

PastaPastaPasta and others added 3 commits November 27, 2026 06:28
Rotating credentials alone re-syncs them under the key the site has. The line now
links the tested procedure (#766): disable the site's key, move sync, then rotate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…the request asks for the key

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@PastaPastaPasta
PastaPastaPasta merged commit a15614b into master Nov 27, 2026
21 checks passed
PastaPastaPasta added a commit that referenced this pull request Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Settings sync: a lookalike site can take the sync key, and it can't be rotated or stopped

1 participant