securing-agentic-ai-tool-invocation
하는 일
이 시스템은 AI 에이전트를 위험한 행동으로부터 보호합니다. 에이전트가 허용된 도구만 올바른 권한으로 사용하도록 하며, 중요한 작업을 하기 전에 사용자의 승인을 요청할 수 있습니다.
사용하는 경우
- ✓AI 에이전트가 이메일을 보내거나 결제를 할 수 있을 때.
- ✓파일을 수정하거나 코드를 실행할 수 있는 AI 에이전트를 만들 때.
- ✓AI 에이전트가 도구를 잘못 사용하거나 과도하게 사용하지 않도록 할 때.
스킬 링크
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/securing-agentic-ai-tool-invocation/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“AI 도구 호출이 문제를 일으키지 않도록 보안을 설정해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 시스템은 에이전트가 사용할 수 있는 도구와 사용 방식을 정의하는 방식으로 작동합니다. 위험도가 높은 작업에는 사용자의 승인을 요구할 수 있고, 감사를 위해 모든 작업을 기록합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Securing Agentic AI Tool Invocation
Authorized-use-only notice: This is a defensive skill. The controls below govern how an AI agent invokes tools/plugins. Deploy them on systems you own or operate. Test guardrail bypasses only against your own agent in a non-production environment.
Overview
Autonomous (agentic) AI systems decide which tool to call, with what arguments, and when, based on model reasoning over untrusted inputs. That makes the tool-invocation boundary the highest-risk control point in an agent: a single successful prompt injection or a poisoned tool can turn the agent into a confused deputy that deletes data, sends money, or pivots into connected systems. The relevant threat is MITRE ATLAS AML.T0053 (LLM Plugin Compromise) and the OWASP Agentic AI Top 10 classes for Tool Misuse, Excessive Agency, and Privilege Compromise.
The defense is layered, defense-in-depth governance of tool calls: (1) a strict allowlist of which tools the agent may call and with which argument shapes; (2) least-privilege identity binding so each tool call runs with scoped, short-lived credentials tied to the acting user/session — not a single god-mode service account; (3) policy enforcement at the call boundary (NVIDIA NeMo Guardrails dialog/flow rails and tool guardrails, or a deterministic policy wrapper); (4) human-in-the-loop (HITL) approval for high-impact actions; and (5) audit logging of every invocation for detection. This skill implements all five with verified, runnable patterns using NeMo Guardrails and a framework-agnostic Python policy wrapper.
When to Use
- When building or hardening an agent that can call tools with real-world side effects (email, payments, file writes, infra changes, code execution).
- When mapping OWASP Agentic AI Top 10 controls onto an existing agent framework.
- When you need to bound the blast radius of prompt injection / tool poisoning.
- When a compliance or governance requirement mandates approvals and audit trails for autonomous actions.
- During an architecture review of an agent's tool layer.
Prerequisites
- Python 3.10+ and a virtual environment.
- An agent/LLM framework you control.
- Install the tooling:
python -m venv .venv && source .venv/bin/activate
# NVIDIA NeMo Guardrails — programmable rails incl. tool/flow controls
pip install nemoguardrails
# JSON schema validation for tool argument allowlisting
pip install jsonschema
# (Optional) cloud SDK for scoped credential issuance, e.g. AWS STS
pip install boto3
Objectives
- Define an explicit tool allowlist with per-tool argument schemas (deny-by-default).
- Bind each tool call to a scoped, short-lived identity instead of a shared service account.
- Enforce a policy decision (allow / require-approval / deny) before every invocation.
- Insert human-in-the-loop approval gates for high-impact tools.
- Wrap an agent's tools with NeMo Guardrails and/or a deterministic policy wrapper.
- Produce a tamper-evident audit log of all tool calls mapped to ATLAS AML.T0053.
MITRE ATT&CK Mapping
| ID | Official Name | Relevance |
|---|---|---|
| AML.T0053 | LLM Plugin Compromise | The agent's tools/plugins are the asset these controls protect |
| AML.T0051 | LLM Prompt Injection | Injection is the primary vector that abuses tool invocation |
| AML.T0051.001 | LLM Prompt Injection: Indirect | Indirect injection via tool results drives unauthorized tool calls |
| AML.T0057 | LLM Data Leakage | Excessive tool agency leads to data exfiltration these controls prevent |
Workflow
1. Inventory tools and classify impact
List every tool the agent can call, its arguments, and an impact tier (read-only / write / high-impact). High-impact tools require HITL.
# tool_registry.py
TOOL_POLICY = {
"search_docs": {"impact": "read", "approval": False},
"create_ticket":{"impact": "write", "approval": False},
"send_email": {"impact": "high", "approval": True},
"transfer_funds":{"impact": "high", "approval": True},
"run_shell": {"impact": "high", "approval": True},
}
2. Define per-tool argument allowlists (deny-by-default)
Validate every call against a JSON schema; reject anything not explicitly allowed.
# schemas.py
from jsonschema import validate, ValidationError
TOOL_SCHEMAS = {
"send_email": {
"type": "object",
"properties": {
…
자주 묻는 질문
심층 방어(defense-in-depth)란 무엇인가요?
여러 겹의 보안 장치를 두는 방식입니다. 한 층이 뚫려도 나머지 층이 시스템을 계속 보호합니다.
‘도구 허용 목록(tool allowlist)’이란 무엇인가요?
AI 에이전트가 사용할 수 있는 도구를 정확히 적어 둔 목록입니다. 목록에 없는 도구는 모두 차단됩니다.
‘사람이 개입하는 승인(human-in-the-loop approval)’이란 무엇인가요?
매우 중요하거나 위험한 작업의 경우, AI 에이전트가 진행하기 전에 사용자에게 허락을 구하는 방식입니다.
상세 정보
작성자의 원본 설명
Implements defense-in-depth controls at an AI agent's tool-invocation boundary using tool allowlisting, least-privilege identity binding, NeMo Guardrails policy enforcement, human-in-the-loop approval, and audit logging. Use when hardening an agent that calls tools with real side effects (email, payments, file writes, code execution), mapping OWASP Agentic AI Top 10 controls, or bounding prompt-in
인기도
- GitHub 스타
- 35k
- 순위
- #8363
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 8. 31.
댓글
- …
이 저장소의 다른 스킬
abusing-dpapi-for-credential-access
35kAI 에이전트에게 특정 작업을 위한 준비된 지침을 제공해, 더 잘하고 더 빠르게 처리하도록 합니다.
abusing-shadow-credentials-for-privesc
35kAI 에이전트가 명확하고 잘 구성된 텍스트를 쓰도록 가르칩니다.
achieving-cmmc-level-2-compliance
35kCMMC Level 2 규정 준수를 위한 환경을 준비하도록 돕습니다. 보안 요구 사항을 구현하고 필요한 문서를 관리합니다.
acquiring-disk-image-with-dd-and-dcfldd
35k에이전트가 하드 드라이브의 정확한 복사본을 만들도록 돕습니다. 조사 중 정보가 손실되거나 변경되지 않도록 하는 데 유용합니다.
비슷한 스킬
add-model-provider
394k에이전트가 안전한 설정 명령으로 새 AI 모델 제공자를 OpenClaw에 연결하고, API 키를 평문으로 두지 않으며, 실시간 테스트를 실행하도록 돕습니다.
acp-router
394k에이전트가 OpenClaw를 통해 Claude Code나 Cursor 같은 코딩 도우미에 작업을 전달해, 작업이 그 도구에서 실행되도록 돕습니다.
browser-automation
394k에이전트가 로그인, 탭, 페이지 응답이 멈췄을 때의 복구를 포함해 웹 페이지를 단계별로 조작하도록 가르칩니다.