@@ -11,13 +11,15 @@ The `sbx policy` command manages network access rules on your local machine.
1111Rules apply to all sandboxes on the machine when you use the global scope, or
1212to a single sandbox when scoped by name.
1313
14- Local rules apply only when your organization doesn't enforce governance :
14+ Local rules interact with organization governance as follows :
1515
1616- ** No org governance** : local rules fully control what sandboxes can access.
17- - ** Org governance active** : the organization policy replaces local policy.
18- Local rules are inactive, and ` sbx policy allow ` and ` sbx policy deny ` have
19- no effect. To list the inactive local rules, run
20- ` sbx policy ls --include-inactive ` . See
17+ - ** Org governance active** : organization rules are the primary policy.
18+ Local allow rules are inactive and have no effect. You can't use them to
19+ loosen a restriction the org policy imposes. Local deny rules are still
20+ evaluated and layer on top of the organization policy, so you can further
21+ restrict access beyond what the org policy allows. To list inactive rules,
22+ run ` sbx policy ls --include-inactive ` . See
2123 [ Monitoring] ( monitoring.md#showing-inactive-rules ) .
2224
2325See [ Organization policy] ( org.md ) for how organization governance works.
@@ -94,6 +96,18 @@ $ sbx policy allow network --sandbox my-sandbox api.example.com
9496$ sbx policy deny network --sandbox my-sandbox ads.example.com
9597```
9698
99+ You can also set per-sandbox deny rules at creation time with ` --deny-network `
100+ on ` sbx create ` or ` sbx run ` , instead of adding them after the fact:
101+
102+ ``` console
103+ $ sbx create --deny-network ads.example.com claude .
104+ $ sbx run --deny-network ads.example.com claude
105+ ```
106+
107+ Pass the flag multiple times to deny more than one host. Rules added this way
108+ appear in ` sbx policy ls <name> ` and can be removed with
109+ ` sbx policy rm network --sandbox <name> --resource <host> ` .
110+
97111Specify multiple hosts in one command with a comma-separated list:
98112
99113``` console
@@ -163,26 +177,31 @@ $ sbx policy reset --force
163177
164178## Troubleshooting
165179
166- ### Local rules have no effect
180+ ### Local allow rules have no effect
181+
182+ If rules you add with ` sbx policy allow ` don't change sandbox behavior, your
183+ organization likely has governance enabled. Run ` sbx policy ls ` to check: if
184+ the output starts with a ` Governance: ` status line showing ` Managed by <org> ` ,
185+ org governance is active. When it's active, local allow rules are inactive.
186+ You can't use them to loosen restrictions the org policy imposes.
167187
168- If rules you add with ` sbx policy allow ` or ` sbx policy deny ` don't change
169- sandbox behavior, your organization likely has governance enabled. Run `sbx
170- policy ls` to check: if the output starts with a ` Governance:` status line
171- showing ` Managed by <org> ` , org governance is active. When it's active,
172- the organization policy replaces local policy, so your rules have no effect.
173- They're hidden from ` sbx policy ls ` by default; run `sbx policy ls
174- --include-inactive` to see them with an ` inactive` status in the ` STATUS`
175- column.
188+ Inactive allow rules are hidden from ` sbx policy ls ` by default; run
189+ ` sbx policy ls --include-inactive ` to see them with an ` inactive ` status in
190+ the ` STATUS ` column.
176191
177192Organization policy can't be supplemented from your machine. To change what
178193your sandboxes can access, ask your admin to update the organization policy.
179194
195+ Local deny rules are still evaluated under org governance and layer on top of
196+ the org policy. Use them to further restrict access beyond what the org policy
197+ allows.
198+
180199### A domain is still blocked after adding an allow rule
181200
182201If a domain remains blocked after you add a local allow rule, your organization
183- likely enforces governance, which makes local rules inactive. Run `sbx policy
184- ls` to check whether org governance is active; if the output starts with a
185- ` Governance: ` status line showing ` Managed by <org> ` , it is. Add
186- ` --include-inactive ` to confirm your rule shows an ` inactive ` status. If so, the
187- block can only be lifted by updating the org policy in Docker Home or via
202+ likely enforces governance, which makes local allow rules inactive. Run `sbx
203+ policy ls` to check whether org governance is active; if the output starts with
204+ a ` Governance: ` status line showing ` Managed by <org> ` , it is. Add
205+ ` --include-inactive ` to confirm your rule shows an ` inactive ` status. If so,
206+ the block can only be lifted by updating the org policy in Docker Home or via
188207the [ API] ( /reference/api/ai-governance/ ) .
0 commit comments