AdityaDevx's picture
Add repo scanning + better logging
dda1f70
metadata
title: Vulnerability Scanner Api
emoji: πŸ”’
colorFrom: blue
colorTo: red
sdk: docker
pinned: false
license: mit

Vulnerability Scanner API

AI-powered security vulnerability scanner for GitHub repositories and files.

Features

  • πŸ” Single file vulnerability scanning
  • πŸ“¦ Full repository scanning (up to 15 files)
  • πŸ€– Powered by Groq LLaMA 3.3 70B
  • πŸš€ Fast and accurate security analysis
  • πŸ“Š Detailed vulnerability reports with severity levels

API Endpoints

Health Check

GET /api/health

Scan GitHub File or Repository

POST /api/scan
Content-Type: application/json

{
  "url": "https://github.com/owner/repo/blob/main/file.py"
}

Or scan entire repository:

{
  "url": "https://github.com/owner/repo"
}

Environment Variables

  • GROQ_API_KEY - Required for AI analysis
  • GITHUB_TOKEN - Optional, for private repos and higher rate limits

Usage

Test the API:

curl -X POST https://adityadevx-vulnerability-scanner-api.hf.space/api/scan \
  -H "Content-Type: application/json" \
  -d '{"url": "https://github.com/owner/repo/blob/main/file.py"}'

Response Format

{
  "result": "# Security Analysis Report\n\n## Vulnerabilities Found\n..."
}

Or in case of error:

{
  "error": "Error message"
}