poli0981andClaude Opus 5 cf0435e7b7 fix: close the eighteen findings the Phase 6 review confirmed
Six lenses over the branch, each finding independently attacked by a verifier
told to refute it. 31 filed, 18 survived, clustering into five real defects —
and the pattern held: every one is in work added earlier in this same branch.

**The sanitizer did not keep its promise (9 findings).** It is the single
privacy control in the intake flow, named as mandatory in SECURITY.md, README,
CONTRIBUTING, the privacy policy and the issue form — and it leaked in nine
distinct ways. Worst: `detectKind` fell back to 'csv' for anything it could not
identify, `sanitizeCsv` then matched no columns, and the input was emitted
verbatim with exit code 0. The users who run this tool are by definition the
ones whose file did not import, so a truncated or hand-excerpted file is the
TYPICAL input — and `tests/fixtures/malformed/no-doctype.html`, already in the
repo, reproduced it. The test could not catch any of this: it returned early
whenever the original failed to parse, so it passed vacuously on precisely the
dangerous inputs.

Nine holes found in one pass is not a signal to patch nine holes. The rules are
regexes over untrusted markup, so "we thought of every shape" is not a claim
anyone can make honestly. So the tool now fails safe:

- unidentified input is REFUSED, matching core detectFormat rather than being
  weaker than the parser it fronts;
- the output is checked before it is written — any host that is not one of our
  own `*.example` aliases means a rule missed something, and the file is refused
  with the leaked host named. A rule this misses now degrades into an annoying
  refusal instead of a published browsing history.

The individual holes are fixed too: single-quoted and bare attribute values were
never matched (a straight leak); `spansFrom` located capture groups by searching
the match text, landing on the wrong copy — replaced with the `d` flag's exact
offsets; overlapping spans spliced already-rewritten text using offsets measured
against the original; `[^<]*` made a title containing a raw `<` fail to match
entirely; `<DD>` stopped at the first newline, publishing the rest of a wrapped
note; and replaceSpans rebuilt the whole string per span, O(spans x file).

**The import report pointed users at a backup that was never written.** The
guard was "mode is replace and this is not a BmBackupError", but runImport
resolves the roots BEFORE proving the backup — so NO_WRITABLE_ROOTS, added in
this same branch, reaches the catch with nothing on disk. Now keyed on the
onClearing callback, which is the only signal that proveBackup actually
returned.

**Cancelling a Replace after the clear read as a harmless no-op.** The tree is
gone and only `created` of it rebuilt; "N items created" alone, on a browser
that is now nearly empty, is the wrong story. It now says so and names the
backup.

**Collapsing a folder while a search was active re-opened it instantly.** The
$effect read and wrote the same two `$state` sets, making it its own dependency:
every write re-invalidated it and it re-merged an unchanged `search.expand`.
Reproduced against the real Svelte runtime — `$effect` is stripped under this
repo's vitest config, so no unit test could have seen it. Fixed with `untrack`,
which also removes the self-retrigger loop.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-03 20:02:36 +07:00
2026-07-25 19:21:07 +07:00

BookmarkMagic

License: GPL-3.0-or-later CI CodeQL Runtime dependencies: 0

Move your bookmarks between browsers the simple way: with a file. No account, no cloud sync, 100% offline.

A Chrome (MV3) extension for importing, exporting and editing bookmarks and folder trees. English · Tiếng Việt · 日本語.

Screenshots

Edit Export
The edit tree, showing bookmarks with their domains The export tab: folder picker on the left, format cards on the right
Settings About
Settings: language, theme, and four defaults About: version, links, third-party statement, donate links and the legal block

What it does

  • Import HTML, JSON or CSV bookmark files, with a full preview first — counts, folders, depth, duplicates and warnings before anything is written.
  • Choose how: into a new dated folder (the safe default), merged into your existing folders, or replacing everything. Replace saves a JSON safety backup first and deletes nothing until that backup is proven.
  • Export everything, or just the folders you pick, to HTML (Chrome, Edge, Brave, Firefox, Safari, Vivaldi, Opera), JSON, CSV or Markdown.
  • Edit the tree: search, rename, drag & drop, create folders, delete, and find duplicate links — every action reachable from the keyboard.

Privacy

This is the whole point of the project, so it is worth being precise.

  • No network access at all. Not analytics, not telemetry, not update pings. There is no server. A grep gate (npm run guard) fails the build if anyone adds fetch, XMLHttpRequest, WebSocket, EventSource or sendBeacon.
  • Exactly two permissions: bookmarks and storage. No host permissions, no content scripts, no background worker. Two gates enforce it: a unit test over wxt.config.ts, and npm run check:manifest, which CI runs against the built manifest.json — because a build can add what the config never asked for.
  • Zero runtime dependencies. Nothing third-party ships in the extension.
  • Settings use chrome.storage.local, never storage.sync, so even your preferences stay off any vendor cloud.

Full policy: legal/PRIVACY.md.

Honest limitations

  • Favicons cannot be imported — the bookmarks API has no favicon field.
  • Imported bookmarks get today's date. Chrome does not let an extension set a bookmark's original creation date. Your exported files keep the real ones.
  • CSV is a flattened view: empty folders and "which folder is the toolbar" are not preserved. Use HTML or JSON for a faithful backup.
  • Markdown is share-only — BookmarkMagic cannot read it back.

Install

From the Chrome Web Store: here

From source:

npm ci && npm run build

Then load .output/chrome-mv3/ at chrome://extensions with Developer mode on.

Development

npm run dev

npm run verify is the gate everything else answers to — lint, type-check, knip, the grep gate and the test suite, in that order. It must be green before every commit.

The docs/ directory is the binding specification, not notes: where code and docs disagree, the docs win. Start with CLAUDE.md, then docs/00–docs/02.

Contributing

Bug reports and translation fixes are welcome — the issue forms ask for what is needed, and none of them requires you to write code.

If a bookmark file will not import, that is the most useful report there is, because the sample becomes a permanent test. Sanitize it first:

node scripts/sanitize-bookmarks.mjs your-bookmarks.html

That strips every address and title but keeps the structure, encoding and timestamps a parser bug depends on — so the sanitized file still reproduces the problem without handing over your browsing history.

CONTRIBUTING.md has the rest: the setup, the rules that are not negotiable, and how a reported file becomes a regression test.

Security issues: please follow SECURITY.md rather than opening a public issue.

Support development

Entirely optional — BookmarkMagic is free software either way.

GitHub Sponsors · Ko-fi · Buy Me a Coffee · Patreon · PayPal

Licence

GPL-3.0-or-later. Also see legal/EULA.md, legal/DISCLAIMER.md and legal/THIRD_PARTY_NOTICES.md.

Not affiliated with or endorsed by Google, Chrome, or any browser vendor. Browser names are trademarks of their respective owners.

S
Description
No description provided
Readme GPL-3.0
3 MiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 75.8%
Svelte 14.5%
JavaScript 9.2%
CSS 0.4%