Skip to content

promptshield-io/promptshield

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

205 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

PromptShield

CI codecov license

PromptShield Banner

The "Clean Room" for AI inputs. A comprehensive security ecosystem to detect, visualize, and sanitize invisible threats in LLM prompts.


πŸ›‘ The Problem

LLM inputs are code. If you can't see the text, you can't trust the execution. Attackers use:

  • Invisible Characters: Zero-width spaces (\u200B) to smuggle instructions past keyword filters.
  • Trojan Source: BIDI overrides to make code look like it does one thing while doing another.
  • Homoglyphs: Cyrillic Π° looking like Latin a to spoof trusted domains or commands.

PromptShield provides the tooling to detect these threats at every stage of your development lifecycle.


πŸ“¦ Ecosystem

Package Status Description
@promptshield/core npm The Engine. Zero-dependency, high-performance threat detection logic.
@promptshield/cli npm The Gatekeeper. CI/CD tool to block malicious prompts from entering your codebase.
mayank1513.promptshield Open VSX Version The Lens. VS Code/Open VSX extension for real-time threat visualization (X-Ray Mode).
@promptshield/lsp npm The Brain. Language Server Protocol implementation for universal editor support.
@promptshield/sanitizer npm The Cure. Deterministic logic to strip invisible threats safely.
@promptshield/ignore npm The Filter. Standardized syntax for suppressing false positives.
@promptshield/workspace npm The Orchestrator. High-performance filesystem and caching engine.
@promptshield/tiptap npm The Shield. Real-time Tiptap editor protection.

⚑ Quick Start

For Developers (VS Code / Open VSX)

  1. Install the PromptShield VSCode Extension / PromptShield Open VSX Extension.
  2. Open any file. Invisible characters and threats are instantly highlighted.

For CI/CD (CLI)

# Scan your prompts directory and fail if threats are found
pnpx @promptshield/cli scan "prompts/**/*.txt" --check

For Node.js Apps

import { scan } from "@promptshield/core";

const result = scan(userInput);
if (!result.isClean) {
  throw new Error("Security threat detected!");
}

🀝 Contributing

We welcome security researchers and engineers! This monorepo is managed with Turbo and PNPM.

  1. Clone the repo
  2. pnpm install
  3. pnpm build
  4. pnpm test

with πŸ’– by Mayank Kumar Chaudhari

About

The security layer for AI prompts. A unified monorepo for detecting and neutralizing adversarial Unicode, invisible character poisoning, and homoglyph attacks in LLM workflows. Includes the GhostBuster engine, VS Code extension, and CLI.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  
  •  

Packages

 
 
 

Contributors

Generated from turboforge-dev/turboforge