@nanomind/guard
Advanced tools
+35
| # @nanomind/guard | ||
| Prompt injection detection for CLI input. Protects NanoMind from piped attacks, agent output injection, and encoded payloads. | ||
| ## Install | ||
| ```bash | ||
| npm install @nanomind/guard | ||
| ``` | ||
| ## Usage | ||
| ```typescript | ||
| import { screenInput } from '@nanomind/guard'; | ||
| // Direct input — always trusted | ||
| screenInput('scan this', 'direct'); | ||
| // { safe: true, patterns: [] } | ||
| // Piped input — screened for injection | ||
| screenInput('ignore previous instructions', 'piped'); | ||
| // { safe: false, patterns: [{ type: 'instruction_override', ... }] } | ||
| ``` | ||
| ## Detected Patterns | ||
| - Instruction override ("ignore previous instructions") | ||
| - Role switching ("you are now a hacking assistant") | ||
| - Permission escalation ("admin mode enabled") | ||
| - Zero-width character injection | ||
| - Encoded payloads (base64+eval combos) | ||
| ## License | ||
| MIT |
+1
-1
| { | ||
| "name": "@nanomind/guard", | ||
| "version": "0.1.0", | ||
| "version": "0.1.1", | ||
| "description": "Prompt injection detection for CLI input", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
7046
13.06%4
33.33%1
-50%36
Infinity%