You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Install from PyPI
pip install cvefinder-io
# Or install from source
git clone https://github.com/CVEFinder/cli.git
cd cli
pip install -e .
Configuration
Basic Setup
# Interactive configuration
cvefinder configure
# Enter your API key when prompted# Or set directly
cvefinder configure --api-key YOUR_API_KEY_HERE
Environment Variables
# Set API key via environmentexport CVEFINDER_API_KEY="your-api-key-here"# Now you can use CLI without configure
cvefinder scan run https://example.com
Configuration Notes
# Show current configured API key
cvefinder configure --show
Scanning Websites
Basic Scan
# Scan a website
cvefinder scan run https://example.com
# Output shows:# - URL and domain# - Total CVEs found# - Severity breakdown (Critical, High, Medium, Low)# - Top CVEs with details# - Detected technologies
Save Results
# Save as JSON
cvefinder scan run https://example.com --output results.json
# Save as CSV (for Excel/Sheets)
cvefinder scan run https://example.com --format csv --output results.csv
# Compact text output
cvefinder scan run https://example.com --format compact
Filter by Severity
# Only show critical CVEs
cvefinder scan run https://example.com --severity critical
# Show critical and high
cvefinder scan run https://example.com --severity critical,high
Listing Recent Scans
# Show 10 most recent scans in table format
cvefinder scan list
# Show up to 10 scans in JSON
cvefinder scan list --limit 10 --format json
# Fetch page 3
cvefinder scan list --limit 10 --page 3
Account Details and Daily Usage
# Show account details as table
cvefinder account
# Compact output for scripts
cvefinder account --format compact
# Full JSON payload
cvefinder account --format json
Search CVEs, Products, and Vendors
# Basic search
cvefinder search wordpress
# Search with filters
cvefinder search openssl \
--severity critical,high \
--published-year 2024 \
--sort-by cvss_score \
--sort-order desc
# Use independent pagination per result type
cvefinder search apache --page-cves 2 --page-products 1 --page-vendors 1
# JSON output for automation
cvefinder search nginx --format json --output search-results.json
Exploits By CVE
# Get exploit data for a CVE
cvefinder exploit CVE-2021-24176
# Compact mode
cvefinder exploit cve-2021-24176 --format compact
# Full JSON output
cvefinder exploit CVE-2021-24176 --format json
Monitoring Scans (Pro)
# Add monitoring and choose scan interactively
cvefinder monitor add
# In the interactive menu:# - type n / p for next/previous page of your scans# - type fn / fp for next/previous page of public scans# - type q to cancel# Add monitoring for a specific scan ID
cvefinder monitor add --scan-id 123
# List monitored scans
cvefinder monitor list
# Check monitoring status for one scan
cvefinder monitor check --scan-id 123
# Enable/disable existing monitored scans
cvefinder monitor enable --scan-id 123
cvefinder monitor disable --scan-id 123
Getting Scan Results
# Get scan by ID
cvefinder scan get abc123def456
# Save to file
cvefinder scan get abc123def456 --output scan.json
# Different formats
cvefinder scan get abc123def456 --format table
cvefinder scan get abc123def456 --format csv
cvefinder scan get abc123def456 --format json
# Dependency analysis is included by default:# - summary counts# - vulnerable packages# - internal packages
cvefinder scan get abc123def456 --format table
# Show all remaining packages too
cvefinder scan get abc123def456 --full
Dependency Analysis Details
# Compact summary includes dependency counts
cvefinder scan get abc123def456 --format compact
# Table output shows:# - total packages# - vulnerable packages# - internal packages# - vulnerable/internal package tables
cvefinder scan get abc123def456 --format table
# Add --full to include remaining packages table too
cvefinder scan get abc123def456 --full
Bulk Scan (Pro)
# Start bulk scan with repeated --url
cvefinder bulk scan --url https://example.com --url https://api.example.com
# Start from file (one URL per line)
cvefinder bulk scan --input-file urls.txt
# Start and wait for completion
cvefinder bulk scan --input-file urls.txt --wait
# Get bulk scan status
cvefinder bulk get 123
# List recent bulk scans
cvefinder bulk list
#!/bin/bash# scan-urls.sh - Scan multiple websites
URLS=(
"https://example.com""https://api.example.com""https://admin.example.com"
)
forurlin"${URLS[@]}";doecho"========================================"echo"Scanning: $url"echo"========================================"
cvefinder scan run "$url" --format table
# Save JSON results
filename=$(echo "$url"| sed 's|https://||'| sed 's|/|_|g')
cvefinder scan run "$url" --format json >"scan_${filename}.json"doneecho"All scans complete!"
Check for New CVEs
#!/bin/bash# check-new-cves.sh - Alert on new CVEs
SCAN_URL="https://example.com"
PREV_SCAN="previous-scan.json"
CURR_SCAN="current-scan.json"# Run new scan
cvefinder scan run "$SCAN_URL" --format json >"$CURR_SCAN"# Compare with previous scanif [ -f"$PREV_SCAN" ];then
PREV_COUNT=$(jq '.total_cves'"$PREV_SCAN")
CURR_COUNT=$(jq '.total_cves'"$CURR_SCAN")if [ "$CURR_COUNT"-gt"$PREV_COUNT" ];then
NEW_CVES=$((CURR_COUNT - PREV_COUNT))echo"⚠️ ALERT: $NEW_CVES new CVEs detected!"# Send notification (example with Slack)
curl -X POST YOUR_SLACK_WEBHOOK \
-d "{\"text\": \"🚨 $NEW_CVES new CVEs found on $SCAN_URL\"}"fifi# Save as previous for next run
cp "$CURR_SCAN""$PREV_SCAN"
Export to CSV for Reporting
#!/bin/bash# export-report.sh - Generate CSV report
DATE=$(date +%Y-%m-%d)
OUTPUT="cve-report-${DATE}.csv"
cvefinder scan run https://example.com --format csv >"$OUTPUT"echo"Report generated: $OUTPUT"# Optional: Email the report# mail -s "CVE Report - $DATE" -a "$OUTPUT" security@example.com < /dev/null
Advanced Usage
Verbose Debugging
# Enable verbose output for troubleshooting
cvefinder --verbose scan https://example.com
Quiet Mode
# Only show errors (useful for scripts)
cvefinder --quiet scan run https://example.com
Combine Options
# Scan with all options
cvefinder --verbose \
scan run https://example.com \
--format json \
--output results.json \
--severity critical,high
Tips & Best Practices
1. Secure Your API Key
# Never commit API keys to git# Use environment variables or CI/CD secrets# Goodexport CVEFINDER_API_KEY="your-key"# Bad
cvefinder --api-key your-key-here # visible in shell history!
2. Automate Regular Scans
# Add to crontab for daily scans
0 0 *** /usr/local/bin/cvefinder scan run https://example.com --format json > /var/log/cvefinder-scan.json
3. Monitor Critical Changes
# Set up alerts for critical severity
CRITICAL=$(cvefinder scan run https://example.com --format json | jq '.severity_counts.critical')if [ "$CRITICAL"-gt 0 ];then# Send alert (email, Slack, PagerDuty, etc.)echo"Critical CVEs detected!"| mail -s "Security Alert" team@example.com
fi
4. Version Control Your Scans
# Track scan results over time
cvefinder scan run https://example.com --format json >"scans/$(date +%Y-%m-%d).json"
git add scans/
git commit -m "Daily CVE scan"
Troubleshooting
Authentication Errors
# Verify API key is configured
cvefinder configure --show
# Test with explicit key
cvefinder --api-key YOUR_KEY scan https://example.com
Rate Limiting
# If you hit rate limits, spread out scansforurlin"${URLS[@]}";do
cvefinder scan run "$url"
sleep 60 # Wait 1 minute between scansdone
Connection Issues
# Check API connectivity
curl -H "Authorization: Bearer YOUR_KEY" https://cvefinder.io/api/account-data
# Use verbose mode to debug
cvefinder --verbose scan https://example.com
Getting Help
# Show main help
cvefinder --help
# Show command-specific help
cvefinder scan --help
cvefinder api-keys --help
cvefinder configure --help