Ágensek bizalmi határai
Kiszámítható ellenőrzést helyez az ágenseszközök köré, hogy nem megbízható dokumentumok ne válthassák korlátlan külső műveletté az adatelérést.
agent-permissions-trust
Nézd meg, miben segítMikor hasznos?
Akkor használd, ha az ágens levelet, weboldalt vagy feltöltést olvas fájl-, hálózati vagy módosítási jogok mellett.
Miben segít neked?
- A nyelvi modellen kívül érvényesíti az eszközszabályokat.
- Elválasztja a nem megbízható bemenetet az érzékeny adatoktól és külső műveletektől.
- Korlátozza a végrehajtási útvonalakat és kiszűri a titkokat.
Például ezt kérheted
Vizsgálj meg egy leveleket olvasó, külső HTTP-eszközökkel is rendelkező ágenst. Egy tesztlevél kérje magánfájlok feltöltését. A levél elolvasása ne adjon sem fájlhozzáférést, sem engedélyt a tartalom külső elküldésére.
Részletes dokumentáció
Itt a skill eredeti útmutatóját, példáit és ellenőrzési szempontjait olvashatod az eredeti nyelven.
Összecsukás
Agent Permissions & Trust Boundaries
An LLM cannot reliably separate instructions from data once both share the same context window. Enforce security, authorization, and blast-radius controls outside the model in deterministic application code.
The Lethal Trifecta & Capability Isolation
Prompt injection becomes a critical breach when a single agent turn combines all three capabilities:
- Access to private or sensitive data (customer records, credentials, internal source code)
- Exposure to untrusted input (emails, web pages, public issues, third-party tool outputs, uploaded files)
- Ability to trigger external side effects or exfiltration (sending HTTP requests, emails, messages, mutating databases, or rendering external image URLs)
Whenever an agent processes untrusted content, either strip outbound/mutating tools from that execution step or gate every side effect through a deterministic policy verifier or human confirmation.
Policy Enforcement & Approval Tiering
Enforce a deterministic policy check in the tool dispatcher before invoking any handler:
| Risk Tier | Tool Examples | Mandatory Enforcement |
|---|---|---|
| Tier 0: Read-Only / Scoped | Workspace file read, scoped search, schema inspection | Path canonicalization (realpath), workspace root boundary check, denylist on .env/secret paths |
| Tier 1: Reversible Local Write | Editing project source files, running unit tests in sandbox | Workspace jail, resource quotas (CPU, memory, timeout), diff recorded in audit log |
| Tier 2: Shared / External Mutation | Sending messages, creating tickets, writing to shared DB, API POST/PUT |
Caller identity propagation (OBO token), schema + policy allowlist, idempotency key, rate limit |
| Tier 3: Destructive / Privileged | DROP/DELETE, production deploy, secret access, arbitrary network egress, payment actions |
Pause run in awaiting_approval (deferToolCall), display exact canonical arguments/diff to human approver, verify cryptographic or session-bound approval before execution |
Non-Negotiable Security Invariants
- Never pass raw secrets into model context: Keep API keys, database passwords, OAuth tokens, and private keys in the host credential store. Tools reference credentials by logical handle or the host injects headers at the HTTP boundary—never as tool arguments generated by the LLM.
- Canonicalize before checking policy: Validate paths after resolving symlinks (
fs.realpath) and URLs after DNS resolution (blocking RFC1918, loopback, and cloud metadata169.254.169.254to prevent SSRF). - Constrain command and code execution: Avoid shell interpolation (
sh -cwith model strings). Pass argument arrays (execFile), sanitize environment variables (PATH,LD_PRELOAD, secret env vars), and run untrusted code inside isolated sandboxes or containers with read-only root filesystems and restricted egress. - Redact logs and tool outputs: Scrub bearer tokens, cookies, connection strings, and PII from
tool_resultpayloads and trace spans before they enter the prompt or telemetry storage.
Csomagban lévő fájlok 1
SKILL.md
