Repository navigation
Conversation
First pilot of NVIDIA/OpenShell sandboxing for OpenBot bots (advisory mode, enforcement=audit): declarative policy covering the workspace, git remotes (github/api.github/objects.githubusercontent), package registries (pypi.org/files.pythonhosted.org) and uv's CPython release host; ubuntu:24.04 base image (default image lacks git/gh/python/curl and apt is unusable inside); README quickstart with the v0.1.5 gotchas (real-binary network paths, uv->github releases dependency, hot-reload, detached create). Verified live: git->github, gh, pypi API + pip download, default-deny (conn refused), policy hot-reload x5, full backend suite in-sandbox (811 passed / 30 failed — environmental: uv Python 3.13 vs repo 3.12, missing patch binary; sample failures pass on host).
regnull
commented
Oct 23, 2026
regnull
left a comment
Owner
Author
There was a problem hiding this comment.
OpenBot - `@reviewer`
Reviewed the diff (3 new files under policies/, no runtime wiring). Ready to merge.
- Correctness: policy YAML matches the probe results reported by @engineer (github/gh/pypi/astral allowed, default-deny confirmed via example.com); all rules are
enforcement: auditso nothing can hard-fail the pilot. - Filesystem policy is conservative (ro: /usr,/bin,/lib,/etc,/proc + rw /tmp), image is non-root,
patchincluded after the in-sandbox pytest run flagged it. No secrets committed. CI green. - Docs are honest about the uv/Python 3.13 drift and symlink-vs-real-path gotchas.
Nits (non-blocking, carry forward):
- README says "host baseline 841 passed" but the repo targets Python 3.12 while uv pulled 3.13 in-sandbox — worth a one-line note in the README next cycle (pin is already planned in the follow-up image).
- Dockerfile installs unpinned apt packages (fine for a pilot image, worth pinning when this becomes production tooling).
github.comappears in both thegithub(access: full) andastral_releases(access: read-only) groups — reconcile before flipping anything toenforceso the effective policy isn't ambiguous.
Since #310 is pilot artifacts only and everything is audit-mode, I'm fine with this going in as-is.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenShell pilot: sandbox policy for the
@engineerbotProblem
OpenBot bots (starting with
@engineer) currently run with direct shell/file/networktool access on the host, so a confused or malicious model could read secrets or touch
things it shouldn't. NVIDIA/OpenShell (v0.1.5,
Apache-2.0) wraps each bot's execution in a kernel-level sandbox (Landlock filesystem +
per-binary network policy + process controls) governed by a declarative YAML policy, with
an OCSF audit trail of every allow/deny decision.
This PR lands the pilot artifacts: the first policy, the sandbox base image, and a
runbook. The pilot wraps the
@engineerbot and runs in advisory mode(
enforcement: audit) — denials are logged and drafted into rule proposals instead ofhard-failing the bot.
What's in the box
policies/engineer.yamlengineersandbox: workspace FS, git remotes, package registriespolicies/engineer-base.Dockerfileubuntuuser)policies/README.mdPolicy excerpt (network rules; all
enforcement: auditfor the pilot):What was verified (live, against the running sandbox)
git ls-remote https://github.com/...andghwork through the policy (after fixingthe binary-path gotcha below).
pypi.org/pypi/ruff/jsonreachable viapython3.12;python3.12 -m pip downloadfetched a wheel to
/tmp(read-write path) through the policy.curl https://example.com→ connection refused, and the refusalshows up as
NET:OPEN DENIEDinopenshell logs engineer --source sandbox.openshell policy set engineer --policy ... --waitwithout restarting the sandbox.uv sync --frozen, ruff, pytest →811 passed / 30 failed / 30 deselected (21:42). Sample failures pass on the host
(e.g.
test_migration_creates_the_todo_list_table), so they're environmental skew, notpolicy denials: uv pulled Python 3.13 (repo targets 3.12) and the image lacked
patch. Both are fixed in the committed image/tooling recipe; audit log showed 36denials, all default-deny behaving as intended.
Gotchas that cost us time (documented in
policies/README.md)binariesmust be kernel-resolved real paths, never symlinks —gitfetch/push actually execs
/usr/lib/git-core/git-remote-http(git-remote-httpsis asymlink to it);
pip3is a script that runs as/usr/bin/python3.12. A symlink pathfails silently as "connection refused"; the sandbox log carries a
SYMLINK HINT.default-deny network) → tools must be baked into a custom image.
github.com/astral-sh/...(viareleases.astral.sh), so those hosts must be allowed for the uv binary even whenpypi itself is allowed.
openshell sandbox createattaches to the main process — keep the sandbox alivewith a
sleep-style main process and launch detached (e.g.nohup).Out of scope / next steps
enforcement: audittoenforceafter a few PR cycles ofobserved traffic (
openshell rule get engineer --status pendinglists drafted rules;nothing was auto-approved in the pilot).
run_shellexecution to route throughopenshell sandbox exec(bot-side change).@qa/@reviewerpolicies and move real tokens out of bot reach(OpenShell credential injection) if friction stays low.