# Generate Sandbox Policy

Generate sandbox security policies from plain-language requirements and optional REST...

- Repository: https://github.com/NVIDIA/OpenShell (20903 stars)
- Category: Security
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add NVIDIA/OpenShell --skill generate-sandbox-policy -g -a claude-code -y`
Codex: `npx skills add NVIDIA/OpenShell --skill generate-sandbox-policy -g -a codex -y`
Cursor: `npx skills add NVIDIA/OpenShell --skill generate-sandbox-policy -g -a cursor -y`
Gemini CLI: `npx skills add NVIDIA/OpenShell --skill generate-sandbox-policy -g -a gemini-cli -y`

## Description

Generate sandbox security policies from plain-language requirements and optional REST API documentation. Produces L4 or fine-grained L7 network policies and ordered network middleware configuration. Use for API access rules, middleware host selection, failure behavior, or built-in and operator-run middleware attachment. Trigger keywords - generate policy, create policy, update policy, change policy, sandbox policy, network policy, API policy, security policy, allow API, restrict API, network middleware, supervisor middleware.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Generate Sandbox Policy

Generate YAML sandbox network policies and network middleware configuration from API documentation and natural-language user requirements.

## Overview

This skill translates a user's plain-language policy intent into a valid sandbox policy. The amount of detail the user provides determines the granularity of the generated policy, from broad L4 or preset-based policies (just a host:port) up to fine-grained per-endpoint L7 rules (full API docs).

The output is a `network_policies` YAML block, an optional `network_middlewares` block, and optionally a full policy file that conforms to the sandbox policy schema.

## Step 1: Gather Inputs

### Determine the Detail Tier

The user's input falls into one of three tiers. Work with whatever the user provides, **do not require a higher tier than needed**.

| Tier | User provides | What you can generate |
|------|--------------|----------------------|
| **Minimal** | Host(s) and plain-language intent | L4-only policies, or L7 with access presets (`read-only`, `read-write`, `full`) |
| **Moderate** | Host(s) + some known URL paths or resources | L7 with targeted glob rules for known paths, presets for the rest |
| **Full** | Complete API docs (OpenAPI, Swagger, markdown, URL) | Fine-grained per-endpoint L7 rules with specific method+path combinations |

### Minimal Tier (host + intent only)

The user provides API endpoints and a broad intent. No API docs needed.

Examples:

- "Allow curl to hit api.github.com, read-only"
- "Give claude full access to api.anthropic.com"
- "Let /usr/bin/myapp talk to internal-svc:8080 but only for reading"

This is sufficient for:

- **L4-only** policies (host:port + binary checks, no method or path rules)
- **Preset-based L7** policies (`read-only`, `read-write`, `full` on all paths)

For this tier, default to:

The rest: https://github.com/NVIDIA/OpenShell/blob/HEAD/skills/generate-sandbox-policy/SKILL.md
