Repository navigation
fix(report): Markdown escaping leaves ordinary text readable (parentheses, !, bare &) - #1203
Conversation
Auto-review did not completeThe
Partial findings recovered from the session (incomplete, unverified, and NOT a merge signal): Show partial reviewI found no correctness or security problems in this change. I read the diff only and did not run the tests.
|
…eadable; brackets and block markers stay escaped #3522 Parentheses and ! cannot form a link or image once [ ] are escaped, so they were noise (\(recommended: 30-60\)). Docs: none. Skill: no change. Signed-off-by: Nik Cubrilovic <[email protected]>
297cf63 to
d8e5ff9
Compare
Auto-review did not completeThe
Partial findings recovered from the session (incomplete, unverified, and NOT a merge signal): Show partial reviewI found no issues in PR #1203, so none of this review carries a severity tag. I read the diff only and did not run the tests.
|
Signed-off-by: Nik Cubrilovic <[email protected]>
Signed-off-by: Nik Cubrilovic <[email protected]>
Signed-off-by: Nik Cubrilovic <[email protected]>
Signed-off-by: Nik Cubrilovic <[email protected]>
#1186's escaping wrote backslashes into plain sentences an agent reads:
Title is 72 characters \(recommended: 30-60\),on /pricing \(3 pages\!\). Every link, image and reference definition needs an unescaped[, and[ ]stay escaped, so( ) !cannot form anything and no longer need it.>only matters at the start of a line (still escaped there), and&only where it reads as an entity (still escaped there).Still escaped:
\\,[ ], backtick,<,|, entity-shaped&, leading block markers (now including>). The renderer-level hostile-input tests (Bun.markdown) pass unchanged; new tests pin that ordinary text is untouched. Link destinations are unchanged.Docs: none. Skill: no change. Refs squirrelscan/repo#3522.
Independent security review (Sonnet-high, read-only)
About 180 hand-built inputs plus a 200k-value fuzz over 7 sinks (list item, whole line, bold, link label, table cell, quote/heading, mid-sentence), in default and GFM-autolink modes of
Bun.markdown, with a positive control (unescaped definitions and images do render): no bypass. Covered: reference-style links and definitions, collapsed and shortcut references,<...>autolinks, footnotes and wikilinks,!before an escaped[, trailing and doubled backslashes, entity forms ([,[), line-break variants (CR, LS, NEL, U+2028) then block markers, setext underlines, indented code, table-cell|and newlines.( ) !need[or]to do anything and those stay escaped;>only matters at line start (still escaped);&only when entity-shaped (still escaped). Existing hostile suite and the report suite pass (26 and 703).Bare-URL autolinks: GFM extended autolinks of page-controlled text (a bare URL,
www., an email) are only ever linkified with an href equal to the displayed text, outside a link label; inside[label](dest)nested autolinks are suppressed, so a label naming another host still links todest(text-versus-destination spoofing that exists before and after this PR, unchanged). With autolinks on in a renderer, a bare attacker URL in a sentence becomes clickable but shows its real host.Known low, not from this PR: a whitespace-only value collapses to one space, so
**${v}**can render as<hr>.