aport-agent-guardrail
Pre-action authorization for AI agents. Enforces policies before tools execute—blocks unauthorized commands, data exfiltration, and malicious actions. Works…
от modbender★ 21 звезда на GitHub
Установить aport-agent-guardrail в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
APort Agent Guardrail
Skill identifier: aport-agent-guardrail · Category: Security / Infrastructure
🛡️ What This Skill Does
Pre-action authorization for AI agents. Every tool call is evaluated against a passport (identity + capabilities + limits) and policy before it executes. If denied, the tool never runs.
Key features:
- ✅ Deterministic enforcement – Runs in
before_tool_callhook; agent cannot bypass - ✅ Blocks malicious actions – Unauthorized commands, data exfiltration, API abuse prevented
- ✅ Structured policies – Based on Open Agent Passport (OAP) v1.0
- ✅ Fail-closed by default – Errors deny tool execution (security over availability)
- ✅ Audit trail – Every decision logged with tamper-evident hashes
- ✅ Framework-agnostic – OpenClaw, IronClaw, PicoClaw, and compatible runtimes
How it protects you:
- Prompt injection → Agent cannot bypass hook-based enforcement
- Malicious skills → All tool calls checked regardless of source
- Unauthorized commands → Allowlist + 40+ blocked patterns (rm -rf, sudo, etc.)
- Data exfiltration → File access, messaging, web requests controlled
- Resource exhaustion → Rate limits, size caps enforced
Install once, protected forever. The plugin runs automatically on every tool call.
⚡ Quick Start
# Install APort guardrails (one-time setup)
npx @aporthq/aport-agent-guardrails
# Follow wizard to create passport and configure policies
# Plugin auto-registers with OpenClaw
# Now your agent is protected
# All tool calls checked before execution
With hosted passport (optional):
# Get agent_id from aport.io
npx @aporthq/aport-agent-guardrails <agent_id>
Requirements: Node 18+, jq
📦 Installation
Option 1: npm (recommended)
npx @aporthq/aport-agent-guardrails
The wizard will:
- Create or load passport (local file or hosted from aport.io)
- Configure capabilities and limits
- Install OpenClaw plugin automatically
- Set up wrapper scripts
After install: Plugin enforces before every tool call. No further action needed.
Option 2: With hosted passport
npx @aporthq/aport-agent-guardrails <agent_id>
Get agent_id at aport.io for:
- Cryptographically signed decisions
- Global suspend (<200ms across all systems)
- Centralized audit and compliance dashboards
- Team collaboration
Option 3: From source
git clone https://github.com/aporthq/aport-agent-guardrails
cd aport-agent-guardrails
./bin/openclaw
Guides:
🚀 Usage
Automatic enforcement (default)
After installation, the plugin runs automatically:
# Your agent uses tools normally
agent> run git status
# ✅ APort: passport checked → policy evaluated → ALLOW → tool executes
agent> run rm -rf /
# ❌ APort: passport checked → blocked pattern detected → DENY → tool blocked
You do nothing. The plugin enforces on every tool call in the background.
Testing the guardrail (optional)
Direct script calls for testing or automation:
# Test allowed command
~/.openclaw/.skills/aport-guardrail.sh system.command.execute '{"command":"ls"}'
# Exit 0 = ALLOW
# Test blocked command
~/.openclaw/.skills/aport-guardrail.sh system.command.execute '{"command":"rm -rf /"}'
# Exit 1 = DENY
# Test messaging
~/.openclaw/.skills/aport-guardrail.sh messaging.message.send '{"channel":"whatsapp","to":"+15551234567"}'
Exit codes:
0= ALLOW (tool may proceed)1= DENY (reason in decision.json)
Decision logs:
- Latest:
~/.openclaw/aport/decision.json - Audit trail:
~/.openclaw/aport/audit.log - API mode: Signed receipts via APort API
🔍 How It Works
Pre-Action Authorization Flow
User Request → Agent Decision → APort Check → [ALLOW/DENY] → Tool Execution
↑
Policy + Passport
- User makes request (e.g., "Deploy to production")
- Agent decides to use tool (e.g., exec.run with git push)
- OpenClaw fires hook (
before_tool_call) - APort evaluates:
- Load passport (identity, capabilities, limits)
- Map tool → policy (exec → system.command.execute.v1)
- Check allowlist, blocked patterns, rate limits
- Decision: ALLOW or DENY
- Audit: Log decision with timestamp, policy, reason codes
Agent cannot bypass. Hook is registered by OpenClaw, not controlled by prompts.
What Gets Installed
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл aport-agent-guardrail?
Pre-action authorization for AI agents. Enforces policies before tools execute—blocks unauthorized commands, data exfiltration, and malicious actions. Works with OpenClaw, IronClaw, PicoClaw via before_tool_call hook. Deterministic enforcement the agent cannot bypass. Optional API mode (APORT_API_URL, APORT_AGENT_ID, APORT_API_KEY) for hosted passports and signed decisions.
Как установить скилл aport-agent-guardrail?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл aport-agent-guardrail запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…