Repository navigation
fix(tools): withhold private landing pages from computer use - #7981
sumedh-aerram wants to merge 2 commits into
Conversation
ComputerUseToolset.navigate validated only the model-supplied URL, so HTTP redirects, meta refresh, or JavaScript navigation could land the browser on a private address and return that page's screenshot to the model. Validate every returned ComputerState with the same URL policy before its screenshot is exposed. Confirmed private-network or file: landings withhold the content, close the backend, and disable the toolset. Benign states (blank, srcdoc, Chrome error, data:) stay usable; unknown internal pages and DNS failures withhold that response without disabling the toolset. Normalize octal, hex, and integer IPv4 aliases in the shared URL validator. This does not prevent outbound requests to private addresses; it only withholds their content from the model. Full prevention needs request interception or egress enforcement in the browser backend. Part of google#7968
|
@sumedh-aerram, one data point for the numeric-host cases, from my own egress guard (agent-airlock 0.10.31). I ran 0177.0.0.1, 127.1, [::ffff:127.0.0.1] and 0xa9fea9fe against it today. All four are refused, and each decision records the encoding it saw. The IPv4-mapped IPv6 form is the one I'd add to your tests if it isn't there, since the description only names octal, hex, and integer IPv4 aliases. Also agree with the limit you wrote down: withholding the landing page doesn't stop the request itself. |
|
Thanks @sattyamj-attri. All four forms were already refused here: |
Link to Issue or Description of Change
Problem: Initial-URL validation allows browser redirects or page-driven navigation to return private content to the model.
What this does / does not do
Does: Validate returned computer states before exposing screenshots. Confirmed private network or file landings withhold content, close the backend, and disable subsequent actions. Benign blank/desktop, srcdoc, Chrome error, and data states remain usable. Unsupported internal pages and DNS failures withhold that response without disabling recovery. Normalize octal/hex/integer IPv4 aliases in the shared validator, and avoid duplicate cleanup.
Does not: Prevent outbound requests to private addresses; only their content is withheld from the model when the returned state identifies a blocked landing. Blind SSRF, intermediate redirect hops, subresources, WebSockets, DNS rebinding, and URL/screenshot timing races remain. Full prevention requires backend interception or egress enforcement. VMaaS close is a no-op.
Testing Plan
Unit Tests:
Manual End-to-End (E2E) Tests: Not run; browser results and DNS are mocked. No claim of request interception or live sandbox shutdown.
Checklist