Fast prompt-injection, credential, and exfiltration scanner for WeVibe memories.
wevibe-guard is a Rust security scanner (edition = 2021) built on YARA-X.
It is published as both:
- a library crate:
wevibe_guard - a CLI binary:
wevibe-guard
The scanner combines signature rules and pattern-based heuristics to detect high-signal threats in memory text, keywords, and metadata.
This project is in active alpha and is designed to provide strong, deterministic warnings while the broader moderation and approval flow continues to evolve.
wevibe-guard runs locally in client workflows at two points:
- submission time (advisory scan before new memory content is sent)
- recall time (pre-injection scan before memory is provided to an agent)
Integrations (including MCP and plugins) typically invoke it via WEVIBE_GUARD_BIN.
Guard is advisory by design: it warns and surfaces detections, but does not block automatically. The human approver remains the primary security boundary.
Current rule and heuristic coverage includes:
- YARA-signature prompt injection patterns (instruction bypass, role hijack, jailbreak/system prompt extraction)
- credential leakage patterns (AWS keys/secrets, token formats, connection strings)
- Unicode mathematical-alphanumeric / homoglyph injection indicators
- Base64-encoded injection and credential payloads
- suspicious URLs, hostnames, and IPv4 endpoints
- malicious dependency/config directives and suspicious outbound install patterns
- shell-command exfiltration patterns (including curl/wget-style execution chains)
Guard does not fully solve semantic natural-language attacks on its own. Those are mitigated through human review and reputation/moderation controls.
cargo buildRelease build:
cargo build --releaseThe CLI reads a JSON request from stdin and prints JSON findings to stdout.
Example:
printf '{"memory":{"text":"hello"},"stack":[],"include_flags":true}' | ./target/debug/wevibe-guardRun tests:
cargo testRun benchmarks:
cargo bench- Set
WEVIBE_GUARD_BINin calling applications to point to the preferred guard executable. - The CLI accepts structured memory input (
text, optionalkeywords, optionalmetadata) and returns detections plus optional heuristic flags.
See ROADMAP.md for current status and planned improvements.
Apache-2.0. See LICENSE.