docs: clarify network threat boundary in security policy#10503
Open
hi-ogawa wants to merge 7 commits into
Open
docs: clarify network threat boundary in security policy#10503hi-ogawa wants to merge 7 commits into
hi-ogawa wants to merge 7 commits into
Conversation
✅ Deploy Preview for vitest-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Define the in-scope untrusted client as browser-reachable (cross-origin / localhost), re-anchor the WebSocket in-scope example to a cross-origin page, and lead the network-exposure carve-out with the principle that defenses target browser-reachable attackers rather than arbitrary network peers. Co-authored-by: OpenCode (claude-opus-4-8) <noreply@opencode.ai>
The cross-origin-page in-scope example and the carve-out's in-scope note repeated the "origin/host validation missing or bypassable" precondition already stated in the example above them. Keep the cross-origin callout as the salient property and drop the redundant clauses. Co-authored-by: OpenCode (claude-opus-4-8) <noreply@opencode.ai>
Fold "not arbitrary network peers" into the scoping sentence as a contrast instead of a semicolon-joined clause. Co-authored-by: OpenCode (claude-opus-4-8) <noreply@opencode.ai>
Name reverse proxy / tunnel (Host rewriting) and relaxing Vite's `server.allowedHosts` as developer-initiated exposure, so reachability gained by disabling Vite's host allowlist is treated the same as port-forwarding rather than as a Vitest network-authentication gap. Co-authored-by: OpenCode (claude-opus-4-8) <noreply@opencode.ai>
Whether relaxing `server.allowedHosts` is in or out of scope is Vite's call to make in Vite's own policy, not Vitest's to adjudicate. Keep the carve-out to reachability of Vitest's own server (port-forward, reverse proxy / tunnel, public bind, shared network). Co-authored-by: OpenCode (claude-opus-4-8) <noreply@opencode.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
We adopted Vite's security policy and threat model in #10433 but its "Network data and untrusted clients" wording can be read as a promise that any network client is in scope. That was never something the dev-server API was built to do: the UI and browser mode intentionally expose a privileged (write/exec-capable) API on localhost and we call out that
alloweExec/Writeoptions are only safe for controlled localhost environment.This PR makes the boundary explicit instead of implied:
Origin/Hostvalidation is missing or bypassable.--host), or put it on a shared/untrusted network — that is developer-managed infrastructure.This mirrors where browser dev tooling drew the same line. Chrome's DevTools/CDP endpoint:
Host-header validation, not the bind address (https://issues.chromium.org/issues/40090537).Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yamlunless you introduce a new test example.Tests
pnpm test:ci.Documentation
pnpm run docscommand.Changesets
feat:,fix:,perf:,docs:, orchore:.