Remove severity and quality scoring, classifier is extraction-only

This commit is contained in:
bot
2026-04-29 09:15:53 +03:00
parent 481a3634a0
commit 47d8394568
4 changed files with 56 additions and 391 deletions
-25
View File
@@ -487,31 +487,6 @@ class RSSFeedManager:
return message, article.get('thumbnail')
@staticmethod
def build_why_this_matters(article: Dict) -> str:
"""Generate a concise operator-grade impact sentence."""
reasons = []
severity = str(article.get("severity", "")).lower()
cves = article.get("cves", []) or []
actors = article.get("threat_actors", []) or []
classes = set(article.get("classifications", []) or [])
quality = int(article.get("quality_score", 0) or 0)
if severity in {"critical", "high"}:
reasons.append(f"{severity.upper()} severity")
if cves:
reasons.append(f"references {len(cves)} CVE(s)")
if actors:
reasons.append("mentions known threat actors")
if "poc" in classes:
reasons.append("exploit/PoC indicators present")
if "advisory" in classes:
reasons.append("actionable advisory/patch context")
if not reasons and quality >= 70:
reasons.append("high-signal technical reporting")
return "; ".join(reasons[:3])
# Example usage for testing
async def main():
async with RSSFeedManager() as rss_manager: