Download tool.py from CyberMax-tools/cve-patch-priority-tool: direct link, hf CLI and curl.
- Browser
- Download file 899 Bytes
-
https://huggingface.co/spaces/CyberMax-tools/cve-patch-priority-tool/resolve/main/tool.py
- Command line
-
hf download hf://spaces/CyberMax-tools/cve-patch-priority-tool/tool.py
-
curl -L -o tool.py https://huggingface.co/spaces/CyberMax-tools/cve-patch-priority-tool/resolve/main/tool.py
899 Bytes
| from typing import Any, Optional | |
| from smolagents.tools import Tool | |
| import requests | |
| class CveTriageTool(Tool): | |
| name = "cve_patch_priority" | |
| description = "Kevscope by CyberMax: patch-priority verdict for up to 20 CVE IDs from CISA KEV (known exploited), FIRST EPSS exploit probability, CVSS and ransomware use, with the reasons. Free tier, no key; paid keys at https://kevscope-api.cybermax-tools.workers.dev/docs" | |
| inputs = {'cves': {'type': 'string', 'description': "Comma-separated CVE IDs, e.g. 'CVE-2024-3400,CVE-2023-4966'"}} | |
| output_type = "object" | |
| def forward(self, cves: str): | |
| import requests | |
| r = requests.get("https://kevscope-api.cybermax-tools.workers.dev/api/priority", | |
| params={"cve": cves, "via": "smolagents"}, timeout=30) | |
| return r.json() | |
| def __init__(self, *args, **kwargs): | |
| self.is_initialized = False | |