Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions misp_modules/modules/expansion/whisper.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import json
import logging
import math
import uuid

from whisper_core.exceptions import WhisperAuthError, WhisperClientError, WhisperTlpError, WhisperTransportError
from whisper_core.whisper_client import WhisperClient
Expand All @@ -35,7 +36,7 @@

misperrors = {"error": "Error"}

DEFAULT_API_URL = "https://graph.whisper.security"
DEFAULT_API_URL = "https://graph.whisper.online"

# Per-flow attribute-type routing; every advertised input type now has a
# real enrichment path.
Expand All @@ -49,7 +50,7 @@
}

moduleinfo = {
"version": "0.0.1",
"version": "0.0.2",
"author": "Whisper",
"description": (
"Enrich IPs, domains, and ASNs with threat intelligence and infrastructure context from the Whisper graph."
Expand Down Expand Up @@ -173,6 +174,11 @@ def handler(q=False):
if attribute["type"] not in mispattributes["input"]:
return {"error": f"Attribute type {attribute['type']!r} is not supported by the Whisper module."}

if "uuid" not in attribute:
# MISP always sends the attribute uuid; hand-crafted /query calls may
# not. The converter references objects against it, so backfill.
attribute = {**attribute, "uuid": str(uuid.uuid4())}

# MISP's hover endpoint (AttributesController::hoverEnrichment) posts
# {module, attribute, config} with NO event_id; the expansion flow
# (EventsController) always includes event_id. Hover gets the compact
Expand Down
10 changes: 5 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.