Decide: restore html-comment-strip broad sweep with framework-marker allowlist
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 30/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- security
Direzione di ricerca
Start by reading issue #176 and the current html-comment-strip behavior, including the INJECTION_PATTERNS set and its blanking semantics. Catalog the framework marker shapes and SSR or license comments named in this issue, then document whether a stable allowlist supports restoring the broad sweep. Done means a clear decision about the behavior and the risks of keeping the allowlist synchronized.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Follow-up to #176.
Before #176, html-comment-strip removed every comment outside <script> / <style> / <noscript>. After #176, it scrubs only comments whose data matches the INJECTION_PATTERNS set (currently 11 patterns) — and blanks them in place rather than detaching. The narrowing is what makes React Suspense markers ($, /$, $?, $!, [, ], …) safe automatically: they don't match any pattern, so they're left alone, and the framework's unmount walk doesn't trip on a missing node.
Tradeoff
Narrowing to pattern matches caps coverage at the recognized shapes. Novel injection phrasings, off-pattern prose, and benign-looking comments carrying instruction-shaped text — all of which used to be removed — now stay visible.
Decision needed
Should we restore broad-sweep behavior with a framework-marker allowlist (skip $ / /$ / [ / ]-prefixed data, plus any other markers we identify), and continue blanking via comment.data = \"\" rather than detaching?
Tradeoffs to weigh:
- For: restores pre-#176 coverage for off-pattern injection prose; reduces dependence on
INJECTION_PATTERNSkeeping pace with attacker phrasing. - Against: allowlist enumeration becomes load-bearing — a missed framework marker re-introduces the navigation crash class through a different path. Frameworks evolve their hydration marker syntax over time (React 18 → 19 changed marker shapes); we'd need a story for keeping the allowlist in sync.
Either way, no detach — the carrier stays attached.
Suggested next step
Catalog the marker shapes currently in the wild (React 18/19, Vue 3, Svelte 4/5, Astro islands, htmx, Lit hydration) and a few SSR build stamps / license headers we don't want to touch, then re-evaluate whether the allowlist is small/stable enough to be worth the broad sweep.
- Lingua principale
- TypeScript
- Stelle
- 35
- Fork
- 4
- Merge medio
- 4g 14h
- PR unite (30g)
- 36
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pixiebrix/agent-browser-shield
-
Rule proposal: canvas-text-annotate — flag canvas/video text surfaces invisible to DOM walkers Apertaenhancement rule-proposal
Difficoltà 5/5 Più di una settimana Idoneità per principianti 28/100
pixiebrix/agent-browser-shield#123 · 1 commento ·
-
enhancement rule-proposal
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
enhancement rule-proposal
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
pixiebrix/agent-browser-shield#121 · 1 commento ·
-
enhancement rule-proposal
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Tutte le issue di pixiebrix/agent-browser-shield
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
mksglu/context-mode#1200 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
anthropics/claude-code#96687 ·
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
AOSSIE-Org/DebateAI#582 · 2 commenti ·