fix(anatomy): prescan closers searched after their opener; ASCII-only href trim; root painting attributes removed (security audit R3)
This commit is contained in:
1 parent
d3d63394dd
commit
157c854ed1
13 files changed
+3231
-21
No files matched your search
@@ -10,6 +10,7 @@ Migrate the anatomy core to Rust (review R3 scope): SVG analysis, anatomical tre
|
||||
## CLARIFICATIONS
|
||||
- `apps/app/tests/unit/canvas.trees.test.ts` is renamed to `.tsx` (it now mounts the canvas): a rename, no test deleted.
|
||||
- The sanitiser oracle (`oracles/r3/sanitiser.json`) was regenerated as corpus files were added; the TypeScript it runs (`packages/pdf/src`, `packages/anatomy/src`) is unchanged on the branch (criterion 4), so every regeneration is the same TypeScript's verdict. `highlight.json` gained `edgeDocument` only; its cases and sanitised trees are unchanged since d1aa35e (criterion 4).
|
||||
- Pass 2 (after the security audit, PASS + 1 MEDIUM + 2 LOW): the prescan searches each closer after its whole opener (`<!-->` desync), `href` locality on ASCII-trimmed text only, root `transform`/`filter`/`mask`/`clip-path` removed; 5 corpus files added (41), the wasm corpus has 49 cases; counts below updated.
|
||||
- Visual screenshots are uncommitted by design (plan O6); their result is recorded in RUST.md §9.3.
|
||||
|
||||
## ACCEPTANCE CRITERIA
|
||||
@@ -39,10 +40,10 @@ Migrate the anatomy core to Rust (review R3 scope): SVG analysis, anatomical tre
|
||||
EXPECT: gzip under 600000 bytes / exit 0 / app 352, core-wasm 29, pdf 140, anatomy 131, all passed
|
||||
9. The hostile corpus runs through the shipped wasm under the stated budgets, and the canvas composes within its own.
|
||||
CHECK: grep -E "R3 hostile corpus|R3 sheet handle" /tmp/r3-verify-check.log
|
||||
EXPECT: a hostile-corpus line with 44 cases, slowest under 150 ms, largest growth under 32 MiB; a sheet-handle line with a warm head median under 15 ms
|
||||
EXPECT: a hostile-corpus line with 49 cases, slowest under 150 ms, largest growth under 32 MiB; a sheet-handle line with a warm head median under 15 ms
|
||||
10. The hostile corpus covers the owner's classes (scripts, events, external and data references, DTD/entities, depth, element count, `<use>` count, cycles and expansion, malformed, namespaces, CSS, size).
|
||||
CHECK: ls crates/core/tests/fixtures/svg/hostile | wc -l; ls crates/core/tests/fixtures/svg/hostile | tr '\n' ' '
|
||||
EXPECT: 36 files including script, events, script-urls, external-use, data-and-images, external-urls, doctype-entities, malformed, namespaces, css, use-self-cycle, use-mutual-cycle, root-class-style, long-title
|
||||
EXPECT: 41 files including comment-desync-depth, comment-desync-attributes, href-unicode-space, root-presentation, and script, events, script-urls, external-use, data-and-images, external-urls, doctype-entities, malformed, namespaces, css, use-self-cycle, use-mutual-cycle, root-class-style, long-title
|
||||
11. The docs record the phase: RUST.md §9 (proofs, measurements, differences, risks), CHANGELOG, CLAUDE.md map.
|
||||
CHECK: grep -c "^## 9. R3" docs/development/RUST.md; grep -c "Rust R3, anatomy core" CHANGELOG.md; grep -c "anatomy/{svg/{prescan,tree,sanitize,refs,number,serialize},layer,compose}" CLAUDE.md
|
||||
EXPECT: 1 / 1 / 1
|
||||
Reference in new issue
Block a user