Pular para o conteúdo
Skillpedia
Segurança21 mil · #10367

generate-sandbox-policy

O que ela faz

Esta skill faz a IA transformar o que você quer que um sandbox acesse em um arquivo de política de rede válido. É para quem configura sandboxes do OpenShell e quer controlar quais sites e chamadas de API são permitidos.

Quando usar

  • ✓Quando você quiser permitir que sua IA em sandbox acesse um site ou uma API específica.
  • ✓Quando tiver a documentação de uma API e quiser uma política limitada a certos métodos e caminhos.
  • ✓Quando precisar alterar como o middleware de rede é conectado a um sandbox ou o que acontece quando ele falha.

Link da skill

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

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/NVIDIA/OpenShell/blob/main/skills/generate-sandbox-policy/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Escreva uma política de sandbox que permita à minha IA ler da API do GitHub, e nada além disso.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

A IA reúne os hosts e o tipo de acesso necessários, escolhe o nível de detalhe que a sua entrada permite e escreve uma política em YAML no formato de política de sandbox para você revisar.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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, full on all paths)

For this tier, default to:

  • access: read-only when the user says "read", "browse", "view", "query", "fetch"
  • access: read-write when the user says "read-write", "create", "update" (but not "delete")
  • access: full when the user says "full access", "everything", "unrestricted"
  • L4-only when the user says "just allow it", "pass through", or "no inspection". Omit protocol for explicit-proxy clients. Use protocol: tcp only 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

Perguntas frequentes

Preciso de documentação da API para usar?

Não. Um host e uma descrição simples bastam para uma política básica. Documentação completa da API permite regras mais precisas.

O que é um preset de acesso?

Um preset é um nível de acesso pronto, como somente leitura, leitura e escrita, ou completo, que a IA pode usar quando regras detalhadas não são necessárias.

Ela consegue escrever regras só para alguns caminhos?

Sim. Com alguns caminhos de URL conhecidos, ela pode escrever regras específicas para eles e usar presets para o restante.

Detalhes

Descrição original do autor

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

Popularidade

Estrelas no GitHub
21 mil
Posição no ranking
#10367
Licença
Apache-2.0
Atualizada em
02/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas