-
Notifications
You must be signed in to change notification settings - Fork 0
Host origin allowlist on start #167
Copy link
Copy link
Closed
Labels
area:agent-runtimeInjected JS: inspection, pruning, refsInjected JS: inspection, pruning, refsarea:cliCLI parser, help, capabilitiesCLI parser, help, capabilitiesarea:core-protocolHeadlessProtocol: wire protocol, validation, transportHeadlessProtocol: wire protocol, validation, transportarea:linux-hostChromium host (LinuxHost/, CDP)Chromium host (LinuxHost/, CDP)area:macos-hostWKWebView host (main.swift, Host/)WKWebView host (main.swift, Host/)priority:highBlocks a roadmap phaseBlocks a roadmap phasetype:featureNew capability or commandNew capability or commandtype:securitySecurity boundary or hardeningSecurity boundary or hardening
Description
Activity
Metadata
Metadata
Assignees
Labels
area:agent-runtimeInjected JS: inspection, pruning, refsInjected JS: inspection, pruning, refsarea:cliCLI parser, help, capabilitiesCLI parser, help, capabilitiesarea:core-protocolHeadlessProtocol: wire protocol, validation, transportHeadlessProtocol: wire protocol, validation, transportarea:linux-hostChromium host (LinuxHost/, CDP)Chromium host (LinuxHost/, CDP)area:macos-hostWKWebView host (main.swift, Host/)WKWebView host (main.swift, Host/)priority:highBlocks a roadmap phaseBlocks a roadmap phasetype:featureNew capability or commandNew capability or commandtype:securitySecurity boundary or hardeningSecurity boundary or hardening
What an agent cannot do today
visitand in-page navigation accept any http(s) URL that passes the existing scheme, credential, and dangerous-extension checks. A prompt-injected agent can leave the app under test and open an arbitrary site. The host has no origin allowlist.Proposed surface
Repeatable
--allow. Comma-separated values in one flag are also accepted. No--allowkeeps today's behavior: any otherwise-legal http(s) URL.When the list is set, a visit or top-frame navigation whose host does not match fails with
UNSAFE_NAVIGATION.status/ ping report the active list. Changing the list on an already-running host is rejected; stop first.Engines
Both. Same matcher in
agentMayNavigate, WKWebViewdecidePolicyFor, Linux frame-event enforcement, and the in-page click guard.Contract
This is a host-enforced boundary, not a prompt rule. Record an architecture-decision entry in the same PR.
--allowcannot addfile:,javascript:, credentials, or blocked extensions.--allowwith no patterns is invalid.:port, optional leading*..*alone is rejected. Non-ASCII / unexpected characters fail closed.*.example.commatches subdomains ofexample.com, notexample.comitself, and notexample.com.evil.test.localhostmatches any port on localhost.localhost:3000matches only that port.start --allowhits a host that is already running with a different list, fail. Do not silently keep the old policy.Tests
Protocol suite: parse, reject
*, rejectfile:hosts, wildcard non-matches, port exactness, visit denied, ping reports the list.Linux E2E and macOS E2E: start with
--allowfor the fixture host, visit the fixture, denyexample.com, deny a click that would leave the allowlist.Docs
COMMANDS.md,agentHelp,AGENTS.md/ skill safety notes, capabilities. Web lint provenance if command tables are generated from help.