fix: normalize source-reported subdomains before domain check - #1863
krishna28238-arch wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughThe runner now lowercases subdomains and removes trailing FQDN dots before wildcard processing. Tests cover normalization, domain suffix validation, mixed-case hosts, wildcard values, and suffix-spoofing values. ChangesSubdomain normalization
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to Source-reported subdomains with mixed case or a trailing FQDN dot are now accepted consistently while existing apex and suffix-spoofing rejections remain covered. No current merge-blocking risk is identified. Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Sources that report hosts verbatim — certificate names from certspotter/censys, code-search matches from github, FQDNs from DNS-style APIs — can return values with a trailing dot or mixed case. The suffix check in the enumerator is case- and dot-sensitive, so these results are silently dropped (dnsdb and dnsrepo already trim the dot at the source to work around this).
This normalizes the value once, centrally, before the check, mirroring what
preprocessDomaindoes for input domains and what the regex extractor already does for text sources. Values that already pass are unaffected, and apexes, label fusions (notexample.com) and other-apex hosts (foo.example.com.evil.org) are still rejected.Summary by CodeRabbit