Skip to content

gunbhub R1 React/TSX consumer via canonical std.markup + XSS reject-witness - #4946

Merged
briansrls merged 5 commits into
mainfrom
session/fierce-heron-359
Jun 15, 2026
Merged

briansrls merged 5 commits into
mainfrom
session/fierce-heron-359

Conversation

@briansrls

@briansrls briansrls commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds dsl/std/react_markup.dag: gunbhub R1 React/TSX consumer surface (ReactMarkupNode) that reduces to canonical std.markup.Fragment and serializes through the single serialize_fragment fold (CoC=1 with Fragment-IR serializer IC #4940).
  • Fail-closed XSS gate: href/src values with javascript:, data:, or vbscript: schemes are rejected before emit via MarkupEmitResult (EmitOk / EmitRejected).
  • By-execution witnesses in dsl/test/claim/react_markup_witness.dag (consumer + XSS reject + REQ-A trusted-url escaping) and dsl/test/claim/gunbhub_react_browse_witness.dag (repo-browse page structural compose + serialize).
  • Enrolls both keystones in claim-witness corpus shard b (24→26 rows).

Note: A v4 ReactElement bridge was attempted but dropped — combining --source-root dsl + --source-root src/v4 hits an Element variant collision between std.markup.Fragment and ReactCreateElementChild. The executable consumer path is dsl-rooted ReactMarkupNode; v4 bridge is a follow-on once the name collision is dissolved.

Test plan

  • gunbc run --source-root dsl --entry dsl/test/claim/react_markup_witness.dag --function react_markup_keystone_holds --claim-run
  • gunbc run --source-root dsl --entry dsl/test/claim/gunbhub_react_browse_witness.dag --function gunbhub_browse_keystone_holds --claim-run
  • gunbc run --source-root dsl --entry dsl/test/claim/markup_serializer_witness.dag --function markup_serializer_keystone_holds --claim-run (regression check on Fragment-IR serializer IC #4940)

briansrls and others added 2 commits June 15, 2026 08:57
…llision

Move gunbhub browse receipt to dsl-rooted ReactMarkupNode witnesses, rename
TextNode→ReactTextNode to avoid std.markup import clash, and enroll both
keystones in the claim-witness corpus (shard b 24→26).

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 15, 2026 09:05
briansrls and others added 3 commits June 15, 2026 09:08
…sses

Replace blocklist with explicit http/https/mailto/relative allowlist before
escape_url, and add witnesses proving javascript:/data: are rejected (not
merely char-escaped) plus ftp:// fail-closed by allowlist.

Co-authored-by: Cursor <cursoragent@cursor.com>
Empty commit to re-fire gunbc CI on HEAD after draft→ready transition.

Co-authored-by: Cursor <cursoragent@cursor.com>
Address claude-opus review: remove faux case-insensitivity enum arms, document
RFC 3986 gap (no v2 to_lower yet) with explicit fail-closed lowercase-only
rule + witness; delete unused is_trusted_url_scheme alias.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls
briansrls merged commit fd3ce25 into main Jun 15, 2026
18 checks passed
@briansrls
briansrls deleted the session/fierce-heron-359 branch June 15, 2026 10:02
briansrls added a commit that referenced this pull request Jun 15, 2026
Merge origin/main (#4946 gunbhub react_markup) into session branch.
Recomputed corpus counts: 52/18/34 (lists match). SPICE signed-path
files unchanged — awaits manager re-pin on green head.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 15, 2026
…us CI

Rebased on main post-#4946: one additive corpus row on shard A; counts 45/19/26.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 15, 2026
Merge origin/main after #4946 landed. Keep both XSS keystone enrollments
(html_markup + react_markup/gunbhub_react_browse). Recount corpus rows:
45 full / 27 shard_b / 18 shard_a (18+27=45).

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 15, 2026
…rkup + XSS reject-witness (#4945)

* WIP: gunbhub HTML consumer: un-vendor markup.dag, consume canonical std.marku

* fix(html_markup): scheme checks without to_lower (v2 interpreter gap)

validate_href uses explicit lower/upper prefix matching because to_lower
is not yet implemented in the v2 interpreter — smoke and XSS witnesses
now run green by execution.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(html_markup): positive scheme allowlist + perturb-discrimination witness

Per signed XSS contract: allowlist http/https/mailto/relative only (reject
protocol-relative and unknown schemes); validate href and src. Witness proves
escape_url passes javascript: through while the consumer rejects it.

Co-authored-by: Cursor <cursoragent@cursor.com>

* ci: enroll html_markup_xss_keystone in claim witness corpus shard b

Makes the XSS reject-witness load-bearing in v4_claim_witness_corpus_b
(43 total rows, shard b 25) per zesty-swift-505 pairing flag.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(html_markup): dissolve href_is_safe predicate; enroll XSS corpus

- Practice-10: remove href_is_safe Bool collapse; walk tree via
  find_first_rejected_url matching validate_href coproduct directly.
- Witness mixed-case javascript fail-closed as SchemeNotAllowlisted.
- (with prior 3c047f3) enroll html_markup_xss_keystone in corpus shard b.

Co-authored-by: Cursor <cursoragent@cursor.com>

* merge main: integrate #4946 react corpus rows + fix shard-b counts

Merge origin/main after #4946 landed. Keep both XSS keystone enrollments
(html_markup + react_markup/gunbhub_react_browse). Recount corpus rows:
45 full / 27 shard_b / 18 shard_a (18+27=45).

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 15, 2026
…us CI (#4947)

Rebased on main post-#4946: one additive corpus row on shard A; counts 45/19/26.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant