You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: add cross-app message injection protection test
Adds tests for the attack vector where a malicious app tries to inject
messages into another app via:
window.parent.parent.frames[i].frames[0].postMessage(fakeResponse, "*")
The protection (added in PR #207) is that PostMessageTransport validates
event.source matches the expected source (window.parent for apps), so
messages from other apps are rejected.
Tests added:
1. "app rejects messages from sources other than its parent"
- Simulates injection attempt from page context
- Verifies app remains functional after attack attempt
2. "PostMessageTransport is configured with source validation"
- Verifies valid parent->app communication still works
- Confirms source validation doesn't break legitimate messages
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments