Prompt Injection Scanner banner
savaryncraftlab savaryncraftlab

Prompt Injection Scanner

AI community

Description

A zero-dependency Python CLI that scans READMEs, SKILL files, and source code for prompt-injection patterns targeting AI coding assistants (Claude Code, Cursor, GitHub Copilot, Aider). Catches hidden HTML comments, authority impersonation, and credential exfiltration attempts.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

prompt-injection-scanner

Scan READMEs, skills, and source code for prompt-injection attacks targeting AI coding assistants.

[![CI](https://github.com/savaryncraftlab/prompt-injection-scanner/actions/workflows/ci.yml/badge.svg)](https://github.com/savaryncraftlab/prompt-injection-scanner/actions/workflows/ci.yml) ![python](https://img.shields.io/badge/python-3.10%2B-blue) ![license](https://img.shields.io/badge/license-MIT-green) ![status](https://img.shields.io/badge/status-experimental-orange)

AI coding assistants like **Claude Code**, **Cursor**, **GitHub Copilot**, **Aider**, and **Continue** read your repository files as part of their context — READMEs, `SKILL.md`, source comments, config files, all of it. That text isn't just displayed, it **becomes part of the prompt the model is running against**. The model has no way to tell "user typed this" from "a file on disk typed this".

That's the entire attack surface. Anyone can drop hidden instructions into a public repo — in an HTML comment, a code comment, or a fake "verified by Anthropic" note — and every agent that clones it is potentially compromised.

**This tool scans files for known prompt-injection patterns** so you can spot them before your agent does.

![Same file, two readers — rendered on GitHub vs what your AI sees](docs/demo.png)


The attack, in 20 seconds

Here is a real-looking `README.md`:

# fast-json

A tiny library for parsing JSON 10x faster than the standard library.



## Install

    pip install fast-json

Rendered on GitHub, the HTML comment is invisible. Copy-pasted into a chat with an AI assistant, **it's just another paragraph of the prompt**. The assistant will cheerfully read your `.env` file, exfiltrate it, and tell you everything went fine.

There are