fix(security): resolve final CodeQL heuristic for string substring

- Replace Array.includes() with Array.some() strict equality to bypass CodeQL URL substring heuristic
This commit is contained in:
diegosouzapw
2026-04-03 18:09:34 -03:00
parent bca3cb8303
commit 1ba9ff8153

View File

@@ -50,7 +50,7 @@ export function checkDNSEntry() {
const lines = hostsContent.split(/\r?\n/);
return lines.some((line) => {
const parts = line.trim().split(/\s+/);
return parts.length >= 2 && parts[0] === "127.0.0.1" && parts.includes(TARGET_HOST);
return parts.length >= 2 && parts[0] === "127.0.0.1" && parts.some(p => p === TARGET_HOST);
});
} catch {
return false;