Skip to main content

MISP Threat Intelligence ExecModule

Overview

MispModule connects ValkyrAI workflows to a MISP threat-intelligence platform through the native map I/O ExecModule ABI. It implements the highest-value event, attribute, search, publication, and event-tag actions from n8n's MISP node while enforcing ValkyrAI's IntegrationAccount, validation, retry, redaction, and metadata contracts.

The module provides 14 operations. Read-only event/attribute retrieval and restSearch calls retry bounded transient failures. Creates, updates, publication changes, tag changes, and deletes are single-attempt because a lost response can leave provider state ambiguous. Event publication and unpublication require an explicit acknowledgement. Irreversible attribute deletion requires a separate destructive acknowledgement.

Usage

  1. Operate a supported MISP 2.4 or 2.5 instance behind trusted public HTTPS.
  2. Create a dedicated MISP automation user with only the roles and organization access required by the workflow.
  3. Generate an automation key from MISP's Automation surface.
  4. Store the key in encrypted IntegrationAccount.apiKey and the public MISP origin in IntegrationAccount.accountId.
  5. Set the account to READY and bind it through ExecModuleConfig.authConfig.integrationAccount.
  6. Choose one documented operation and provide only its typed identifiers, allowlisted record, search filters, and bounds.
  7. Require human or policy approval before publication changes or irreversible deletion.

Workflow input cannot supply the automation key, authorization header, arbitrary path or method, TLS verification bypass, private-network target, or unbounded provider body.

Inputs

NameTypeRequirementDefaultDescription and constraints
operationstringRequiredNoneOne of the 14 documented operations.
baseUrlstringRequired unless the account supplies itIntegrationAccount.accountIdPublic HTTPS MISP origin, optionally with a bounded path. Credentials, custom ports, query strings, fragments, localhost, IP literals, and untrusted TLS are rejected.
resourceIdstringGet/update/publish/deleteNoneNumeric MISP ID or UUID with a path-safe bounded format.
eventIdstringAttribute create and event-tag operationsNoneNumeric event ID or UUID.
tagIdstringEvent-tag operationsNonePositive numeric tag ID.
recordobjectCreate/updateNoneNon-empty event/attribute allowlist; at most 32 properties and 512 KiB. Credential-like fields are rejected.
filtersobjectSearch; optional for list_events{}Up to 32 allowlisted restSearch fields with bounded scalar or scalar-array values.
pageintegerSearch1First provider page, 1–100,000.
limitintegerSearch100Maximum aggregate result count, 1–10,000. Provider requests use pages of at most 100.
returnAllbooleanSearchfalseFollow provider pages until exhaustion or the aggregate result cap.
confirmPublicationbooleanPublish/unpublishfalseMust be true for either publication-state operation.
confirmDestructivebooleanAttribute deletefalseMust be true for irreversible deletion.
timeoutMsintegerOptional30000Total/connect/read/write timeout, 100–300,000 ms.

Event records allow info, date, threat level, analysis state, distribution, sharing group, publication state, correlation control, and extension UUID. Attribute records allow type, category, value, IDS eligibility, distribution, sharing group, comment, correlation control, and first/last-seen timestamps. Distribution 4 requires a positive sharing-group ID.

Search filters cover common MISP event and attribute selectors such as value, type, category, organization, tags, event ID/info, time windows, publication state, distribution, and context flags. The module fixes returnFormat to JSON and owns page/limit values.

Outputs

NameTypeWhen presentDescription
statusstringAlwayssuccess or error.
operationstringAlwaysNormalized operation name.
resourcestringValid operationevent, attribute, or event_tag.
data / idobject / stringSingle-resource successNormalized provider result and verified identifier when present.
items / countarray / integerSearch successUnwrapped bounded MISP resources and emitted count.
hasMore / nextPageboolean / integerSearch successWhether another provider page may exist and its page number.
httpStatusintegerSingle-resource successMISP HTTP status.
attemptsintegerAlwaysTotal provider attempts, including search pages.
errorobjectFailureSafe {code, message, retryable} details.

Automation keys, authorization values, and credential-bearing provider text are redacted from errors and outputs.

IntegrationAccount Requirements

SettingRequirement
ProviderMISP REST API
accountNameHuman-readable threat-intelligence automation identity
accountIdPublic HTTPS MISP origin, for example https://misp.example.com
apiKeyEncrypted dedicated MISP automation key; password is accepted only as a legacy secure-field fallback
statusREADY; every other status fails closed
PermissionsMinimum event/attribute read, write, publish, and tag permissions required by selected operations

Use a dedicated non-admin automation user when possible. MISP distribution and sharing-group controls govern which organizations may receive an event or attribute; do not use a broadly privileged key to compensate for a poorly scoped workflow.

Configuration

{
"version": "1.0.0",
"authConfig": {
"authStrategy": 1,
"integrationAccount": "integration-account:misp-threat-intel"
},
"retryPolicy": {
"maxAttempts": 3,
"backoffStrategy": "EXPONENTIAL",
"initialDelayMs": 1000,
"maxDelayMs": 5000,
"jitter": false
},
"executionConfig": {"timeoutMs": 30000},
"payloadConfig": {
"parameters": "{\"operation\":\"search_attributes\",\"limit\":100,\"filters\":{\"tags\":[\"tlp:amber\"],\"last\":\"24h\"}}"
}
}

The integration-account reference is symbolic. Persisted workflows use the generated relationship, never embedded credentials.

Operations

OperationMISP behaviorSide effect
create_eventCreates an event from bounded intelligence, analysis, and distribution fields.Event write; single attempt.
get_eventReads one event by numeric ID or UUID and unwraps Event.Read-only; safe retries.
list_eventsUses JSON events/restSearch with owned page/limit controls and no required filter.Read-only; paginated safe retries.
search_eventsSearches events by allowlisted value, tag, organization, time, publication, and distribution selectors.Read-only; paginated safe retries.
update_eventUpdates allowlisted event fields and verifies the returned ID or UUID.Event write; single attempt.
publish_eventPublishes an event after explicit acknowledgement.Outbound publication; single attempt.
unpublish_eventRemoves an event's published state after explicit acknowledgement.Publication-state write; single attempt.
add_attributeAdds a bounded attribute/indicator to an event.Indicator write; single attempt.
get_attributeReads one attribute by numeric ID or UUID and unwraps Attribute.Read-only; safe retries.
search_attributesSearches attributes by value, type, category, tags, event, time, IDS, and distribution selectors.Read-only; paginated safe retries.
update_attributeUpdates allowlisted attribute fields and verifies the returned ID or UUID.Indicator write; single attempt.
delete_attributeIrreversibly deletes one attribute after explicit destructive acknowledgement.Destructive write; single attempt.
add_event_tagAdds one existing numeric tag ID to an event.Classification write; single attempt.
remove_event_tagRemoves one existing numeric tag ID from an event.Reversible classification write; single attempt.

Errors and Failure Modes

CodeTypical causeRetryableResolution
VALIDATION_ERRORInvalid origin, account, ID, payload, distribution, filter, bound, or acknowledgement.NoCorrect the named field; validation failures send no request.
UNSUPPORTED_OPERATIONUnknown operation.NoSelect a documented operation.
INTEGRATION_ACCOUNT_REQUIREDNo bound account.NoBind a MISP IntegrationAccount.
INTEGRATION_ACCOUNT_NOT_READYAccount is not READY.NoRepair or reconnect the account.
MISP_HTTP_400 / 403Malformed input, revoked key, insufficient MISP role, or distribution constraint.NoCorrect the payload or least-privilege account permissions. MISP may report malformed requests as 403.
MISP_HTTP_404Resource or route is absent.NoVerify the ID/UUID and supported MISP version.
MISP_HTTP_429 / 5xxRate limit or transient service failure.Yes for readsHonor Retry-After; reconcile writes before repeating them.
NETWORK_ERRORDNS, TLS, timeout, or connectivity failure.Yes for readsVerify MISP connectivity; never blindly retry an ambiguous mutation.
RESPONSE_TOO_LARGEOne response exceeded 5 MiB.NoNarrow filters or reduce result bounds.
RESOURCE_ID_MISMATCHA get/update response returned another ID/UUID.NoStop and reconcile proxy/plugin behavior before retrying.

Example

Find recent IP indicators carrying an approved traffic-light marking:

{
"operation": "search_attributes",
"baseUrl": "https://misp.example.com",
"filters": {
"type": ["ip-src", "ip-dst"],
"tags": ["tlp:amber"],
"last": "24h",
"to_ids": true
},
"limit": 100,
"returnAll": true
}

Expected result:

{
"status": "success",
"operation": "search_attributes",
"resource": "attribute",
"count": 2,
"hasMore": false,
"attempts": 1,
"items": [
{"id": "781", "type": "ip-dst", "value": "203.0.113.8", "to_ids": true},
{"id": "782", "type": "ip-src", "value": "198.51.100.17", "to_ids": true}
]
}

Notes

  • Pagination: event and attribute searches call MISP's JSON restSearch, set page and limit internally, use pages of at most 100, stop after one page unless returnAll is enabled, and cap aggregate results at 10,000.
  • Rate limits: GET and restSearch operations retry HTTP 408, 429, 500, 502, 503, and 504 up to three attempts with bounded backoff and integer Retry-After. Mutations never retry automatically.
  • API limits: responses are capped at 5 MiB, records and filters at 512 KiB and 32 fields, arrays at 100 values, and aggregate results at 10,000. Hosts, paths, identifiers, dates, distribution values, and sensitive field names are validated before dispatch.
  • Idempotency: get/list/search operations are safe reads. Create, update, publication, tagging, and delete operations are not assumed idempotent; a timeout is ambiguous and requires provider reconciliation. Correlate through returned MISP IDs/UUIDs and an approved event-info convention.
  • Destructive behavior: delete_attribute is irreversible and requires confirmDestructive: true. Event deletion, organization/user deletion, feed deletion, and galaxy deletion are intentionally unavailable.
  • Publication: MISP publication can distribute intelligence to connected organizations and feeds according to event distribution. Both publish and unpublish require confirmPublication: true; policy or human review should precede either action.
  • Privacy: events and attributes can contain restricted indicators, internal incident details, organization identities, or personal data. Respect MISP distribution, sharing groups, traffic-light markings, downstream ACLs, retention, and logging policy.
  • TLS and routing: production requests use a validated public HTTPS origin and trusted certificates. HTTP downgrade, embedded credentials, custom ports, localhost, IP literals, arbitrary endpoints, and n8n's optional unauthorized-certificate mode are rejected.
  • External verification: request construction, automation-key authentication, pagination, validation, retry safety, response mapping, identity checks, redaction, and metadata discovery are deterministic local tests. Live MISP roles, organizations, taxonomies, galaxies, warning lists, sharing groups, feeds, plugins, and provider data require separately authorized credentials and are not exercised in repository tests.
  • Deferred operations: event deletion, attribute bulk actions, sightings, objects, feeds, galaxies, taxonomies, organizations, users, warning/noticelists, proposals, file/sample uploads, STIX import/export, synchronization, webhooks/triggers, and arbitrary raw requests.
  • Functional references: n8n MISP node, n8n MISP source, MISP project, and PyMISP REST client.