generate-sandbox-policy
Fungsinya
Skill ini membuat AI mengubah apa yang Anda inginkan agar dapat dijangkau sandbox menjadi file kebijakan jaringan yang valid. Skill ini ditujukan untuk orang yang mengatur sandbox OpenShell dan ingin mengendalikan panggilan API dan situs mana yang diizinkan.
Kapan dipakai
- βSaat Anda ingin mengizinkan AI di sandbox menjangkau situs web atau API tertentu.
- βSaat Anda memiliki dokumentasi API dan ingin kebijakan yang dibatasi pada metode dan path tertentu.
- βSaat Anda perlu mengubah cara middleware jaringan dipasang ke sandbox atau apa yang terjadi saat gagal.
Link skill
https://github.com/NVIDIA/OpenShell/blob/main/skills/generate-sandbox-policy/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βTulis kebijakan sandbox yang memungkinkan AI saya membaca dari API GitHub tetapi tidak yang lain.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
AI mengumpulkan host dan akses yang Anda butuhkan, memilih tingkat detail sesuai masukan Anda, lalu menulis kebijakan YAML yang sesuai dengan format kebijakan sandbox agar Anda tinjau.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum
Apakah saya perlu dokumentasi API untuk memakainya?
Tidak. Host dan deskripsi biasa sudah cukup untuk kebijakan dasar. Dokumentasi API lengkap memungkinkan AI menulis aturan yang lebih tepat.
Apa itu access preset?
Preset adalah tingkat akses siap pakai, seperti read-only, read-write, atau full, yang dapat digunakan AI saat aturan rinci tidak diperlukan.
Bisakah membuat aturan hanya untuk beberapa path?
Bisa. Dengan beberapa path URL yang diketahui, AI dapat menulis aturan yang ditargetkan untuk path tersebut dan menggunakan preset untuk sisanya.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 21k
- Peringkat
- #10367
- Lisensi
- Apache-2.0
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
create-github-issue
21kMembantu agent Anda membuat issue GitHub untuk bug, permintaan fitur, atau tugas, menggunakan alat baris perintah gh dan template proyek.
create-github-pr
21kMembantu agent Anda membuka pull request GitHub untuk branch Anda dengan alat gh, setelah memeriksa bahwa pekerjaan siap untuk ditinjau.
review-github-pr
21kMengajari agent Anda membaca pull request GitHub dan menjelaskan perubahannya, pilihan desain utama, dan kode penting dengan bahasa yang sederhana.
watch-github-actions
21kMembantu agent Anda memeriksa eksekusi GitHub Actions, mengikutinya sampai selesai, dan membaca log dari pekerjaan mana pun yang gagal.
Skill serupa
reverse-engineer-anything
422kMembantu agent Anda memeriksa aplikasi dan paket yang sudah dirilis untuk menjelaskan fitur, membandingkan versi, atau memandu pembangunan ulang dengan alat REA.
1password
394kMembantu agent Anda mengatur CLI 1Password, masuk, serta membaca atau menyisipkan rahasia tanpa menampilkan nilainya di chat.
healthcheck
394kMembantu agent Anda mengaudit komputer atau server OpenClaw dari risiko keamanan seperti SSH, firewall, pembaruan, dan cadangan, lalu menyarankan perbaikan aman.