Skip to content

PremLabs-Security/llm-security-scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLM Security Scanner

Python License Stars Issues

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.

Table of Contents

Features

  • 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.

Installation

To get started with the LLM Security Scanner, follow these steps:

  1. Clone the repository:

    git clone https://github.com/Prem2868/llm-security-scanner.git
    cd llm-security-scanner
  2. Create a virtual environment (recommended):

    python3 -m venv venv
    source venv/bin/activate
  3. Install dependencies:

    pip install -r requirements.txt

Usage

Single Prompt Scan

To scan a single prompt directly from the command line:

python main.py scan "Your LLM prompt here"

Batch Scan from File

To scan multiple prompts from a text file (one prompt per line):

python main.py batch-scan prompts.txt

Generating Reports

(Details on report generation will be added here.)

Screenshots

(Screenshots demonstrating the CLI tool and report output will be added here.)

Contributing

We welcome contributions! Please see the CONTRIBUTING.md file for guidelines on how to contribute to this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

  • Pramod Jogdand
  • GitHub: Prem2868
  • Organization: PremLabs-Security

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages