← Back to PRs

#8238: feat: Add Glitchward Shield plugin for prompt injection protection

by eyeskiller open 2026-02-03 19:35 View on GitHub →
stale
## Summary - Add new extension integrating Glitchward Shield for LLM prompt injection detection - Real-time scanning of incoming messages via `message_received` and `before_agent_start` hooks - `/shield` command for status and `/shield test` for testing - Configurable block/warning thresholds ## Features - Scans all prompts before they reach the LLM - Injects security warnings for risky prompts - Logs blocked attempts and warnings - Dashboard integration at glitchward.com/shield ## Test plan - [x] Plugin loads correctly (`openclaw plugins list`) - [x] `/shield` shows status - [x] `/shield test` runs test scan against API - [x] API returns correct detection results (100% risk for injection attempts) 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR adds a new bundled extension (`extensions/glitchward-shield`) that integrates with Glitchward Shield to scan prompts for injection attempts. The plugin registers a connection provider for onboarding, hooks into `message_received` and `before_agent_start` to scan incoming content, and adds a `/shield` command for status and a basic test scan. Notable behavior: the current implementation primarily logs high-risk detections and prepends warnings to the agent prompt; it does not currently prevent a risky message from reaching the LLM. Also, the plugin’s `configSchema` is set to `emptyPluginConfigSchema()`, which likely prevents the JSON schema in `openclaw.plugin.json` (and user-configured thresholds) from being applied. <h3>Confidence Score: 2/5</h3> - This PR is mergeable but has behavior/config gaps that will surprise users relying on blocking and configurable thresholds. - Core integration points (hooks/command/provider) look reasonable, but the plugin config schema is effectively empty so user-configured settings may not apply, and the implementation does not actually block prompts despite README/PR claims. These are likely to cause functional misunderstandings in production deployments. - extensions/glitchward-shield/index.ts; extensions/glitchward-shield/openclaw.plugin.json; extensions/glitchward-shield/README.md <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs