Repository navigation
Fix MODAT parsing of multiple PTR and certificate RDN values - #922
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-recordand specializedx509relations, 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-recordobject whose queried domain is the IP's reverse pointer. Populateip-port.ptr-recordonly 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-valuedx509relations 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 --checkpassed. The provided API key was not used or included in the code, tests or PR.