[browser] Firefox and the redesign: one extension for Firefox, Edge and Chrome, the popup in layout C, a new password on sign-up forms; 0.22.0 #30

Manually merged
mnovak merged 4 commits from feature/browser-firefox into main 2026-12-03 01:30:30 +01:00
Owner

What

  • One extension source for Firefox, Edge and Chrome (extension/manifest.firefox.json with the gecko id custos@marek-novak.cz, manifest.chromium.json with the fixed key); tools/extension.mjs builds both and their reproducible zips.
  • custos-browser: digit-only ports, public suffixes match exactly only, fill_allowed(frame, top) (a frame gets a login only when its page would too), caller (the host answers only the Custos extension: Chromium's origin argument, Firefox's add-on id).
  • custos-native: six ops (browser_status, _match, _fill, _totp, _save, _generate), rebuilt from known fields with limits; a per-connection session (32 random bytes) whose match code Custos's cards, the audit and the popup show; not_allowed to any other caller.
  • The redesign (Mark's pick, layout C): the popup shows the site, its logins first with Fill and the 2FA code inline, a pending save as Save to Custos or Update, and on a sign-up or change-password page A new password for this site with Fill. Colours are @domi/ui's custos room; the popup and the in-page menu follow Custos's theme (theme in the answers).
  • Fill and save: a new-password field gets Use a new password (from Custos's generator, through the host; it fills the password and its repeat). Sending the form offers to save it; a change-password form saves the new password, and updates the site's only login when the form has no username.
  • 0.22.0 (v0.20.0 and v0.21.0 were taken by the licence work, merged in here).

Self-review

  • The background still takes every origin from the browser (sender.url, sender.tab.url), never from a message; generate asks by origin only. The popup's *-tab requests are now answered only for the extension's own pages, not for content scripts (a frame on a good site could otherwise have asked for that site's codes).
  • The popup's Fill of a new password goes to the tab's top frame only, which takes it only while still on the origin it was made for.
  • A generated password is stored nowhere: Custos saves it only through browser_save and its card (desktop test). No script of the extension writes to the console (a test checks the source and a full run).
  • The colours are copied from @domi/ui (no build step in the extension); fonts fall back to the system's, no files added.

Tests

  • cargo test --workspace --exclude custos-wasm: 288 passed, 0 failed (custos-browser 10 + 1 doc, custos-native 3, custos-gen 19, the rest unchanged).
  • node tools/extension-test.mjs: 11 passed (4 new: a new password by origin only, the popup's requests refused to content scripts, Update offers, nothing logged).
  • The end-to-end runs in Zen, Edge and Chrome live in the Custos repo (e2e/browser) and run against this tag.
## What - **One extension source for Firefox, Edge and Chrome** (`extension/manifest.firefox.json` with the gecko id `custos@marek-novak.cz`, `manifest.chromium.json` with the fixed key); `tools/extension.mjs` builds both and their reproducible zips. - **custos-browser**: digit-only ports, public suffixes match exactly only, `fill_allowed(frame, top)` (a frame gets a login only when its page would too), `caller` (the host answers only the Custos extension: Chromium's origin argument, Firefox's add-on id). - **custos-native**: six ops (`browser_status`, `_match`, `_fill`, `_totp`, `_save`, `_generate`), rebuilt from known fields with limits; a per-connection session (32 random bytes) whose match code Custos's cards, the audit and the popup show; `not_allowed` to any other caller. - **The redesign (Mark's pick, layout C)**: the popup shows the site, its logins first with Fill and the 2FA code inline, a pending save as *Save to Custos* or *Update*, and on a sign-up or change-password page *A new password for this site* with Fill. Colours are @domi/ui's custos room; the popup and the in-page menu follow Custos's theme (`theme` in the answers). - **Fill and save**: a new-password field gets *Use a new password* (from Custos's generator, through the host; it fills the password and its repeat). Sending the form offers to save it; a change-password form saves the new password, and updates the site's only login when the form has no username. - 0.22.0 (v0.20.0 and v0.21.0 were taken by the licence work, merged in here). ## Self-review - The background still takes every origin from the browser (`sender.url`, `sender.tab.url`), never from a message; `generate` asks by origin only. The popup's `*-tab` requests are now answered only for the extension's own pages, not for content scripts (a frame on a good site could otherwise have asked for that site's codes). - The popup's Fill of a new password goes to the tab's top frame only, which takes it only while still on the origin it was made for. - A generated password is stored nowhere: Custos saves it only through `browser_save` and its card (desktop test). No script of the extension writes to the console (a test checks the source and a full run). - The colours are copied from @domi/ui (no build step in the extension); fonts fall back to the system's, no files added. ## Tests - `cargo test --workspace --exclude custos-wasm`: 288 passed, 0 failed (custos-browser 10 + 1 doc, custos-native 3, custos-gen 19, the rest unchanged). - `node tools/extension-test.mjs`: 11 passed (4 new: a new password by origin only, the popup's requests refused to content scripts, Update offers, nothing logged). - The end-to-end runs in Zen, Edge and Chrome live in the Custos repo (e2e/browser) and run against this tag.
mnovak added 4 commits 2026-12-03 01:30:09 +01:00
- custos-browser: fill_allowed (a frame gets a login only when its page would too), public suffixes match
  exactly only (psl), ports digits only, caller (which extension started the host); spoof tests.
- custos-native: answers not_allowed to anything but the Custos extension, browser_totp and browser_save,
  the frame's and the page's origins, a random session per connection (its match code on Custos's cards).
- extension/: manifest.firefox.json (gecko id custos@marek-novak.cz) and manifest.chromium.json, one set of
  scripts; the popup shows 2FA codes, the save offer and the connection's code; tools/extension.mjs builds
  each browser and reproducible zips; tools/extension-test.mjs runs the background against a fake browser.
mnovak manually merged commit 077112492a into main 2026-12-03 01:30:30 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mnovak/CustosPublic#30