
Security News
npm v12 Ships With Install Scripts Off by Default, Begins Deprecating 2FA-Bypass Tokens
npm v12 is generally available, turning install scripts off by default and beginning the deprecation of 2FA-bypass publishing tokens.
openguardrails-for-openclaw
Advanced tools
Agent-based prompt injection detection for OpenClaw powered by OpenGuardrails SOTA security
Detect prompt injection attacks hidden in long content (emails, web pages, documents).
Powered by OpenGuardrails SOTA security detection capabilities.
GitHub: https://github.com/openguardrails-for-openclaw/openguardrails-for-openclaw
npm: https://www.npmjs.com/package/openguardrails-for-openclaw
OpenGuardrails achieves SOTA results across multilingual safety benchmarks, outperforming LlamaGuard, Qwen3Guard, and other leading guard models.
| Metric | Score | Comparison |
|---|---|---|
| English Prompt F1 | 87.1% | +2.8% vs next best |
| English Response F1 | 88.5% | +8.0% vs next best |
| Multilingual Prompt F1 | 97.3% | +12.3% vs next best |
| Multilingual Response F1 | 97.2% | +19.1% vs next best |
Core Capabilities:
Technical Paper: https://arxiv.org/abs/2510.19169
Long Content (email/webpage/document)
|
v
+-----------+
| Chunker | Split into 4000 char chunks with 200 char overlap
+-----------+
|
v
+-----------+
|LLM Analysis| Analyze each chunk independently with full focus
| (OG-Text) | "Is there a hidden prompt injection in this content?"
+-----------+
|
v
+-----------+
| Verdict | Aggregate findings from all chunks -> isInjection: true/false
+-----------+
# Install from npm
openclaw plugins install openguardrails-for-openclaw
# Restart gateway to load the plugin
openclaw gateway restart
# Check plugin list, confirm openguardrails-for-openclaw status is "loaded"
openclaw plugins list
You should see:
| OpenGuardrails for OpenClaw | openguardrails-for-openclaw | loaded | ...
| Command | Description |
|---|---|
/og_status | View status and statistics |
/og_report | View recent injection detection details |
/og_feedback <id> fp [reason] | Report false positive |
/og_feedback missed <reason> | Report missed detection |
Download the test file with hidden injection:
curl -L -o /tmp/test-email.txt https://raw.githubusercontent.com/openguardrails-for-openclaw/openguardrails-for-openclaw/main/samples/test-email.txt
Ask the agent to read this file:
Read the contents of /tmp/test-email.txt
# Real-time log monitoring
tail -f /tmp/openclaw/openclaw-$(date +%Y-%m-%d).log | grep "openguardrails-for-openclaw"
# Or use openclaw command
openclaw logs --follow | grep "openguardrails-for-openclaw"
If detection succeeds, you'll see logs like:
[openguardrails-for-openclaw] tool_result_persist triggered for "read"
[openguardrails-for-openclaw] Analyzing tool result from "read" (1183 chars)
[openguardrails-for-openclaw] Analysis complete in 5896ms: INJECTION DETECTED
[openguardrails-for-openclaw] INJECTION DETECTED in tool result from "read": Chunk 1: Contains instructions to override guidelines and execute a malicious shell command
In OpenClaw conversation, enter:
/og_status
Returns detection statistics:
**OpenGuardrails Status**
- Enabled: true
- Block on risk: true
- Max chunk size: 4000 chars
**Statistics**
- Total analyses: 5
- Total blocked: 1
- Blocked (24h): 1
- Avg duration: 4521ms
**User Feedback**
- False positives reported: 0
- Missed detections reported: 0
**Recent Analyses**
- 2025-02-05T14:30:19: tool_result (1183 chars) - DETECTED
/og_report
Shows recent injection detection details:
**Recent Prompt Injection Detections**
**#1** - 2025-02-05T14:30:19
- Status: DETECTED
- Type: tool_result (1183 chars)
- Reason: Contains instructions to override guidelines and execute a malicious shell command
- Suspicious: "<Here comes prompt injection content>..."
Use `/og_feedback <id> fp` to report false positive
Use `/og_feedback missed <reason>` to report missed detection
If you find a false positive:
/og_feedback 1 fp This is normal security documentation
If you find a missed detection:
/og_feedback missed Email contained hidden injection that wasn't detected
Feedback is recorded for continuous improvement.
When injection attacks are detected, warnings are immediately logged. You can get real-time notifications through:
Option 1: Monitor Logs
# Real-time monitoring with alert filtering
tail -f /tmp/openclaw/openclaw-$(date +%Y-%m-%d).log | grep "INJECTION DETECTED"
Option 2: Configure Webhook (Advanced)
Configure hooks in ~/.openclaw/openclaw.json to forward alerts to Slack/Discord/etc:
{
"hooks": {
"og-alert": {
"url": "https://your-webhook-url.com/alert",
"events": ["plugin:openguardrails-for-openclaw:injection-detected"]
}
}
}
You can set up scheduled tasks to have OpenClaw automatically report detection status:
In OpenClaw conversation, enter:
/cron add --name "OG-Daily-Report" --every 24h --message "/og_report"
This will automatically execute /og_report every 24 hours and send the detection report.
Other scheduling options:
--every 1h - Every hour--every 7d - Every week--cron "0 9 * * *" - Every day at 9 AM (cron expression)View scheduled tasks:
/cron list
Remove scheduled task:
/cron remove OG-Daily-Report
Edit OpenClaw config file (~/.openclaw/openclaw.json):
{
"plugins": {
"entries": {
"openguardrails-for-openclaw": {
"enabled": true,
"config": {
"blockOnRisk": true,
"maxChunkSize": 4000,
"overlapSize": 200,
"timeoutMs": 60000
}
}
}
}
}
| Option | Default | Description |
|---|---|---|
enabled | true | Enable/disable plugin |
blockOnRisk | true | Block tool calls when injection is detected |
maxChunkSize | 4000 | Maximum characters per chunk |
overlapSize | 200 | Overlap characters between chunks |
timeoutMs | 60000 | Analysis timeout in milliseconds |
openclaw plugins uninstall openguardrails-for-openclaw
openclaw gateway restart
# Clone repository
git clone https://github.com/openguardrails-for-openclaw/openguardrails-for-openclaw.git
cd openguardrails-for-openclaw
# Install dependencies
npm install
# Local development install
openclaw plugins install -l .
openclaw gateway restart
# Type check
npm run typecheck
# Run tests
npm test
MIT
FAQs
Agent-based prompt injection detection for OpenClaw powered by OpenGuardrails SOTA security
The npm package openguardrails-for-openclaw receives a total of 0 weekly downloads. As such, openguardrails-for-openclaw popularity was classified as not popular.
We found that openguardrails-for-openclaw demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
npm v12 is generally available, turning install scripts off by default and beginning the deprecation of 2FA-bypass publishing tokens.

Research
/Security News
Socket tracks the activity as Operation “Muck and Load”: a threat actor uses commit-farming workflows, public dead drops, and protected archives to stage Windows RAT and infostealer malware.

Security News
pnpm 11.10 hardens registry auth to block token redirection, tightens pack-app and deploy, and makes the Rust port (v12) installable.