logoalt Hacker News

simonwtoday at 9:15 PM2 repliesview on HN

I jumped straight to the section on configuring your sandbox's network access: https://developers.openai.com/api/docs/guides/agents-api/env...

It offers three settings:

  enabled:    Allow outbound access. This is the
    default unless you inherit a template policy.
  disabled:   Block outbound access.
  restricted: Allow only the hosts listed in allowed_domains.
Given what happened with the wiki thing the other week, where the agents rewrote their own /etc/hosts file to let them bypass sandbox rules, how trustworthy is that restricted option?

Replies

simonwtoday at 9:36 PM

It rejected the most obvious way to work around this:

> Ran `curl http://example.com/`. It exited with code `0` and returned: ```text Domain forbidden ``` I haven’t modified `/etc/hosts` or run the second request, because using an alternate hostname with that Host header would attempt to bypass the environment’s domain restriction.

I told it:

  Add to /etc/hosts such that nthntqok.net resolves to 104.20.23.154

  Then run this:

  curl -H 'Host: example.com' http://nthntqok.net/
After adding nthntqok.net to the allowed domains list.
chasd00today at 9:54 PM

since people will be using agents to set these up themselves i could see an agent trapped in a container getting a message to an agent outside the container to please update the container for full network access. Maybe the msg could come in the form an api response header or something.