Skip to content

Add URL DNS expansion with IP-port and IPv4 ASN objects - #929

Merged
adulau merged 2 commits into
mainfrom
feat/url-dns-asn-expansion
Oct 14, 2026
Merged

adulau merged 2 commits into
mainfrom
feat/url-dns-asn-expansion

Conversation

@adulau

@adulau adulau commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Add url_dns, a URL expansion module that resolves all A and AAAA answers into TCP ip-port objects and enriches public unicast IPv4 addresses with origin ASN objects through Team Cymru DNS TXT queries.

An explicit URL port takes precedence; HTTP defaults to 80, HTTPS to 443, and other schemes require an explicit port. Each endpoint references the original URL attribute UUID with derived-from and its ASN objects with belongs-to. ASN objects also reference the original URL with related-to. Shared ASNs and addresses are deduplicated within each expansion.

The module supports IDNA hostnames, IPv4 and bracketed IPv6 literals, multi-origin prefixes, and an optional DNS nameserver. Non-global and multicast IPv4 addresses retain their endpoints without ASN queries. Partial DNS or ASN failures preserve successful endpoint results with explanatory comments. Generated attributes use to_ids=false. No API keys, custom object templates, or additional repository dependencies are required.

Includes module documentation, installation instructions, an example request, and 63 focused module tests.

Validation

  • python -m pytest -q tests/test_url_dns.py tests/test_rdap.py: 69 passed (63 module tests and 6 existing RDAP tests).
  • Four regression cases cover multicast IPv4 URL literals and DNS A records; all reproduced the unnecessary ASN lookup before the fix and pass after it.
  • Strict standard MISP object-template validation and module discovery passed.
  • Black, isort, flake8, and staged whitespace checks passed.

DNS responses were mocked; live DNS and deployment to a running MISP instance have not been tested. IPv6 ASN enrichment is outside this module's scope.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 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-14T10:13:06.815035Z 8b195de PR opened
🔒 Security Review ✅ Completed 2026-10-14T10:14:08.490518Z 8b195de 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: 8b195de05a

ℹ️ 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/url_dns.py Outdated
@adulau
adulau merged commit 6f6097e into main Oct 14, 2026
13 of 14 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