Skip to content
Back to skills

Openshell Best Practices

ASecurity

Run NVIDIA OpenShell, the sandboxed runtime for AI agents: gateway and supervisor, network policy, providers and credentials, Helm deployment with Agent Sandbox, OIDC, and air-gapped operation. Use whenever the user mentions OpenShell, the `openshell` CLI or gateway, gateway.toml, Agent Sandbox (`agents.x-k8s.io`), or running Claude Code / Codex / OpenCode in OpenShell sandboxes; and on sandbox symptoms such as stuck ConfigurationInvalid or ProvisioningTimedOut, `NET:OPEN ... DENIED`, `creden...

  • 8 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 9, 2026
ai-agentsrustgoshelldockerkubernetesgitsecurity

Works with

  • claude code
  • cli
  • mcp

Security analysis

A100/100

Pro scans all 13 files and shows the line behind each finding

Scanned November 23, 2026

npx -y skills add air-gapped/skills --skill openshell-best-practices --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Openshell Best Practices?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Openshell Best Practices
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/air-gapped-openshell-best-practices/badge)](https://www.skillsdirectory.com/skills/air-gapped-openshell-best-practices)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: openshell-best-practices
description: >-
  Run NVIDIA OpenShell, the sandboxed runtime for AI agents: gateway and
  supervisor, network policy, providers and credentials, Helm deployment with
  Agent Sandbox, OIDC, and air-gapped operation. Use whenever the user mentions
  OpenShell, the `openshell` CLI or gateway, gateway.toml, Agent Sandbox
  (`agents.x-k8s.io`), or running Claude Code / Codex / OpenCode in OpenShell
  sandboxes; and on sandbox symptoms such as stuck ConfigurationInvalid or
  ProvisioningTimedOut, `NET:OPEN ... DENIED`, `credential_endpoint_mismatch`,
  `resolves to internal address`, or `198.18.x.x` addresses. Not for OpenShift
  or other container sandboxes.
---

# OpenShell best practices (0.1.x)

Snapshot: OpenShell **0.1.7** (2026-11-03), from the v0.1.7 tag, release notes, GitHub issues
filed since 0.1.0, and practitioner write-ups (history in `references/sources.md`). OpenShell releases about
weekly and breaks things between minors — **check the installed and latest versions before
advising** (`openshell --version`, `gh release list --repo NVIDIA/OpenShell`) and read every
release note in between. When this skill and the code at the user's tag disagree, the code wins.

## Mental model

| Piece | Role |
|---|---|
| **Gateway** | Control plane (gRPC on one HTTPS port). Creates sandboxes through a compute driver (Docker, Podman, Kubernetes, VM), stores sandboxes, policies, profiles and provider secrets, authenticates users (OIDC / mTLS). The CLI and TUI are thin clients; `openshell gateway select` switches between gateways |
| **Supervisor** | One per sandbox (or a shared pool on Kubernetes). Owns the network boundary: every agent connection goes through it, it evaluates policy, terminates TLS with a per-sandbox CA, injects real credentials only at approved endpoints, and opens the upstream connection itself |
| **Sandbox** | The workload (your agent image) under Landlock + seccomp + network namespace. `/sandbox` is persistent `$HOME`; default network policy is deny-all |
| **Profile → provider → attachment** | Profile = provider type (endpoints, env vars, allowed binaries); provider = profile + real secret, stored in the gateway; attaching gives the sandbox a placeholder, never the secret |

OpenShell is **governance on a shared kernel**: it controls egress, credentials and audit very
precisely, but it contains rather than detects prompt injection, and it isn't a VM boundary.
Layer Kata/VM runtimes when kernel isolation matters.

## The 0.1.0 cutover — recognise outdated advice

Material written before 2026-09-25 (and some copied after) describes 0.0.x. These are now
wrong: `inference.local` / `openshell inference set`; built-in provider profiles and aliases
`claude`/`gh`; `--from base` or `--from ./Dockerfile`; `sandbox create -- claude` expecting a
preinstalled agent; `ghcr.io/nvidia/openshell-community/*` images (archived 2026-10-07, broken
on 0.1.x); gateway.toml `version = 1` / `compute_drivers`; `tls: terminate`; `openshell gateway
start`. NemoClaw still pins OpenShell 0.0.116, so its docs describe the old model. Full mapping
in `references/versions.md`.

## Best practices

1. **Pin versions and read every hop.** CLI, gateway, supervisor and sandbox runtime should be
   the same release (0.1.6 requires supervisor/runtime pairing). Security fixes ship as plain
   "bug fixes" and the GHSA page is empty — read release notes and NVIDIA product-security
   bulletins. Upgrade off 0.0.x only by clean reinstall.
2. **Build your own agent images**: glibc base, non-root `USER`, `WORKDIR /sandbox`, agents and
   their runtime downloads (ripgrep, MCP servers, toolchains) baked in, agent config baked in.
   Pass the start command after `--`.
3. **Make the agent the sandbox's main program** so detach (Ctrl-D, Ctrl-P Ctrl-Q) and
   reattach (`sandbox connect`) work; separate `exec` shells can't detach.
4. **Keep secrets in providers.** Copy profiles from upstream `providers/` at your tag, set
   `binaries` to the agents' **real** paths, lint, import, then `provider create --credential ENV`.
   Logins done inside an agent leave tokens on the sandbox disk.
5. **Keep proposal approval `manual`** and never let an agent approve its own rules; set
   `enforcement: enforce` explicitly (L7 rules default to `audit`, which forwards traffic).
6. **Treat every allowed write channel as an exfiltration path** — including the model endpoint.
   Don't put untrusted input, private data and egress in the same sandbox.
7. **Turn telemetry off** (on by default) for anything private or air-gapped.
8. **Use OIDC for any shared gateway**; public CLI client with PKCE and a loopback redirect,
   a separate confidential client for unattended jobs, roles mapped to admin/user.
9. **On Kubernetes**: install a pinned Agent Sandbox first and restart the gateway after
   upgrading it; require a NetworkPolicy-enforcing CNI; write new settings in `gatewayConfig`;
   set the data StorageClass at install (immutable).
10. **Private CA for agent egress is the supervisor's to trust**, never the agent image's. On
    0.1.7+: `supervisor.network.additionalCaConfigMapName`, read only at gateway start —
    restart the gateway, then stop/start sandboxes, after any change. On 0.1.6:
    `upstreamProxy.caBundle` with an unused proxy URL and `noProxy: "*"`, or a rebuilt supervisor image.
11. **Give every internal endpoint `allowed_ips` and an FQDN.** Private destinations (RFC 1918,
    CGNAT, VIPs) are rejected for approved proposals, wildcards and unlisted binaries even when
    the policy "allows" them, and sandboxes resolve no short names. This, not the CA, is the
    usual reason an air-gapped install can't reach its mirrors or model endpoint.

## Where to read next

| Task | Reference |
|---|---|
| Versions, upgrade notes, CVE history, outdated-pattern table | `references/versions.md` |
| Workstation install, 0.0.x → 0.1.x clean reinstall, Docker Desktop/WSL2/Podman problems | `references/local-gateway.md` |
| Kubernetes/OpenShift deployment, Agent Sandbox, Helm values, ingress, HA, known K8s issues | `references/kubernetes-gateway.md` |
| OIDC/Keycloak client, interactive vs unattended login, token lifetimes, TUI expiry, mTLS | `references/auth.md` |
| Profiles, providers, binaries, Claude Code/Codex/OpenCode/local-model credentials, policy loop, limits | `references/providers-and-policy.md` |
| Agent images, session model, device-code logins, multi-agent layouts (herdr/tmux), broken tools | `references/sandboxes-and-agents.md` |
| Air-gapped sites: mirror list, telemetry, internal destinations and `allowed_ips`, sandbox DNS, private CAs per component, corporate proxy, agents against mirrors, bring-up order | `references/air-gap-and-ca.md` |
| Rarely used settings: gateway/driver knobs, supervisor topology, every policy endpoint field, plain HTTP, filesystem/lifecycle fields, profile fields, `sandbox create` flags | `references/rare-settings.md` |
| Headless agents, CI, SDKs, fleets, Claude self-hosted sandboxes, middleware/interceptors | `references/automation.md` |
| Denials, stuck sandboxes, auth errors, where logs live | `references/troubleshooting.md` |

## Working method

- Verify against the source at the user's tag: a local clone of `NVIDIA/OpenShell`
  (`git show <tag>:docs/...`) or `gh` — docs on `main` run ahead of releases, and in-repo
  examples lag (some still assume built-in profiles).
- Before claiming a bug is fixed or open, check the issue and the release notes; open fixes
  often wait as unmerged PRs (external PRs are auto-closed until the author is vouched for).
- Name commands with the exact 0.1.x shape (`--rule-name` and `--binary` on `policy update`,
  `-g <gateway>` in scripts, `--workspace` in SDK calls). There is no `openshell policy validate`;
  the offline checker is `openshell-prover check`.
- Upstream skills for depth: `npx skills add NVIDIA/OpenShell` installs `openshell-cli`,
  `debug-openshell-cluster`, `generate-sandbox-policy`, `debug-inference`.

Files in this skill

  • SKILL.md9.9 KB
  • evals/evals.json10.8 KB
  • references/air-gap-and-ca.md16.6 KB
  • references/auth.md6.4 KB
  • references/automation.md6.4 KB
  • references/kubernetes-gateway.md15.5 KB
  • references/local-gateway.md5 KB
  • references/providers-and-policy.md8.8 KB
  • references/rare-settings.md14.4 KB
  • references/sandboxes-and-agents.md8.8 KB
  • references/sources.md9.6 KB
  • references/troubleshooting.md7 KB
  • references/versions.md7.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.