fix(anatomy): V1-2.2 review findings, PIs and HTML refused, bounds

Security audit (PASS, 2 MEDIUM, 2 LOW) and verifier (ECARTS 6) on
741c25c: processing instructions and HTML fetchers refused, active
content under a long title classified, linear review groups, full
fixpoint check, bounded preview drawings, missing cap fixtures and
property checks, record wordings.
This commit is contained in:
bchanot committed 2026-10-29 13:38:33 +01:00
1 parent 741c25c464
commit 8294d5471c
15 files changed
+448 -72

No files matched your search

@@ -1201,6 +1201,15 @@ supplied; they are not invented.
referential gaps are left to the validation panel. A `dependents(key)`
query feeds the delete confirmations. TypeScript holds no schema of its own
and no Zod copy; it reads the ts-rs types.
- As built in V1-2.2 (implementation reading, for the owner's confirmation): the
wire ops are `insert`, `update`, `remove`, `move` (the reorder), `set_status`
and `mark_reviewed`; besides what breaks strict parsing they refuse what would
leave an element unaddressable or outside the editor's offer
(`duplicate_key`, `unknown_key`, `id_changed`, `invalid_position`, `too_deep`
beyond 8 finding levels); removing a view or a category leaves the
annotations that name it in place, dangling for the validation panel, which
`dependents` lists before the confirmation (§6.6 « with descendants » read
as the finding tree's children).
- Ids are generated by the page (`<prefix>-<10 lowercase base32
characters>`, alphabet `a-z2-7`, inside the stable-id rule), passed to the
core, never derived from labels, never editable, never reused.
@@ -1305,6 +1314,16 @@ The page reads the file with the core SVG reader before anything is stored.
| Any other removal (editor metadata and namespaces, `data-*` attributes, `<style>` elements, `class` or `style` on the root, ids outside the grammar, unsupported elements such as `symbol`, oversized `title` or `desc`) | cleaning offered: « Nettoyer et utiliser cette version », after the composed preview of the cleaned drawing and one confirmation; a removed `<style>` element is named, since the `class` attributes it styled then render unstyled |
| No removal | used as is |
- Stricter than the table, as built in V1-2.2 (for the owner's confirmation):
an `<a>` link is refused even when it points inside the document, and so is
a value holding a backslash (a CSS escape can spell `url(` or `javascript:`),
`expression(`, `image-set(` or `behavior:`, an HTML element (XHTML namespace,
or a fetcher such as `img`, `meta`, `form`) and an HTML fetching attribute
(`src`, `srcset`, `action`, `http-equiv`…).
- A processing instruction other than the XML declaration (`<?xml-stylesheet …?>`)
is refused as active content: the reader's tree never sees it, but the stored
bytes would keep it; the verdict refuses a stored drawing that carries one
(V1-2.2, security audit).
- An oversized `title` or `desc` is a removal for the cleaning only: the reader
of stored drawings refuses such a file whole (`too_complex`), so it reaches
Storage only cleaned (V1-2.2).