General
PromptBeginner5 minmarkdown
<h1 align="center">
<a href="https://prompts.chat">
5
> Security Scanner for LLM System Prompts
Sign in to like and favorite skills
Security Scanner for LLM System Prompts
Detect prompt injection, data leakage, and jailbreak vulnerabilities in your LLM system prompts before attackers do.

cd backend # Create virtual environment python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies pip install -r requirements.txt # Set up environment variables cp .env.example .env # Edit .env and add your GOOGLE_API_KEY # Run the server uvicorn main:app --reload
API will be available at
http://localhost:8000
Simply open
frontend/index.html in a browser, or serve it:
cd frontend python -m http.server 3000
Then visit
http://localhost:3000
Scan a system prompt for vulnerabilities.
Request:
{ "prompt": "Your system prompt here...", "include_llm_analysis": true, "quick_scan": false }
Response:
{ "score": 6.5, "grade": "C", "overall_risk": "MEDIUM", "summary": "Moderate security risks detected...", "vulnerabilities": [...], "recommendations": [...], "owasp_coverage": {...}, "positive_aspects": [...] }
Health check endpoint.
Get scanner statistics.
cd backend pytest tests/ -v
promptscan/ ├── backend/ │ ├── main.py # FastAPI application │ ├── report.py # Report generation │ ├── scanners/ │ │ ├── pattern_scanner.py # Regex patterns (50+) │ │ ├── structure_analyzer.py │ │ ├── attack_simulator.py # Attack vectors (30+) │ │ └── llm_analyzer.py # Gemini integration │ └── tests/ ├── frontend/ │ ├── index.html │ ├── css/style.css │ └── js/app.js └── README.md
GOOGLE_API_KEY environment variablecd frontend surge . promptscan.surge.sh # or vercel --prod
| Score | Grade | Risk Level | Meaning |
|---|---|---|---|
| 9-10 | A | Minimal | Excellent security posture |
| 8-9 | B | Low | Good with minor improvements |
| 6.5-8 | C | Medium | Moderate risks, address high severity |
| 5-6.5 | D | High | Significant issues |
| 0-5 | F | Critical | Immediate action required |
Contributions welcome! Areas of interest:
MIT
Built by Francisco Pérez Romero
Part of the "30 Days, 30 AI Projects" challenge.