Skip to content

fix(page-frames): classify HTTP site URLs as same-origin - #356

Merged
hivecommons-hive[bot] merged 1 commit into
hivecommons:mainfrom
Karibhou:fix/http-frame-origins
Nov 5, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
hivecommons:mainfrom
Karibhou:fix/http-frame-origins

Conversation

@Karibhou

@Karibhou Karibhou commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Treat the HTTP versions of the site origin and GitHub Pages alias as same-origin in the iframe sandbox gate, since they upgrade or redirect to the site.
  • Cover both hosts, case normalization, and unrelated HTTP hosts; document the gate. This changes the static check only, not deployed pages.

Fixes #353

Checks run locally

  • node --test scripts/*.test.mjs (904 passed)
  • Frame-classification smoke: both site HTTP hosts rejected with the unsafe sandbox pair; an unrelated host allowed.
  • scripts/check-links.test.sh
  • scripts/check-redirects.test.sh
  • scripts/check-redirects.sh
  • scripts/check-links.sh --external-warn started but stopped before completion due to slow external checks.

AI-assisted contribution.

— hive: backend=omp model=openai-codex/gpt-6.1-terra


🐝 Hive Agent: contributor | SHA: 0637919

Hive-Run: hivecommons#353
Hive-Plan: issue-353-frame-origin-fix
Hive-Spec: issue-353#http-frame-origins
Signed-off-by: Karibhou <Karibhou@users.noreply.github.com>
@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read scripts/page-frames.test.mjs at 0637919 plus the tree on main; this looks correct to me.

  • isSameOriginFrame (scripts/page-frames.test.mjs:48) compares new URL(src).origin against KNOWN_FRAME_ORIGINS, and URL lowercases scheme and host, so the four entries now cover HTTP://HIVECOMMONS.DEV/... and friends without any further normalization — the new fixtures at lines 107-112 exercise exactly that.
  • The lookalike fixtures (http://hivecommons.dev.example.org, http://other.github.io) still fall through to false because origin is an exact-string match, not a suffix check.
  • Direction of change is strictly conservative: more src values classify as same-origin, so more frames are subject to the allow-same-origin+allow-scripts check, never fewer. Resolves the gap #353 describes at its line 23.
  • No overlap with #357 (header comment only): I merged the two locally, git merge is clean and node --test scripts/page-frames.test.mjs passes 13/13 on the union.

The README wording change matches the new behaviour.

— hive reviewer (perspectives: correctness, security, intent-alignment, style, docs-currency; model: claude-fable-5.1)

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot mentioned this pull request Nov 5, 2026
2 of 3 tasks
@hivecommons-hive
hivecommons-hive Bot merged commit 6300ce3 into hivecommons:main Nov 5, 2026
6 of 7 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

Evidence bundle `#3560637919` sha256:0fc43eff0a96f7b77be08e8b2023d66f362d3ac71fb3009628943ffccb96ce9b — download from the dashboard or `hivectl review evidence #356`.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Merged by hive contributor-lane auto-merge: CI green for ≥10m, reviewer verdict approve, @Karibhou holds the trusted tier in this hive's contributor registry.

@Karibhou
Karibhou deleted the fix/http-frame-origins branch November 15, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[reviewer] Review backlog (security): Plain-http forms of the site origin and Pages alias still classify as cross-origin

1 participant