A Python-based Command Line Interface (CLI) tool designed to scan Large Language Model (LLM) prompts for potential security vulnerabilities, including jailbreaks, prompt injections, and other unsafe behaviors.
- Detect Prompt Injection Attacks: Identifies attempts to manipulate LLM behavior through malicious input.
- Detect Jailbreak Attempts: Recognizes prompts designed to bypass LLM safety guidelines and restrictions.
- Risk Scoring: Assigns a risk level (Low, Medium, High, Critical) to scanned prompts.
- HTML + JSON Report Export: Generates comprehensive scan reports in both HTML and JSON formats.
- Batch Scanning Support: Allows scanning multiple prompts from a file for efficient analysis.
- Color-coded Terminal Output: Provides clear and intuitive feedback directly in the command line.
To get started with the LLM Security Scanner, follow these steps:
-
Clone the repository:
git clone https://github.com/Prem2868/llm-security-scanner.git cd llm-security-scanner -
Create a virtual environment (recommended):
python3 -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
To scan a single prompt directly from the command line:
python main.py scan "Your LLM prompt here"To scan multiple prompts from a text file (one prompt per line):
python main.py batch-scan prompts.txt(Details on report generation will be added here.)
(Screenshots demonstrating the CLI tool and report output will be added here.)
We welcome contributions! Please see the CONTRIBUTING.md file for guidelines on how to contribute to this project.
This project is licensed under the MIT License - see the LICENSE file for details.
- Pramod Jogdand
- GitHub: Prem2868
- Organization: PremLabs-Security