Repository navigation
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e700367d0
ℹ️ 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".
| obj.add_attribute("text", value=json.dumps({"fuzzer": row.get("fuzzer"), "dns_checked": resolve}), to_ids=False) | ||
| for key in ("dns_a", "dns_aaaa"): | ||
| for address in row.get(key, [])[:limit]: | ||
| obj.add_attribute("ip", value=str(ipaddress.ip_address(address)), to_ids=False) |
There was a problem hiding this comment.
Ignore DNSTwist's DNS failure sentinels
When resolve=true and any selected permutation receives a DNS SERVFAIL, DNSTwist deliberately returns "!ServFail" in dns_a or dns_aaaa (upstream resolver behavior). Passing that sentinel to ipaddress.ip_address() raises ValueError, so the handler discards every otherwise valid result and returns the generic error response. Skip or separately annotate these sentinel values rather than parsing them as addresses.
Useful? React with 👍 / 👎.
| if kind in ("ip-src", "ip-dst"): | ||
| return str(ipaddress.ip_address(value)) | ||
| if kind in ("domain", "hostname"): | ||
| value = value.rstrip(".").encode("idna").decode("ascii").lower() |
There was a problem hiding this comment.
Preserve IDNA2008 domain identity
For Unicode domains containing characters whose IDNA2003 and IDNA2008 mappings differ, this silently scans a different domain; for example, faß.de becomes fass.de here instead of the IDNA2008 xn--fa-hia.de. DNSTwist uses the third-party idna.encode() implementation itself (upstream parsing), so normalize with the same non-transitional IDNA behavior before invoking it to avoid generating permutations for an unrelated domain.
Useful? React with 👍 / 👎.
Analysts can generate domain permutations locally or explicitly enable DNS resolution. An isolated subprocess preserves mutation algorithms, bounds runtime and avoids changing server arguments. Generated candidates retain to_ids=false and source references. Install the optional dnstwist engine in the module server environment as documented.
Includes a usage guide and focused adapter tests.
Validation:
14 passed, 1 warning in 0.64swithpytest -q tests/test_dnstwist.py; flake8 passed for the module. The combined enrichment regression check passed 389 tests.Local generation was also exercised with the installed DNSTwist engine.
Authenticated provider API validation remains pending. Tests use sanitized fixtures; no provider credentials are included.
Review updates: Retain valid results when DNS failure sentinels are returned, and preserve domain identity with non-transitional IDNA normalization.
Updated validation: 16 passed, 1 warning in 0.64s; module lint passed. Combined regression validation passed 409 tests.