gate the raw-HTML default instead of remembering it
Since Arc 1 the latent list has carried "raw HTML is omitted only because goldmark's default omits it". Shortcodes were the trigger, and they came and went without needing unsafe mode — a call renders a theme template (ADR-0036). So the right close is not a note saying we got away with it, but a gate: verify.sh now fails on WithUnsafe in any non-comment line under cmd/ or internal/. Proved both directions before keeping it. The first version also failed on the comment in render.go that explains the rule — a gate that fires on its own documentation is one nobody keeps, so it now skips comment lines. That is the seventh gate defect found by running against real code rather than reasoning about it. The latent row is gone rather than reworded, and the untrusted-boundary row says which half is now mechanism and which half still isn't.
This commit is contained in:
@@ -52,6 +52,12 @@ must do — not the theme. `verify.sh` fails if the embedded reference theme cha
|
||||
changing, because in practice those two drift together — and it fails on a `<script>` tag in that theme,
|
||||
because a reference theme that grows taste stops being a reference (ADR-0026).
|
||||
|
||||
**The injection boundary is a gate now, not a memory.** goldmark drops raw HTML from authored Markdown by
|
||||
default, and that default was the only thing standing between a Markdown file and script injection. A
|
||||
feature wanting to emit HTML renders a theme template instead (ADR-0036), so nothing here needs raw HTML
|
||||
enabled — and `verify.sh` fails on `WithUnsafe` appearing in any non-comment line under `cmd/` or
|
||||
`internal/`. Anything that genuinely needs it must argue with a failing gate first, which is the point.
|
||||
|
||||
## Coming back after a long absence
|
||||
|
||||
In order, cheapest first:
|
||||
|
||||
Reference in New Issue
Block a user