Skip to content

Secure iframe messaging with trusted parent-origin validation - #22

Merged
LJHAAAAA merged 1 commit into
mainfrom
codex/secure-postmessage
Aug 26, 2026
Merged

LJHAAAAA merged 1 commit into
mainfrom
codex/secure-postmessage

Conversation

@renjie-run

Copy link
Copy Markdown
Collaborator

Summary

  • Restrict iframe requests, responses, events, and window events to the trusted parent origin.
  • Allow wildcard messaging only for the initial server, access-token, and app UUID bootstrap requests.
  • Fetch and configure the parent origin before sending subsequent SDK traffic.
  • Improve initialization error handling and validation for access-token and bootstrap API calls.
  • Add coverage for origin validation, bootstrap behavior, malformed responses, cleanup, and SDK initialization.

Testing

  • Expanded Jest unit tests for HTMLPageAPI, IframeAdapter, and SDK initialization behavior.

@LJHAAAAA
LJHAAAAA merged commit 2f8a439 into main Aug 26, 2026
1 check passed
@LJHAAAAA
LJHAAAAA deleted the codex/secure-postmessage branch August 26, 2026 02:51
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.

2 participants