Skip to content

sandbox network grants don't persist after approving — network access stays denied, fails with context canceled #703

Description

@Svector-anu

i think i found a bug with zero's sandbox network permissions.

i was trying to run git push to a gitlawb:// remote. zero prompted me for network access, i clicked allow, but the command still failed with context canceled. i retried several times and approved it each time, but it kept failing.

i checked the sandbox state:

zero sandbox policy
network: deny
backend: macos-seatbelt

and zero sandbox grants list returns:

No persistent sandbox grants.

~/.config/zero/sandbox-grants.json also doesn't exist.

so it looks like clicking allow isn't actually persisting or applying the network grant, and the sandbox continues blocking the network request. the context canceled error also makes it pretty difficult to tell that the sandbox is the cause.

running the same git push outside of zero's sandbox worked fine.

environment

  • zero 0.1.0
  • macos 15.7.7, sandbox backend macos-seatbelt

repro

$ zero sandbox policy
mode: enforce
network: deny
backend: macos-seatbelt
grants: /Users/macbook/.config/zero/sandbox-grants.json

$ zero sandbox grants list
No persistent sandbox grants.

$ cat ~/.config/zero/sandbox-grants.json
cat: No such file or directory

screenshot

(adding below — will drop it in as a comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions