generate-sandbox-policy
하는 일
이 스킬은 AI가 샌드박스가 접근해야 할 대상을 올바른 네트워크 정책 파일로 바꾸도록 합니다. OpenShell 샌드박스를 설정하고, 허용되는 사이트와 API 호출을 통제하려는 사람을 위한 스킬입니다.
사용하는 경우
- ✓샌드박스 AI가 특정 웹사이트나 API에 접근하도록 허용하고 싶을 때.
- ✓API 문서가 있고, 특정 메서드와 경로로 제한된 정책을 원할 때.
- ✓샌드박스에 네트워크 미들웨어를 연결하는 방식이나 실패 시 동작을 바꿔야 할 때.
스킬 링크
https://github.com/NVIDIA/OpenShell/blob/main/skills/generate-sandbox-policy/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“내 AI가 GitHub API에서 읽기만 할 수 있고 다른 곳은 접근하지 못하게 하는 샌드박스 정책을 작성해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 필요한 호스트와 접근 수준을 모으고, 입력이 허용하는 만큼 세부 수준을 고른 다음, 검토할 수 있도록 샌드박스 정책 형식에 맞는 YAML 정책을 작성합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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,fullon all paths)
For this tier, default to:
access: read-onlywhen the user says "read", "browse", "view", "query", "fetch"access: read-writewhen the user says "read-write", "create", "update" (but not "delete")access: fullwhen the user says "full access", "everything", "unrestricted"- L4-only when the user says "just allow it", "pass through", or "no
inspection". Omit
protocolfor explicit-proxy clients. Useprotocol: tcponly when the workload must use native DNS and direct socket calls, the endpoint has a valid DNS hostname, and the selected runtime support (currently Docker and Podman).
Moderate Tier (host + partial path knowledge)
The user knows some API paths but doesn't have full docs.
Examples:
- "Allow GET on /api/v1/models and POST on /api/v1/completions at integrate.api.nvidia.com"
- "Read-only on /repos/** at api.github.com, but also allow POST on /repos///issues"
Generate explicit rules for the known paths. If the user also wants broader access beyond the specific paths, combine with a catch-all rule or suggest a preset instead.
Full Tier (complete API docs)
The user provides full API documentation. Accepted formats:
| Format | How to consume |
|---|---|
| URL | Fetch with the agent's web access and parse the endpoint list |
| File path | Read the file (OpenAPI JSON/YAML, markdown, etc.) |
| Pasted text | Parse inline from the conversation |
| OpenAPI/Swagger spec | Extract paths object for all method+path combinations |
From the API docs, build an endpoint inventory — a list of (method, path, description) tuples. Group them logically (e.g., by resource or tag). Then generate precise rules that allow only what the user's intent requires.
Policy Intent
Regardless of tier, extract (or infer) these from the user's description:
| Aspect | What to identify | Required? |
|---|---|---|
| Scope | Which API host(s) and port(s) | Yes — always needed |
| Access level | Broad intent: read-only, read-write, full, or custom | Yes — ask if unclear |
| Methods | Specific HTTP methods to allow | Only for custom/fine-grained |
| Paths | Specific URL paths or patterns | Only for custom/fine-grained |
| Enforcement | enforce or audit? Default to enforce. |
No — has a default |
| Binary | Which binary/process should have access | Yes — ask if not stated |
| Middleware | Whether admitted HTTP requests, final HTTP responses, or client WebSocket text messages need an ordered built-in or operator-run processing stage | No |
If the host and access level are clear but binaries are not specified, ask the user w
자주 묻는 질문
사용하려면 API 문서가 필요한가요?
아닙니다. 기본 정책은 호스트와 간단한 설명만으로 충분합니다. 전체 API 문서가 있으면 더 정밀한 규칙을 쓸 수 있습니다.
접근 프리셋이란 무엇인가요?
읽기 전용, 읽기와 쓰기, 전체 같은 미리 만들어진 접근 수준이며, 세부 규칙이 필요하지 않을 때 AI가 쓸 수 있습니다.
일부 경로만 규칙으로 정할 수 있나요?
네. 알려진 URL 경로가 있으면 그 경로에 대한 맞춤 규칙을 쓰고, 나머지에는 프리셋을 씁니다.
상세 정보
작성자의 원본 설명
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.
repo: NVIDIA/OpenShell
인기도
- GitHub 스타
- 21k
- 순위
- #10367
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
create-github-issue
21k에이전트가 gh 명령줄 도구와 프로젝트 템플릿을 써서 버그, 기능 요청, 작업에 대한 GitHub 이슈를 만들도록 돕습니다.
create-github-pr
21k에이전트가 작업이 검토 준비가 되었는지 확인한 뒤, gh 도구로 브랜치의 GitHub 풀 리퀘스트를 열도록 돕습니다.
review-github-pr
21k에이전트가 GitHub 풀 리퀘스트를 읽고 변경 사항, 주요 설계 결정, 눈에 띄는 코드를 쉬운 말로 설명하도록 돕습니다.
watch-github-actions
21k에이전트가 GitHub Actions 실행 상태를 확인하고, 끝날 때까지 지켜보며, 실패한 작업의 로그를 읽도록 돕습니다.