🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@nanomind/guard

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nanomind/guard

Prompt injection detection for CLI input

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

@nanomind/guard

Prompt injection detection for CLI input. Protects NanoMind from piped attacks, agent output injection, and encoded payloads.

Install

npm install @nanomind/guard

Usage

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

Keywords

nanomind

FAQs

Package last updated on 25 Mar 2026

Did you know?

Socket

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.

Install

Related posts