CoolFace
Apppublic

HimanshuGoyal2004/Vulnerability-Scanner

sourceHugging Facemitupdated 11mo agoView on Hugging Face
3likes
App README

๐Ÿ›ก๏ธ AI-Powered GitHub Vulnerability Scanner

An advanced security analysis tool that leverages cutting-edge AI agents and Model Context Protocol (MCP) tools to perform comprehensive security analysis of GitHub repositories and individual files. This intelligent scanner provides detailed vulnerability assessments with actionable remediation guidance.

โœจ Key Features

  • โ€”๐Ÿค– AI-Powered Detection: Uses advanced language models to understand code context and identify complex security issues
  • โ€”๏ฟฝ Dumal Analysis Mode: Analyze entire repositories or focus on specific files
  • โ€”๏ฟฝ Deeap Code Analysis: Scans for common security vulnerabilities including SQL injection, XSS, command injection, and more
  • โ€”๐Ÿ“Š Comprehensive Reports: Generates detailed security reports with severity levels, line numbers, and remediation suggestions
  • โ€”๐ŸŒ Modern Web Interface: Enhanced Gradio interface with improved user experience
  • โ€”๐Ÿ”‘ Secure API Integration: User-provided Hugging Face tokens for secure AI model access
  • โ€”๐Ÿ”— GitHub Integration: Direct integration with GitHub repositories via MCP tools

๐ŸŽฏ Vulnerability Detection Capabilities

The scanner identifies various security vulnerabilities including:

  • โ€”Command Injection - OS command execution flaws (os.system, exec, eval)
  • โ€”Input Validation Issues - Unvalidated user inputs and missing parameter checks
  • โ€”Error Handling Flaws - Unhandled exceptions and information disclosure
  • โ€”Hardcoded Secrets - API keys, passwords, database credentials
  • โ€”Unsafe Operations - File operations and deserialization without validation
  • โ€”SQL Injection - Database query vulnerabilities
  • โ€”Cross-Site Scripting (XSS) - Web application security issues
  • โ€”Path Traversal - File system access vulnerabilities

๐Ÿš€ Getting Started

Prerequisites

  • โ€”Python 3.11+
  • โ€”Hugging Face API Token (free account required)

Usage

  1. 1.Get a Hugging Face API Key:
  2. 2.Visit Hugging Face Settings
  3. 3.Create a free account if needed
  4. 4.Generate a new API token
  1. 1.Configure the Scanner:
  2. 2.Enter your Hugging Face API key in the provided field
  3. 3.The key is used securely and never stored
  1. 1.Start Analysis:
  2. 2.Paste a GitHub repository URL or specific file URL in the chat interface
  3. 3.Wait for the AI agent to analyze and generate a security report

๐Ÿ› ๏ธ Technical Architecture

  • โ€”Frontend: Enhanced Gradio web interface with modern theming
  • โ€”AI Engine: Hugging Face Inference API with smolagents framework
  • โ€”GitHub Integration: Custom MCP server for GitHub API access
  • โ€”URL Parsing: Smart GitHub URL parser supporting both repositories and individual files
  • โ€”Analysis Engine: Context-aware vulnerability detection with line-by-line analysis
  • โ€”Report Generation: Structured security assessment with severity classification

๐Ÿ“‹ Dependencies

  • โ€”gradio[oauth,mcp] - Web interface framework with MCP support
  • โ€”smolagents - AI agent framework for intelligent code analysis
  • โ€”requests - HTTP client library
  • โ€”fastapi & uvicorn - API framework and server
  • โ€”mcp - Model Context Protocol client
  • โ€”pydantic - Data validation

๐Ÿ”’ Security & Privacy

  • โ€”API Key Security: Your Hugging Face tokens are used securely and never stored
  • โ€”Public Repository Access: Analyzes only publicly accessible GitHub repositories
  • โ€”Responsible Use: Designed for legitimate security research and vulnerability assessment
  • โ€”No Data Storage: Analysis results are not stored or logged

โš ๏ธ Important Disclaimer

This tool is designed for legitimate security research and vulnerability assessment purposes only.

Do NOT use this scanner for:

  • โ€”Malicious activities
  • โ€”Unauthorized access attempts
  • โ€”Any illegal purposes
  • โ€”Scanning repositories without proper authorization

Always ensure you have proper authorization before scanning repositories that don't belong to you. The results should be used as a starting point for security analysis, not as a definitive security assessment.