Skip to content

Document web view security for untrusted code - #602

Merged
simonhamp merged 1 commit into
mainfrom
claude/webview-security-note-493a36
Nov 5, 2026
Merged

simonhamp merged 1 commit into
mainfrom
claude/webview-security-note-493a36

Conversation

@simonhamp

Copy link
Copy Markdown
Member

Adds short web-view security guidance to the Mobile v4 docs in two places:

  • Web View page (resources/views/docs/mobile/4/edge-components/web-view.md): a callout next to the existing "Locked down by default" note.
  • v3 to v4 upgrade guide (resources/views/docs/mobile/4/getting-started/upgrade-guide.md): a short note in the "Upgrading To 4.0 From 3.x" section.

Why: a web view runs on the app's own origin, so any script it loads runs with the app's privileges, and in PHP mode it can reach the native bridge and call native functions like the rest of the app. Loading code from outside the app bundle (remote URLs, third-party JavaScript, user-supplied HTML/JS) gives a malicious or compromised script that same reach. The docs didn't say this plainly, so this tells developers to treat the web view as an untrusted-code boundary and prefer loading only code that ships in their own app bundle.

Both additions follow each page's existing conventions (an <aside> callout on the Web View page, a ### subsection in the upgrade guide) and stay to a short paragraph plus a couple of bullets. Rendered both pages through the docs pipeline to confirm they parse and the links resolve.

🤖 Generated with Claude Code

The web view can load code from outside your app bundle: remote URLs,
third-party scripts, inline or user-supplied HTML/JS. That code runs on
the app's own origin and, in PHP mode, can reach the native bridge, so a
malicious or compromised script has the same reach as your own code.

Add a short callout to the Mobile v4 Web View page and a matching note in
the v3 to v4 upgrade guide advising developers to treat the web view as an
untrusted-code boundary and to prefer code shipped in their own app bundle.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@simonhamp
simonhamp merged commit dc4d181 into main Nov 5, 2026
3 checks passed
@simonhamp
simonhamp deleted the claude/webview-security-note-493a36 branch November 5, 2026 23:10
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