Skip to content

feat(sandbox): report the path a sandboxed command was refused #1278

Open

Description

@LivXue

Reserved for @LivXue: waiting for LivXue to resolve this. Please do not pick it up.

Summary

PR #1269 reports a connection the OpenShell sandbox blocked: it reads the gateway's OCSF log after a command and settles each denial through the permission gate. A filesystem write the sandbox refuses has no such report. The model sees only the command's own error, and nothing tells the user which path was refused or that the filesystem policy is fixed for the sandbox's lifetime.

What was measured

OpenShell 0.1.8 on an Ubuntu 24.04 host, 2026-11-12: touch /etc/raven-probe, mkdir /opt/raven-probe and echo x > /usr/raven-probe all failed with Permission denied (exit 1, 1 and 2) and produced no OCSF line besides the relay open and close. Landlock refuses the write in the kernel, the process sees EACCES, and the supervisor never logs it. So the planned FileDenial kind was not added: its condition, that the log lines carry a path, is not met.

Constraints

  • The filesystem, process and Landlock policy is fixed when a sandbox starts; only the network policy can change while it runs. So there is nothing to approve at runtime. A report could only say what was refused and point at tools.sandbox.extraVolumes.
  • Approving filesystem access at runtime is out of scope.

Directions considered

  • Recognise a refusal from the command's stderr (Permission denied on a path outside the mounts). Cheap, but a heuristic.
  • Ask OpenShell upstream to log Landlock refusals as OCSF file events, then parse them the way network denials are parsed (raven/sandbox/denials.py).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions