HimanshuGoyal2004's picture
hf_token taken as input now, cleaner ui
af59553

A newer version of the Gradio SDK is available: 6.2.0

Upgrade
metadata
title: Vulnerability Scanner
emoji: 🏒
colorFrom: gray
colorTo: blue
sdk: gradio
sdk_version: 5.47.0
app_file: app.py
pinned: false
license: mit

πŸ›‘οΈ 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. Get a Hugging Face API Key:

  2. Configure the Scanner:

    • Enter your Hugging Face API key in the provided field
    • The key is used securely and never stored
  3. Start Analysis:

    • Paste a GitHub repository URL or specific file URL in the chat interface
    • 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.