The /api/vuln-intel/threat-feeds correlation route had two defects reported in #261:
-
Dead exploit-availability boost (key-name mismatch).
CVEIntelligenceManager.search_existing_exploits()returns the count asexploits_found, but the correlation route readtotal_exploits— a key that is never set anywhere inhexstrike_server.py. The check was therefore always false: theexploit_availabilitycorrelation entry never appeared and the +25 threat-score boost never fired, even for CVEs with many known public exploits. The route now readsexploits_found, the producer's actual (and publicly returned) key. -
Simulated IP/hash results were indistinguishable from real ones. IP-reputation and file-hash correlation entries are hardcoded placeholders, yet the response gave them a
MEDIUMthreat level with nothing marking them as simulated — downstream agents can read the fallback as real intelligence. Both entries now carry"simulated": true.
Evidence (repo has no test suite; verified with a harness that drives the real Flask route via its test client, stubbing only the two network-backed CVE methods with the producer's exact return shapes):
- Before: indicators
[CVE-2024-0001, 203.0.113.7, <sha256>]with the exploit search reportingexploits_found=3→ correlation types[cve, ip_reputation, file_hash], noexploit_availabilityentry,threat_score13.33, nosimulatedmarker on the IP/hash entries. - After: correlation types
[cve, exploit_availability, ip_reputation, file_hash],exploit_availability.exploits_found= 3,threat_score21.67 ((40 + 25) / 3), both placeholder entries carry"simulated": true. python -m py_compile hexstrike_server.pypasses;grep total_exploitsreturns nothing after the change.
Fixes #261.