Skip to main content
Glama
verify_data.py1.25 kB
#!/usr/bin/env python3 """Verify CVE data was loaded correctly.""" import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).parent.parent / "src")) from database.db import init_db, get_cve, search_cves, get_stats def verify(): conn = init_db() print("\n=== Database Verification ===\n") # Get stats stats = get_stats(conn) print(f"Total CVEs loaded: {stats['total_cves']}") print(f"Date range: {stats['oldest_cve']} to {stats['newest_cve']}") print(f"Last update: {stats['last_update']}") # Show sample CVE print("\n--- Sample CVE ---") sample = search_cves(conn, "", limit=1) # Get any CVE if sample: cve = sample[0] print(f"ID: {cve['cve_id']}") print(f"Severity: {cve['severity']}") print(f"CVSS: {cve['cvss_score']}") print(f"Description: {cve['description'][:200]}...") # Test search print("\n--- Search Test ---") results = search_cves(conn, "remote", limit=5) print(f"Search for 'remote': {len(results)} results") for r in results: print(f" - {r['cve_id']}: {r['description'][:60]}...") conn.close() print("\n✅ Verification complete!") if __name__ == "__main__": verify()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/davidculver/cve-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server