Skip to content

Add MODAT Magnify infrastructure enrichment module - #919

Merged
adulau merged 2 commits into
mainfrom
feat/modat-magnify-enrichment
Oct 13, 2026
Merged

adulau merged 2 commits into
mainfrom
feat/modat-magnify-enrichment

Conversation

@adulau

@adulau adulau commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Add a MODAT Magnify expansion module that turns infrastructure attributes into linked MISP host, service and historical DNS observations. For example, enriching ip-dst|port=2001:db8::1|8443 keeps both the address and port as query constraints, while enriching a domain also retrieves its DNS record history.

The module supports 32 relevant input types, maps all 129 detailed-service leaf fields, and audits all 194 current PyMISP attribute types in coverage tables. Unsupported types are rejected rather than advertised as searchable. URL pivots use host/port, filename/hash pivots use the hash, and email pivots search certificate alternative names. The pinned API specification contains no WHOIS endpoints.

Reuse existing infrastructure templates and return the new modat-service and modat-dns-record observations proposed in MISP/misp-objects#539. Matching template copies are bundled so the module can generate objects before a PyMISP template release; installation instructions explain how to register them in MISP.

Original JSON preserves nested arrays and future fields. Discovered attributes have to_ids=false; shared objects are deduplicated within each response and linked to the queried attribute. Generated objects and host attachments retain fresh PyMISP UUIDs so identical evidence in separate enrichments cannot collide across events. Server JA3S/JA4 fingerprints retain their meaning, DNS deletion timestamps are not treated as last-seen, and CVEs describe inferred exposure. Search pagination is bounded, and HTTP/network errors are reported without exposing credentials or response bodies.

Validation:

  • python -m pytest tests/test_modat.py -q: 80 passed. Tests cover every advertised input, all detailed-service fields against the pinned OpenAPI 1.65.2 contract, composite constraints, IPv6, pagination, error handling, object references, template schemas, DNS history, independent UUIDs across enrichments and deduplication within one response.
  • Black, isort, flake8 and git diff --check passed for the change.
  • The companion object templates passed misp-objects' full ./validate_all.sh suite, and the bundled definitions are identical.

Live authenticated enrichment has not been tested because no MODAT API key was configured.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T13:46:54.463701Z 40b79d0 PR opened
🔒 Security Review ✅ Completed 2026-10-12T13:46:02.854663Z 40b79d0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 40b79d0531

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread misp_modules/modules/expansion/modat.py Outdated
@adulau
adulau merged commit b60b895 into main Oct 13, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant