Delete scripts/tools_mcp.py
Browse files- scripts/tools_mcp.py +0 -44
scripts/tools_mcp.py
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
"""MCP tools for vulnerability search and report generation."""
|
2 |
-
|
3 |
-
from smolagents import Tool
|
4 |
-
import json
|
5 |
-
import os
|
6 |
-
from datetime import datetime
|
7 |
-
from gradio_mcp import tool
|
8 |
-
from scripts.cvedb_tool import CVEDBTool
|
9 |
-
from scripts.nvd_tool import NvdTool
|
10 |
-
from scripts.kevin_tool import KevinTool
|
11 |
-
from scripts.epss_tool import EpsTool
|
12 |
-
from scripts.report_generator import ReportGeneratorTool
|
13 |
-
|
14 |
-
# Instancias de las herramientas existentes
|
15 |
-
cvedb_tool = CVEDBTool()
|
16 |
-
nvd_tool = NvdTool()
|
17 |
-
kevin_tool = KevinTool()
|
18 |
-
epss_tool = EpsTool()
|
19 |
-
report_tool = ReportGeneratorTool()
|
20 |
-
|
21 |
-
@tool
|
22 |
-
def search_cvedb(search_type: str, identifier: str) -> str:
|
23 |
-
"""Search for vulnerabilities in CVEDB by CVE or product."""
|
24 |
-
return cvedb_tool.forward(search_type, identifier)
|
25 |
-
|
26 |
-
@tool
|
27 |
-
def search_nvd(search_type: str, identifier: str, exact_match: bool = False) -> str:
|
28 |
-
"""Search for vulnerabilities in NVD by CVE or keyword."""
|
29 |
-
return nvd_tool.forward(search_type, identifier, exact_match)
|
30 |
-
|
31 |
-
@tool
|
32 |
-
def search_kevin(search_type: str, identifier: str) -> str:
|
33 |
-
"""Search for known exploited vulnerabilities (KEV) by CVE or keyword."""
|
34 |
-
return kevin_tool.forward(search_type, identifier)
|
35 |
-
|
36 |
-
@tool
|
37 |
-
def search_epss(cve_id: str, date: str) -> str:
|
38 |
-
"""Search for EPSS score for a specific CVE."""
|
39 |
-
return epss_tool.forward(cve_id, date)
|
40 |
-
|
41 |
-
@tool
|
42 |
-
def generate_vulnerability_report(vulnerability_data: str, report_type: str) -> str:
|
43 |
-
"""Generate an interactive HTML vulnerability report from JSON data."""
|
44 |
-
return report_tool.forward(vulnerability_data, report_type)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|