Neutralize reserved markers in wrapped mail text #229
No reviewers
Labels
No labels
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:go
svd:hold
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/mail-mind-mcp!229
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/228-neutralize-untrusted-fence"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Closes #228. Operator ruling · Mind-spec alignment
Evidence
Merge Danger
Reversible code change. Scope is the display and budgets of the three existing fenced payloads. Coverage is from generated fixtures. Downstream reader behavior, live sources and deployed data remain unverified.
Independent Standards PASS · 0 open findings at
3782e2951b9412c7c68e2e2c9cd3fa9fc5434227.The exact diff passed
git diff --check. The reviewer found no breach of the repository's coding and security standards or ADR 0008 §2. The rendering callback preserves sign-off selection and deduplication and accounts for separators at the line-boundary cap.Independent Spec FAIL · 1 open finding at
3782e2951b9412c7c68e2e2c9cd3fa9fc5434227.The operator requires that a reader ignoring case also sees no reserved marker inside the payload. The ASCII-only matcher leaves a Unicode long s in either marker intact. The generated input matches the reserved string after the same Unicode case fold used in the fixture oracle. Existing fixtures cover ASCII case variants. The other reviewed tool, scope and budget requirements match the agreed design. Operator ruling
§19 security review · STOP · 1 open finding at
3782e2951b9412c7c68e2e2c9cd3fa9fc5434227.The review found a Unicode case-fold collision at the three existing wrapper boundaries. The shared matcher only ignores ASCII case. Local checks using the exact matcher and pinned wrapper confirmed both reserved markers survive as case-fold equivalents with U+017F and with U+FB06. The §6 ruling directs a STOP for any further path escaping the fence. The commit-range secret scan found no leaks. These checks used generated strings and repository code. Downstream parsing, deployed incidence, live IMAP/JMAP and deployed-mirror coverage are unsupported.
No merge clearance. The guide is asked to obtain an operator ruling before a repair. Operator ruling
§19 security review · PASS · 0 open findings at
da73e23596aff45154be47476e13eac3d94b2df3.The revision closes the Unicode case-fold collision found on the previous head. At the three existing wrapper boundaries the implementation recognizes original bracketed spans, compares their Python case folds and replaces only the opening bracket of exact matches. The public fixtures confirm spelling preservation, ordinary bracketed text, both marker variants with U+017F and U+FB06, the shared read budget, and the signature line boundary. The focused suite passed 234 cases. A separate generated-string check enumerated all 4,194,304 fold-equivalent original strings per marker under Unicode 16.0.0. It verified each replacement and confirmed the reserved bracket characters have no other fold preimages in that runtime. The original matcher failed six regression cases before the fix.
The escaping is confined to the existing wrapped output. The diff leaves stored data, evidence selection, peer output and external payloads unchanged and adds no network access. Gitleaks reported no findings on the reviewed commit range. Downstream fence interpretation, deployed incidence, live IMAP/JMAP and deployed-mirror coverage remain unsupported. Previous finding · Operator ruling
Independent Standards PASS · 0 open findings at
da73e23596aff45154be47476e13eac3d94b2df3.The reviewer inspected both commits and the exact diff, which passed
git diff --check. The change follows repository conventions, applies Unicode case folding before the existing payload caps and preserves the evidence boundary and line-based signature limit. The reviewer independently checked generated Unicode variants, nested brackets and ordinary text.Independent Spec PASS · 0 open findings at
da73e23596aff45154be47476e13eac3d94b2df3.The Unicode finding is resolved. The matcher preserves the source code points after the replaced bracket. Public-tool fixtures cover both reserved markers with long s and the expanding ligature, ordinary text, truncation, batch reads, repeated attachment calls and combined signatures. The reviewer independently checked the six non-ASCII single-code-point substitutions that fold to marker substrings.
Exact-head CI and raw-log audit
Head
da73e23596aff45154be47476e13eac3d94b2df3passed Woodpecker pipeline 131. Ruff, mypy, the non-integration suite (1,681 passed, 8 skipped, 30 deselected) and dependency audit passed.Audited the complete CI log records for clone (17171, 9 records) and check (17172, 232 records), and the exact-head local verification log, per dev/stables#2237. Zero occurrences of
command not found,errors during collection,= not found,ran outside the project environment, or"is_error":true. The raw JSONL SHA-256 is6993f51690b376590518cee3ec31509b87a422a64f6b1b3d9ad6490289475940for clone andf8822b5a658eaee96dcd813680775d4f3bf89787a7052500bef531855302a99ffor check.