fix(intel-scan): remove duplicate _entry_matches + replace dead NVD feed
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled

1. Duplicate function definition: the old 2-param _entry_matches shadowed
   the new 3-param version — Python uses the last definition, so the call
   with 3 args threw TypeError. Removed the stale old definition.

2. NIST NVD deprecated their XML RSS feeds in 2023 — URL returns 404.
   Replaced with SecurityWeek RSS which is active and covers CVEs/threats.
This commit is contained in:
kitos
2026-05-29 16:58:07 +02:00
parent 65c34c3374
commit b98a539d93

View File

@@ -33,8 +33,8 @@ RSS_FEEDS: list[dict[str, str]] = [
"url": "https://www.cisa.gov/cybersecurity-advisories/all.xml", "url": "https://www.cisa.gov/cybersecurity-advisories/all.xml",
}, },
{ {
"name": "NIST NVD CVE", "name": "SecurityWeek",
"url": "https://nvd.nist.gov/feeds/xml/cve/misc/nvd-rss.xml", "url": "https://feeds.feedburner.com/Securityweek",
}, },
{ {
"name": "SANS ISC", "name": "SANS ISC",
@@ -151,12 +151,6 @@ def _entry_matches(
return any(p.search(text) for p in id_patterns + name_patterns) return any(p.search(text) for p in id_patterns + name_patterns)
def _entry_matches(entry: dict[str, str], patterns: list[re.Pattern]) -> bool:
"""Return True if any pattern matches the entry's title or description."""
text = f"{entry.get('title', '')} {entry.get('description', '')}"
return any(p.search(text) for p in patterns)
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Public API # Public API
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------