Tools
Injection Guard
Security plugin for OpenClaw. Scans tool results for prompt injection patterns. 70+ signatures, three modes (warn/strict/monitor). MIT license.
Install
npm install openclaw-injection-guard
Configuration Example
{
"plugins": {
"entries": {
"injection-guard": {
"enabled": true,
"mode": "warn",
"includeOptIn": true,
"includePaperclip": true,
"maxFindings": 50
}
}
}
}
README
# OpenClaw Injection Guard
Security plugin for OpenClaw. It scans tool results for prompt-injection patterns before they are persisted into agent context/session transcripts.
## Why
OpenClaw core security guidance treats tool-result injection as an integration concern. At the same time, real payloads targeting OpenClaw-style workflows are circulating in the wild (including thread/issue automation scenarios). This plugin adds a guard rail with 33+ patterns (currently 70+ including Paperclip-specific vectors).
## Install
```bash
npm install openclaw-injection-guard
```
## Quick Start
1. Register plugin in OpenClaw plugin config.
2. Enable `tool_result_persist` hook through plugin registration (handled by this plugin automatically).
Example plugin config snippet:
```json
{
"plugins": {
"entries": {
"injection-guard": {
"enabled": true,
"mode": "warn",
"includeOptIn": true,
"includePaperclip": true,
"maxFindings": 50
}
}
}
}
```
## Modes
- **warn** (default): prefixes suspicious tool-result text with a warning label.
- **strict**: blocks when at least one **CRITICAL** pattern matches.
- **monitor**: logs findings only, keeps content unchanged.
## Patterns
Pattern sources:
- Orchesis Injection Shield v1.1 default-on categories
- Orchesis Injection Shield v1.1 opt-in categories
- Orchesis Paperclip/OpenClaw abuse patterns
- Additional hardening rules for shell-chain and stealth signals
Severity groups:
- **CRITICAL**: prompt override, fake system directives, shell execution chains
- **HIGH**: exfiltration, credential access, filesystem/tool abuse
- **MEDIUM**: secrecy instructions, context confusion, hidden Unicode obfuscation
## Development
```bash
npm install
npm test
npm run build
```
tools
Comments
Sign in to leave a comment