Skip to content

0xSaikat/pluto-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

47 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ Pluto - AI-Powered Code Security Analyzer

logo

PyPI version License: MIT Python 3.7+ Downloads

Pluto is a powerful CLI tool that uses AI to detect security vulnerabilities in your code.

Features β€’ Installation β€’ Usage β€’ Examples β€’ Contributing


✨ What's New in v1.2.0

  • πŸ›‘οΈ Package Security Scanning - Scan packages before installation
  • πŸ“¦ Safe Installation - pluto pip install and pluto npm install
  • πŸ” AI-Powered Analysis - Detect malicious code in packages
  • ⚠️ Risk Assessment - Warning for dangerous packages
  • πŸ“Š Security Reports - Detailed vulnerability breakdown

πŸ“¦ New Commands

# Safely install Python packages
pluto pip install requests

# Safely install NPM packages
pluto npm install express

πŸš€ Features

  • πŸ€– Multiple AI Providers: Claude, OpenAI, Ollama (local)
  • πŸ“ Flexible Input: Analyze files, directories, or GitHub repositories
  • πŸ“Š Multiple Report Formats: Terminal, PDF, JSON, Markdown
  • πŸ”’ Privacy-First: Local analysis with Ollama support
  • 🎯 Severity Filtering: Focus on CRITICAL, HIGH, MEDIUM, or LOW issues
  • 🌐 Multi-Language Support: Python, JavaScript, Java, C/C++, Go, Rust, PHP, Ruby, and more
  • ⚑ Real-time Progress: Live updates showing what AI is analyzing
  • 🎨 Beautiful UI: Modern orange theme with animated elements

πŸ” Security Checks

Pluto detects:

  • πŸ’‰ SQL Injection
  • πŸ”“ XSS (Cross-Site Scripting)
  • πŸ”‘ Authentication/Authorization flaws
  • πŸ” Hardcoded secrets & credentials
  • πŸ›‘οΈ Insecure cryptography
  • πŸ“‚ Path traversal
  • ⚑ Command injection
  • πŸ”’ CSRF vulnerabilities
  • πŸ“¦ Insecure dependencies
  • And many more...

πŸ“¦ Installation

From PyPI (Recommended)

pip install pluto-ai

Upgrade to Latest Version

pip install --upgrade pluto-ai

From Source

git clone https://github.com/0xSaikat/pluto-ai.git
cd pluto-ai
pip install -e .

βš™οΈ First-Time Setup

When you run Pluto for the first time, you'll be guided through an interactive setup:

pluto

The setup wizard will help you:

  1. Choose your AI provider (Claude, OpenAI, or Ollama)
  2. Select the best model for your needs
  3. Configure API keys (if using cloud providers)
  4. Verify your installation

πŸ’» Usage

Basic Commands

# First run - interactive setup
pluto

# Analyze a single file
pluto scan -code app.py

# Analyze entire directory with progress tracking
pluto scan -dir ./src

# Analyze GitHub repository
pluto scan -git https://github.com/user/repo

# Generate PDF report
pluto scan -code app.py --report pdf --output security_audit

# Use specific provider
pluto scan -code app.py --provider ollama --model phi

# Filter by severity
pluto scan -dir ./src --min-severity HIGH

# Reset configuration
pluto --reset

Command Options

Options:
  -code, --code-file PATH           Analyze a single code file
  -dir, --directory PATH            Analyze entire directory
  -git, --git-repo TEXT             Analyze GitHub repository
  --provider [claude|openai|ollama] AI provider
  --model TEXT                      Model name
  --report [terminal|pdf|json|markdown]  Report format
  --output TEXT                     Output file name
  --min-severity [LOW|MEDIUM|HIGH|CRITICAL]  Minimum severity
  --no-progress                     Disable progress bar
  --no-banner                       Skip animated banner
  --reset                           Reset configuration
  --help                            Show help message

πŸ“š Examples

Quick Security Scan

pluto scan -code myapp.py

Full Project Audit with PDF Report

pluto scan -dir ./backend --report pdf --output project_audit

GitHub Repository Analysis

pluto scan -git https://github.com/user/vulnerable-app --report json

Local Private Scan (No API Required)

pluto scan -code sensitive_code.py --provider ollama --model phi

CI/CD Integration

pluto scan -dir ./src --report json --output results.json --min-severity HIGH --no-banner --no-progress

Multiple Files Analysis

pluto scan -dir ./app --min-severity CRITICAL --report markdown --output critical_issues

πŸ“Š Report Formats

  • Terminal: Colorful real-time output with severity highlighting and progress tracking
  • PDF: Professional report with logo, charts, severity breakdown, and detailed findings
  • JSON: Machine-readable format perfect for automation and CI/CD pipelines
  • Markdown: Documentation-friendly format for GitHub issues and wikis

🎨 Supported Languages

Python β€’ JavaScript β€’ TypeScript β€’ Java β€’ C/C++ β€’ Go β€’ Rust β€’ PHP β€’ Ruby β€’ Swift β€’ Kotlin

πŸ€– AI Providers

Claude (Anthropic) - Recommended

# Get API key from: https://console.anthropic.com/
export ANTHROPIC_API_KEY='sk-ant-...'
pluto scan -code app.py --provider claude

OpenAI

# Get API key from: https://platform.openai.com/api-keys
export OPENAI_API_KEY='sk-...'
pluto scan -code app.py --provider openai

Ollama (Local & Free)

# Install from: https://ollama.ai
ollama pull phi
ollama serve
pluto scan -code app.py --provider ollama --model phi

🎯 Advanced Features

Real-time Progress Tracking

See exactly what AI is analyzing:

β ‹ app.py [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘] 45% (00:03)
└─ Checking for SQL injection...

Smart Error Handling

Helpful error messages guide you through fixing issues:

⚠️  ERROR: Authentication Failed
Your API key is invalid or expired.

To fix this:
  1. Get a new API key from: https://console.anthropic.com/
  2. Run: pluto --reset
  3. Or set: export ANTHROPIC_API_KEY='your-new-key'

Interactive Setup

Beautiful wizard guides you through configuration:

Step 1: Select AI Provider
  πŸ€– [1] Claude (Anthropic) - Best quality
  🧠 [2] OpenAI (GPT) - High quality  
  🏠 [3] Ollama (Local) - Free & private

πŸ”§ Configuration File

Pluto saves your preferences at ~/.pluto/config.json:

{
  "provider": "claude",
  "model": "claude-sonnet-4-20250514",
  "api_key": "sk-ant-...",
  "setup_complete": true
}

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ Changelog

See CHANGELOG.md for a list of changes.

πŸ‘¨β€πŸ’» Author

0xSaikat

πŸŽ–οΈ Acknowledgments

  • Powered by Claude (Anthropic), OpenAI, and Ollama
  • Built with ❀️ for the security community
  • Special thanks to all contributors and users

⚠️ Disclaimer

Pluto is a security analysis tool intended for educational and legitimate security testing purposes only. Always ensure you have permission before scanning code or repositories you don't own.

πŸ“„ License

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


By the Hackers for the Hackers!

GitHub Twitter Web

⭐ Star us on GitHub β€” it helps!