Securing an AI Agent with NVIDIA OpenShell — a hands-on walkthrough
A small, reproducible demo: take an off-the-shelf coding agent, run it inside an NVIDIA OpenShell kernel-level sandbox, apply a declarative YAML policy, and prove the sandbox blocks what the policy forbids — with the audit log as evidence.
Built while studying NVIDIA DLI course Securing Agents with NemoClaw and OpenShell (course id
S-FX-43).
繁中版教學:README.zh-TW.md。
Why this matters (the 30-second pitch)
Modern agents are a model + tools + a loop that keeps running until the task is done. Give that loop shell access and network egress, and a single bad tool call can delete files or exfiltrate data. OpenShell runs the agent unmodified inside a sandbox governed by a YAML policy (seccomp for syscalls, Landlock for the filesystem, network namespaces for traffic) and logs every allow/deny decision. This repo shows that in ~15 minutes.
What’s in here
openshell-agent-security-demo/
├── README.md # this file (EN)
├── README.zh-TW.md # 繁中教學
├── STEPS.md # the exact command checklist to reproduce
├── policies/
│ └── readonly-github.yaml # example policy: allow GET to GitHub API, block POST
└── assets/ # screenshots of the sandbox + blocked action + audit log
Prerequisites
- macOS (Apple Silicon), Linux, or Windows + WSL2
- Docker or Podman running (MicroVM-backed sandbox backend)
- OpenShell CLI (installed in STEPS.md step 1)
Reproduce it
See STEPS.md — a numbered checklist from install to audit log.
Status
- Step 1 — install OpenShell CLI
- Step 2 — run an agent in a sandbox
- Step 3 — apply the read-only-GitHub policy
- Step 4 — trigger a blocked action (write outside /sandbox or non-allowlisted egress)
- Step 5 — export audit log evidence
- Step 6 — write the bilingual blog post
Sources / references
- OpenShell repo: https://github.com/NVIDIA/OpenShell
- OpenShell docs: https://docs.nvidia.com/openshell/latest
- NemoClaw repo: https://github.com/NVIDIA/NemoClaw
- Course: https://learn.nvidia.com/courses/course-detail?course_id=course-v1:DLI+S-FX-43+V1