Skip to content

Fix MODAT parsing of multiple PTR and certificate RDN values - #922

Merged
adulau merged 1 commit into
mainfrom
fix/modat-observation-cardinality
Oct 13, 2026
Merged

adulau merged 1 commit into
mainfrom
fix/modat-observation-cardinality

Conversation

@adulau

@adulau adulau commented Oct 13, 2026

Copy link
Copy Markdown
Member

MODAT host responses can contain multiple reverse-DNS names and multiple values in certificate subject/issuer RDNs. The module inserted these arrays into single-valued ip-port.ptr-record and specialized x509 relations, causing PyMISP validation failures that appeared as the generic "Invalid request, attribute, or MODAT response data" / "Nothing to import" error.

Preserve the entire reverse-DNS answer set in a dns-record object whose queried domain is the IP's reverse pointer. Populate ip-port.ptr-record only when there is one distinct answer. Preserve repeated certificate RDNs in the full issuer/subject distinguished-name strings and the original MODAT observation; populate specialized single-valued x509 relations only for single distinct values. No object-template changes are needed.

Unexpected parsing errors now identify the processing stage and exception class in the module response and log, without returning or logging exception messages, response contents or credentials. This helps distinguish host parsing failures from reverse-DNS or DNS-zone failures.

Follow-up to #919, which has already been merged. Both cardinality regressions reproduced the generic error before the fix. The report's exact live response is not yet available, so the new diagnostics also help identify any separate failure.

Validation: 85 offline tests passed, including new multi-PTR and multi-RDN regressions, a full MISP request with reverse-DNS enabled, and checks that diagnostics do not leak sensitive exception contents. Black, isort, flake8 and git diff --check passed. The provided API key was not used or included in the code, tests or PR.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 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-13T10:08:30.937538Z a2a214e PR opened
🔒 Security Review ✅ Completed 2026-10-13T10:08:41.945256Z a2a214e 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.

@adulau
adulau merged commit c10266f 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