fetchAllSources. The combined output is included verbatim in the prompt as toolResult.
Provider overview
VirusTotal
Multi-engine file, URL, domain, and IP scanner. Covers all three IoC types: IP addresses, domains, and hashes. Requires an API key.
AbuseIPDB
Community-driven IP reputation database focused on abuse reports. Covers IP addresses only. Requires an API key.
PolySwarm
Decentralized threat intelligence marketplace specializing in malware analysis. Covers file hashes only (MD5, SHA-1, SHA-256). Requires an API key.
Robtex
DNS and network intelligence service providing domain reputation and ranking data. Covers domains only. No API key required — uses the public free API.
Source-to-IoC mapping
The analysis function for each IoC type hardcodes which sources are queried. You cannot add or remove sources per request.| IoC type | VirusTotal | AbuseIPDB | PolySwarm | Robtex |
|---|---|---|---|---|
IP (IPv4/IPv6) | ✓ | ✓ | ||
domain | ✓ | ✓ | ||
hash/* | ✓ | ✓ |
Robtex fetches both domain reputation (
/api/v1/domain_reputation) and domain ranking (/api/v1/domain_ranking) in a single call using Promise.allSettled. If one of the two endpoints fails, the other result is still used.API keys
VirusTotal, AbuseIPDB, and PolySwarm require API keys. You can supply your own keys per request via request headers, or configure server-side environment variables as defaults.| Provider | Request header | Environment variable |
|---|---|---|
| VirusTotal | X-VT-Key | VIRUSTOTAL_API_KEY |
| AbuseIPDB | X-AbuseIPDB-Key | ABUSEIPDB_API_KEY |
| PolySwarm | X-Polyswarm-Key | POLYSWARM_API_KEY |
Graceful degradation
Source failures do not abort the analysis.fetchAllSources runs all source fetches with Promise.allSettled. If a source throws, the error is caught and converted to a SourceWarning instead of propagating.
IocAnalysisResult and forwarded to the AI prompt as a note, so the model is aware that some data may be missing. They are also surfaced to the client in the meta SSE event.
What triggers a SourceWarning?
What triggers a SourceWarning?
Any exception thrown by a source fetch function is caught and classified. Common reasons include:
invalid_api_key— the key was rejected (HTTP 401 or 403)api_unavailable— the upstream service returned a 5xx errornot_found— the IoC does not exist in that provider’s dataset (e.g., PolySwarm returns HTTP 204 for unknown hashes)unknown— any other unexpected error
What if all sources fail?
What if all sources fail?
If every source returns
null (i.e., allSourcesEmpty returns true), the server skips the AI call and streams a meta event followed immediately by a done event. No verdict is generated because there is no data to reason about.