fix(domain): shape check sees positional parents, multicast never an own address

This commit is contained in:
bchanot committed 2026-10-24 03:47:07 +02:00
1 parent 257a29b09b
commit 1ec9e1bea6
6 files changed
+273 -8

No files matched your search

+13 -1
View File
@@ -3411,7 +3411,10 @@ other LOW reserves of §11.16 stay tracked.
**Serde hardening of three v3 shapes (owner go).** `report::read::check_v3_shape` refuses on the raw value,
before the typed read, `sheet` or `practitioner` not an object and an observation `severity` not a string
(`ReadFailure::Invalid` with the field named). Called at the two entries that read a v3 report from outside:
(`ReadFailure::Invalid` with the field named at `read_report_document`; a `serde_json::Error` at
`parse_envelope`, whose caller drops the copy as before). The report, each observation and the envelope
must be objects themselves, or a positional parent would carry those fields past the check (found by the
closing gates, test `a_positional_parent_does_not_carry_a_refused_shape_past_the_check`). Called at the two entries that read a v3 report from outside:
`read_report_document` (v3 branch: PDF import, bare archives, draft restore) and `parse_envelope` (the session's
archive copy). Nothing else narrowed: an unknown field and an absent `severity` are read as before; `null`
severity was and stays refused (optional, never nullable). Test `characterisation_serde_tolerance` turned
@@ -3436,3 +3439,12 @@ rootless or rootful Docker, a probe from another device) and the two remedies ar
firewall or configuration was changed.
**R5.6 prepared, not started.** Plan `.claude/tasks/plans/2026-10-24-rust-r5-6-fingerprint-switch.md`.
Closing gates round 1 (257a29b): `pnpm check:all` green 03:39:24; security PASS (2 MEDIUM, 6 LOW,
`.claude/audits/2026-10-24-rust-r5-5-closing-security.md`); fresh verifier ECARTS(2): the shape check was
blind under a positional observation or envelope (fixed, as above), and a stale "or null" message (fixed).
Also fixed: a multicast address no longer counts as an own address (it binds and connects on Linux; the
private-range rule masked it end to end). Kept: the binary's own-address test checks nothing more than
loopback where `ip` is absent; the internal typed re-reads (`pdf/write/export.rs`, `ops.rs`) read values the
core itself built and skip the raw shape check; the other nested v3 fields and v2 keep serde's leniency
(outside the go).