From b98a539d931ca9cfea27a45bb0d1fb547736384f Mon Sep 17 00:00:00 2001 From: kitos Date: Fri, 29 May 2026 16:58:07 +0200 Subject: [PATCH] fix(intel-scan): remove duplicate _entry_matches + replace dead NVD feed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- backend/app/services/intel_service.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/backend/app/services/intel_service.py b/backend/app/services/intel_service.py index 5ff6323..c75b36d 100644 --- a/backend/app/services/intel_service.py +++ b/backend/app/services/intel_service.py @@ -33,8 +33,8 @@ RSS_FEEDS: list[dict[str, str]] = [ "url": "https://www.cisa.gov/cybersecurity-advisories/all.xml", }, { - "name": "NIST NVD CVE", - "url": "https://nvd.nist.gov/feeds/xml/cve/misc/nvd-rss.xml", + "name": "SecurityWeek", + "url": "https://feeds.feedburner.com/Securityweek", }, { "name": "SANS ISC", @@ -151,12 +151,6 @@ def _entry_matches( 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 # ---------------------------------------------------------------------------