- ci.yml: the Firefox package is built and checked beside the Chrome one.
- release.yml: three release files — the Chromium package (Chrome Web Store
and Edge Add-ons), the Firefox package and AMO's sources archive — each
staged by exact name so a missing one fails the run, both manifests checked
against the tag, SHA256SUMS over all three.
- One store job per store (docs/12 §3), each off until its repo variable is
true, each in its own GitHub Environment holding only its own secrets, each
checking the downloaded file against SHA256SUMS before uploading. They
install tools/publish — publish-browser-extension 6.2.0 and its three
dependencies, from their own lockfile, scripts off — instead of the ~320
packages of the dev toolchain, which the single old job installed next to
four Chrome secrets.
- The old job could not have worked: it sent CWS API v1.1 credentials, and
v1.1 was shut down on 2026-10-15. store-chrome uses v2 (publisher id and a
service account) and sets CHROME_API_VERSION explicitly. store-firefox is
listed and desktop-only; store-edge sends the Chromium package.
- Dependabot watches tools/publish; the licence gate reads its lockfile too.
- qodana.yaml: clean since the first run's findings were handled, so any new
one now fails that (non-required) workflow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wxt.config.ts now builds for the target browser (docs/08 §1, §9):
- `manifestVersion: 3` for every target — WXT built Firefox as MV2;
- Firefox gets browser_specific_settings.gecko — the permanent id
bookmarkmagic@poli0981.dev, strict_min_version 140.0 (the first that
accepts data_collection_permissions, which AMO requires of new add-ons),
and data_collection_permissions { required: ["none"] } — and no
minimum_chrome_version; Chrome keeps its floor of 136;
- Vite targets firefox140 for that package;
- the sources archive AMO reviews leaves out coverage, captures, store copy,
docs, tests and tools.
Permissions, CSP, pages and icons are identical in both packages.
check-manifest.mjs takes --browser chrome|firefox, mapped through a fixed
table to .output/<target>-mv3 (still no path from the command line), and
pins each package's exact key set and floor; the gecko block is compared key
order aside. New npm scripts: build:firefox, zip:firefox; verify:full builds
and checks both packages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
qodana.yml runs qodana-js (Ultimate, QODANA_TOKEN) on pushes to main, pull
requests, a weekly schedule and by hand, in two jobs (docs/12 §2.7):
- `scan` installs the dev dependencies with scripts off — qodana-js resolves
types through them — and holds only a read-only GITHUB_TOKEN; PR comments
and annotations are off, the SARIF report is kept as an artifact;
- `publish` installs nothing and uploads that SARIF to code scanning
(category qodana), so the findings sit beside CodeQL's.
The action is pinned to the commit of v2026.2.2 (the newest tag is younger
than the 7-day cooldown). Sharing a runner with dependency code is recorded
as an exception to the Sonar rule: the token can only upload reports.
triage.yml, from review of the first draft:
- comment and close first, label last — the label is what a re-run reads as
done, so it must not exist before the work;
- an `enhancement` issue with no answer to the form is closed only when the
owner added the label; otherwise it goes to needs-triage;
- checkout and setup-node pinned to commits, no cache: this workflow runs
them with a write token on events anyone can trigger.
README gains the Qodana badge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MAINTENANCE.md is the policy: dependency updates on a schedule, high and
critical advisories fixed as soon as a fix exists, major platform upgrades,
bug/UI/UX/accessibility/translation fixes, and features only when they are
on docs/15's roadmap or genuinely needed.
- The feature form asks one required question — on the roadmap, needed for
a fix, or something new — and links the policy and Discussions › Ideas.
- scripts/triage.mjs decides what happens, as a pure, unit-tested function;
.github/workflows/triage.yml carries it out with `gh` alone. Something new
is labelled maintenance-mode, commented and closed as not planned; the two
in-policy answers get needs-triage; an outside `feat…` pull request is
closed the same way. Owner, members, collaborators, bots and `roadmap` are
exempt.
- pull_request_target checks out the base branch only, runs nothing from the
pull request, and never interpolates a title or body into the shell.
- README gains a status badge and a "Project status" section; CONTRIBUTING,
the PR template and the issue chooser say what is accepted.
- docs: 00 status, 11 inventory, 12 §2.6 and §5 (labels), 13 §6, 15 (a
pointer to the policy, not a copy, and the decision-log rows); CLAUDE.md
Phase 10.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts/check-licenses.mjs reads package-lock.json, where npm records each
package's own `license` field, and fails on anything outside two lists
(docs/09 §3.2):
- what the build compiles into the extension (svelte, clsx, wxt,
@wxt-dev/browser) must be permissive and GPL-3.0-compatible;
- everything else is build tooling that never ships, so file-level copyleft
(MPL-2.0, lightningcss) is also accepted; AGPL, source-available terms and
missing or custom licences are not.
SPDX expressions are evaluated, nothing is installed or fetched, and the
tests call the functions directly rather than spawning the script. It runs
in `verify`, CI's quality job and the release build.
The shipped list moves out of wxt.config.ts into
scripts/credited-packages.mjs, so the build gate, the notices test and the
licence gate read one list instead of two copies and a regex.
legal/THIRD_PARTY_NOTICES.md said the tooling was all MIT/Apache-2.0/ISC; the
lockfile also has BSD, 0BSD, MIT-0, BlueOak, CC0 and MPL-2.0. Corrected — a
description of tooling that never ships, so no LEGAL_VERSION bump (14 §3.1).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ro.ts, ro-notices.ts and ro-import.ts, written from Chrome's own ro
terminology (marcaj, Bara de marcaje, dosar) in the polite plural, and
marked TODO(review-ro) until a native pass (docs/07 §4).
- The first locale with three plural forms: every plural key carries
one / few / other ("1 marcaj", "5 marcaje", "20 de marcaje"); count-less
labels repeat the bare noun (docs/07 §5).
- Tests: comma-below ș ț only (a cedilla anywhere in the Romanian files
fails, comments included), "de" only in `other`, selectPluralForm at
the CLDR boundaries (0, 1, 2, 19, 20, 101, 120), tPlural end to end,
and ro-RO collation for Sort A→Z.
- _locales/ro/messages.json; check-manifest requires it.
- Română joins every dictionary's endonym list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- zh-CN.ts, zh-CN-notices.ts and zh-CN-import.ts, written from Chrome's
own zh-CN terminology (书签, 书签栏, 文件夹, 导入, 导出) and marked
TODO(review-zh) until a native pass (docs/07 §4).
- _locales/zh_CN/messages.json; check-manifest requires it.
- resolveLocale maps zh, zh-CN, zh-SG and zh-Hans* to zh-CN. zh-TW,
zh-HK, zh-MO and zh-Hant* get English, matching Chrome's own manifest
fallback (docs/07 §1-2).
- <html lang="zh-CN"> makes Chrome draw Simplified glyphs rather than
Japanese ones; Sort A→Z collates by pinyin.
- 简体中文 joins every dictionary's endonym list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A second adversarial review, of the review-fix commits themselves, found
six problems. All are fixed here.
- Focus after a delete: a delete from the duplicate panel, or from the trash
button of a row that did not have focus, left keyboard focus on <body>.
The dialog cannot hand focus back to a button that went with what it
deleted. `confirmDelete` now says where the delete was asked for: the
tree gets focus back, and the panel moves it to the next copy's button,
else to its close button. Checking for <body> was not enough: after a
dialog closes, focus sits on its button until the browser's next
rendering update, so a control in a closed dialog, or a detached one,
now counts as lost too. Confirmed in the harness for all three paths.
- Import step 04: confirming the safety backup removed both of its buttons
and dropped focus. A phase change now hands focus back to the heading.
- WebRTC: both gates matched `\bRTCPeerConnection\b`, which no word
boundary lets match `webkitRTCPeerConnection`, an alias Chrome still
ships. Prefixed aliases now count. The evasion comment in guard.mjs no
longer claims to cover every way of hiding a member name.
- New folder: Chrome fires onCreated before create() resolves, so the live
event could insert the folder first and newFolder then inserted a second
row with the same id. It now inserts only when the folder is not already
there, with a test that loses the race on purpose.
- Screenshot harness: `wxt build` empties .output first, and re-listing it
threw inside the request handler, which ended the process. It now answers
404 or 503 and recovers once the build is back.
- The duplicate summary uses one wrapper key instead of two fragments glued
together in markup (docs/07 §2); Japanese gets its own separator again.
- Docs: the popup's tabId and `tabs.getCurrent` (docs/02 §6, 08 §2), the
new-folder race (03 §3), focus after deletes and import phases (06 §5).
SonarCloud's scan job now also receives the generated .wxt/, so
tsconfig.json's `extends` and the `@/` alias resolve (12 §2.5).
- Tests for edit/tree-keys.ts, which had none, and for the focus helpers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Findings 5–9 of the security review of 1.1.0. None broke the zero-network
or permission promises of the shipped build; each made a claim stronger
than the code behind it.
- Diagnostics: every DiagEvent string field is now a union of fixed values
(import phases, FileFormat, the ErrorKeys describeError returns, the two
edit actions, the three storage issues), and error names pass an
allowlist, logged as 'other' otherwise. `@ts-expect-error` cases keep a
title from compiling instead of trusting review.
- guard.mjs: optional-chained computed access on globals, `Reflect`, and
member names assembled from strings or templates (`el['inner' + 'HTML']`)
all got past it.
- check-manifest.mjs: the bundle is scanned for the same identifiers as the
source, as bare words — `fetch.call`, aliases, RTCPeerConnection and
importScripts shipped unseen — and every src/href in the built pages must
exist inside the package.
- CSP: `default-src 'none'` closes everything unlisted. Every directive the
pages use is listed, so nothing changes for them; the harness pages load
with no violation.
- screenshots.mjs: listens on 127.0.0.1 only, checks `OUT + sep` rather than
a bare prefix, decodes paths safely, and runs Chrome asynchronously — the
synchronous exec blocked the very server Chrome was waiting on, so
`--shoot` hung forever.
- SonarCloud: coverage runs in a job with no secret; the scan job installs
nothing and receives lcov as an artifact. A job's secrets are readable by
every step on its runner.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From the v1.1.0 adversarial review (security) and the docs pass:
- clsx (MIT) ships too — the Svelte runtime imports it — and wxt's browser
module as well as @wxt-dev/browser. All four are now credited in About,
PRIVACY, README and both notice files, and wxt.config.ts fails the build when
code from any uncredited package would ship; tests/unit/third-party.test.ts
keeps the notices in step with that list.
- Sanitizer, CSV: default-deny. A title with an unquoted comma — the row that
makes the extension report CSV_ROW_MISMATCH — shifted a file: path and free
text into columns no rule rewrote, and the host-only check passed them.
- Sanitizer, HTML: unknown attributes (Firefox POST_DATA, any DATA-*) are
rewritten; only dates, root markers and the charset line are kept.
- Sanitizer: a value-level leak check over CSV fields, attribute values and
JSON strings, and a refusal that prints counts only — it used to print the
leaked words and ask for them in a public issue.
- BM_ENV_ERROR_CODES joins the per-locale message check, with the four fixed
keys describeError maps; the popup no longer logs crashes nothing can read.
- docs 00/02/03/05/06/07/08/09/11/13 describe v1.1.0 (diagnostics moved to
09 §7; 13 §3 points at store/listing.* instead of a drifting copy); tokens
and gen-icons comments corrected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No LEGAL_VERSION bump: every change clarifies, corrects or removes an
obligation (docs/14 §3.1, new "contact details → No" row and a table of what
version 1 means).
- All four documents: version/date header and a copyright line.
- EULA clause 3 becomes a non-binding note — GPL-3.0 §10 forbids adding
restrictions; clause 6 gives legal@ and dmca@.
- DISCLAIMER describes Replace as it now behaves, and adds the name/fork
notice with takedown@ and dmca@.
- PRIVACY describes the in-memory diagnostics log, the Chrome Web Store's own
role, and that opening a bookmark is the browser's request, not ours;
contact privacy@.
- THIRD_PARTY_NOTICES lists the Svelte runtime and WXT's browser shim (MIT),
which the build always compiled in; the notices now ship as
THIRD_PARTY_NOTICES.txt and check:manifest requires the file.
- security@ (SECURITY.md), code@ (CoC, issue chooser), README Contact table;
contact@ retired. links.test.ts now scans all of src/ for an address.
- README: new formats and features, Sonar/CWS badges, verify:full, the
screenshot harness. Store listings EN/VI/JA follow.
- docs/15 decision rows, next direction and backlog; CLAUDE.md Phase 7, the
TS 7 / TS 6 alias rule and --ignore-scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Import Chrome's profile `Bookmarks` file and Firefox's JSON backup directly.
Each reader is held to a parity rule against its browser's own HTML exporter,
tested on Chromium/Firefox-faithful fixture pairs. One entry point,
parseBookmarkFile, sniffs by content (JSON first, parsed exactly once, routed
by shape); the picker loses its extension filter, which hid the extensionless
`Bookmarks` file. Firefox's internal root names are localized by the caller.
Merge finally reuses the folders a user already has, level by level, appending
new items (core/merge.ts) - 1.0.x planned it exactly like Replace. Root folders
are unwrapped by marker (core/route.ts), so restoring a backup no longer nests
Other and Mobile one level deeper each time, 1.0.x backups included. Replace
never dedupes, plans before the backup is taken, and refuses a backup the
import could not read back (BACKUP_EXCEEDS_LIMITS) before anything is written,
downloaded or deleted. The save dialog's late rejection is marked handled.
Also found: the seeded round-trip suite had compared 200 empty trees since
Phase 1 (xorshift32 seeded with 1-200 draws near zero first). makeRng now
scrambles the seed and every seeded suite checks its corpus is non-trivial.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SonarCloud's second pass still flagged S8707: the directory to check came
from argv and flowed into file reads, and a startsWith() allowlist did not
count as sanitizing it. The CLI now only ever checks the repository's own
.output/chrome-mv3; the logic is an exported checkExtension(dir) (typed by
check-manifest.d.mts) that the tests call directly, so no command-line path
reaches a file read at all.
Path resolution moved inside the entry point: under Vitest's jsdom
environment import.meta.url is not a file: URL, so resolving it at module
load threw on import. The two Node-script suites now run in the node
environment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first CI-based SonarCloud scan failed the quality gate on its new-code
security rating, with two findings in check-manifest.mjs:
- S8707: it read whatever directory the CLI argument named. It now accepts
only paths inside this repository or the OS temp directory (where its
tests build fake extensions), and says so when it refuses.
- S8689: its success line echoed values read from the file. It now prints
constants — the manifest has just been proven equal to them.
And four S8786 regexes in guard.mjs plus one in the sanitizer, where a \s*
beside an optional quote beside another \s* could backtrack: each is now
written so no two quantifiers compete for the same characters, and the
markup rule is two linear steps (find the tag, then look inside it). The
sanitizer's JSON tokenizer no longer reassigns its loop counter (S2310).
While here: with no default-src, style-src was open, so a remote stylesheet
could still load. The CSP now adds `style-src 'self' 'unsafe-inline'`
(Svelte sets style attributes); check-manifest pins the new string.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sanitize-bookmarks.mjs accepted any JSON object and rewrote only "url" and
"title". Chrome's profile Bookmarks file keeps titles under "name" (plus
meta_info and a base64 sync_metadata blob), so it came out with every title
intact, passed the host-only leak check, and was written as "sanitized" —
the exact file a reporter whose import failed would attach.
- JSON dialects are recognised by shape (BookmarkMagic, Chrome profile,
Firefox backup); any other JSON is refused. Rewriting is default-deny: a
small tokenizer tracks the key of every string value and replaces all of
them except structural keys (types, ids, timestamps, root GUIDs), by span,
so layout and key order stay byte-identical.
- The backstop now reads the output's TEXT: for HTML it strips markup and
refuses on any word that is not a placeholder — independent of the
rewriting rules, unlike the old host-only check whose test shared its
blind spots. <DD class=…> notes, file: ICON_URIs and <H1>/<TITLE>
owner names are rewritten.
- Attribute values decode in one pass (CodeQL js/double-escaping), <DD>
bodies are found in linear time (Sonar S8786), the input is never
overwritten, size is checked before reading, and bytes are bytes.
- The 627-line file is split into scripts/sanitize/ modules; the
user-facing entry stays plain .mjs for reporters on any Node.
gen-fixture.mjs validates its flags (whole numbers >= 1, values required, no
unknown flags) and its loop visibly advances (Sonar S2189 blocker).
gen-icons.mjs says what is true: it is the icons' source of truth.
Every script now carries // @ts-check and tsconfig.scripts.json runs them
through the TS 7 tsc in `npm run check`; docs/10's size rule names .mjs.
Regenerated icons are byte-identical.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The "no network access" claim rested on one grep gate. An audit ran its
exact patterns against 28 bypasses and every one got through — an alias
(`const go = fetch`), computed global access, a call split over two lines,
`innerHTML +=`, `{ @html }`, remote url() in CSS — and a checkout path with
a space or diacritic made it scan nothing and print "clean". Now:
1. The production manifest declares an extension-page CSP with
`connect-src 'none'` (plus closed img/font/media/frame/form sources), so
Chrome itself refuses every fetch, XHR, WebSocket, EventSource and beacon.
No default-src, so Svelte styles are untouched; dev builds omit it so
the HMR websocket works. docs/08 used to say "never add a CSP" because
MV3 forbids loosening — tightening was always allowed.
2. check:manifest scans every shipped .js for network APIs (dependency code
included), pins the exact CSP and the Chrome floor, checks that every
file the manifest and pages reference exists, resolves paths from the
script instead of the cwd, and sets exitCode instead of exit().
Vite's modulepreload polyfill — the one network call in the bundle — is
disabled; every Chrome at the floor supports modulepreload natively.
3. guard.mjs matches whole files (so \s* spans newlines), bans the API
identifiers outright, bans computed access on globals, scans .html and
.css, has no test-file exemption, uses fileURLToPath, and fails when it
scanned nothing. docs/08 §3 points at the file instead of restating it;
the restated copy had already drifted.
Both scripts finally have tests (48 + 18 cases, every audited bypass
included). One src comment named the API in prose and is reworded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
docs/13 §6 stated as present-tense fact that "GitHub issues — templates route
bug reports with sample files", and docs/12 §5 carried the same as an unticked
box. Neither was true: .github/ held only FUNDING.yml, dependabot.yml and
workflows. Meanwhile the entire v1.0.x roadmap is "fixture + test per report",
which cannot happen if reports arrive without the file that broke.
Five issue forms plus a chooser, blank issues disabled. parser_report.yml is
the one that matters: it requires the sanitized sample, asks which browser
*version* produced the file, and asks explicitly for consent to commit the
sample as a GPL-3.0 fixture — it lives in a public repo forever, and nothing
previously asked.
scripts/sanitize-bookmarks.mjs makes "attach a sanitized sample" something a
reporter can actually do. It works by span replacement rather than by
reparsing, so every byte outside a replaced address or title is provably
untouched: BOM, doctype, line endings, tag and attribute case, quoting,
indentation and every timestamp survive, and so do the properties a parser
branches on — port, path depth, trailing slash, query-parameter count and
order, percent-escapes, HTML entities, and the distinctness of hosts that
dedupe depends on.
Its test asserts the promise rather than the implementation: for every fixture
in the repo, the sanitized file must detect as the same format, parse to the
same stats, warnings and topology — or fail with the same error code — and leak
no original hostname. Writing it immediately found three real defects: a data:
URL containing markup broke the title regex and left that bookmark's title
unsanitized; an & in an HREF came back as a bare &, silently repairing the
escaping of the file being reported; and Firefox's ICON_URI leaked a full
hostname past every other check. The last one is why URL-valued attributes are
now swept by value shape instead of by an enumerated list.
scripts/gen-fixture.mjs is the generator docs/11 §2 named, .gitignore has
always reserved a directory for, and the 2 s parse budget needed in order to be
measurable at all.
CONTRIBUTING.md collects the five-file ritual for turning a user's file into a
regression test, which was previously spread across CLAUDE.md, docs/04 and
docs/11 with no single entry point — including the .gitattributes rule that
stops EOL normalization destroying the bytes a bug depends on.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>