Skip to content

html: srcdoc attribute (embedded document + script) is invisible to every structural signal #2645

Closed

Description

@squid-protocol

HTML's srcdoc attribute (on <iframe>, and legal on other embeddable elements) embeds a full inline HTML document — including <script> content — as a string. Unlike a real <script> tag, it never trips the _lens_config.py HANDSHAKE_REGISTRY (the trigger requires ^[ \t]*<script\b starting a line, not a token inside a quoted attribute value), and io's attribute regex (src|href|action|poster|data) omits srcdoc.

Net effect: a file consisting entirely of <iframe srcdoc="<script>eval(1)</script>"> scores 0 on high_risk_execution; io records only the generic <iframe> tag match; nothing else fires. Evidence: isolated micro-repro scans (galaxyscope --db-only, committed scratch repo, engine main a837c3a) — state_danger=0, arch_io=1 only. grep -rn srcdoc gitgalaxy/ returns zero hits engine-wide.

Fix shape: add srcdoc= to html's high_risk_execution rule (currently None) or extend io's attribute list — srcdoc has zero overlap with any other html rule, so no overlap-cost concern. Do NOT additionally route generic on[a-z]+= or href="javascript:..." there — isolated probes confirm those are already correctly claimed by listeners/reflection_metaprogramming/safety_bypasses (no state_danger contribution, no double-count wanted).

Found by the #1096/#2560 rosetta n/a review sweep (keyword-rosetta docs/GATING.md n/a semantics; html's other two n/a cells — globals, state_mutation — were validated as real morphology in the same review).

Activity

  1. added
    bug
    core-engine
    on Sep 2, 2026
  2. squid-protocol commented on Sep 3, 2026

    @squid-protocol
    OwnerAuthor

    Closing: verified fixed on main. A srcdoc-bearing <iframe> is no longer counted by io — it embeds a document rather than fetching one. Landed in the html work of Batch B.3 wave 2 (#2681).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcore-engine

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions