T09 · Insecure Skill Coding Practices
- Location
src/crawler.js:316- Finding
Whitelist Bypass Through Unvalidated Redirects and DNS Resolution
- Content
View full analysis
pattern.test(hostname)); } // If it's an IPv6 address (simplified check) if (hostname.includes(':') && /^[0-9a-fA-F:]+$/.test(hostname.replace(/:/g, ''))) { // For simplicity, check if hostname looks like IPv6 and matches patterns // A full IPv6 parser would be better but this catches common private ranges // Also catch IPv6 unique local (fc00::/7) by checking for fc/fd prefix if (/^f[cd]/i.test(hostname)) return true; return BLOCKED_IP_PATTERNS.some(pattern => pattern.test(hostname)); } // Hostnames (domain names) are not blocked return false; } ``` ### Technical Analysis The crawler validates only the textual hostname when a URL is enqueued. It does not resolve hostnames and validate every resulting IP address before connecting. Consequently, an allowed hostname can resolve ...[truncated 2125 chars]- Remediation
View remediation
