Files
Kazuki Yamada 3a10a9f255 fix(core): Use proper hostname validation for Azure DevOps URLs
Replace substring matching with proper URL parsing to fix CodeQL security alert.

Previously, the code used `includes()` for substring matching which could
incorrectly identify malicious URLs like `https://evil.com/dev.azure.com/`
as Azure DevOps URLs.

Changes:
- Extract Azure DevOps URL detection into a dedicated function
- Use URL constructor to parse and validate the hostname
- For SSH URLs, use `startsWith()` for exact prefix matching
- For HTTP(S) URLs, check the hostname property exactly
- Add security tests to ensure malicious URLs are not incorrectly identified

This resolves the "Incomplete URL substring sanitization" alert from CodeQL.
2025-10-07 23:43:38 +09:00
..