Skip to content

OpenHands/cve-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CVE Scanning and Remediation System

Automated CVE scanning with AI-powered parallel remediation agents.

Features

  • Trivy CVE Scanning: Scans repositories for known vulnerabilities
  • Parallel AI Agents: Multiple agents fix vulnerabilities simultaneously
  • Real-time Status: Shows actual agent actions ("Editing file package.json", "Running: npm install")
  • Auto Pull Requests: Creates PRs for each vulnerability fix
  • GitHub Integration: Works with public and private repositories

Quick Start

  1. Install dependencies:
pip install -r requirements.txt
  1. Set API key:
export LLM_API_KEY="your-anthropic-api-key"
export GITHUB_TOKEN="your-github-token"  # optional
  1. Run scan and fix:
python cve_scan.py https://github.com/owner/repo.git

Configuration

  • LLM_API_KEY: Anthropic API key (required)
  • GITHUB_TOKEN: GitHub token for private repos/PRs (optional)
  • MAX_PARALLEL_AGENTS: Parallel agents (default: 3)
  • STATUS_UPDATE_INTERVAL: Update frequency in seconds (default: 5)

How It Works

  1. Scan: Trivy scans repository → vulnerabilities.json
  2. Fix: AI agents work in parallel to fix each vulnerability
  3. PR: Each agent creates a pull request with the fix

Example Output

🔍 PHASE 1: CVE SCANNING
✅ Found 3 vulnerabilities in 8.2s

🔧 PHASE 2: REMEDIATION  
🤖 Agent-1 (CVE-2023-1234): Editing file package.json
🤖 Agent-2 (CVE-2023-5678): Running: npm audit fix
🤖 Agent-3 (CVE-2023-9012): Creating security patch

✅ All agents completed: 3 PRs created

Requirements

  • Python 3.8+
  • Docker (for Trivy)
  • Anthropic API key

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages