{"record":{"id":"95dc9e618c1db51a","repo":"santifer/career-ops","slug":"blocked-request-to-restricted-destination-dns-95dc9e","errorCode":null,"errorMessage":"Blocked request to restricted destination (DNS): ${requestUrl} - ${err.message}","messagePattern":"Blocked request to restricted destination \\(DNS\\): (.+?) - (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"liveness-browser.mjs","lineNumber":264,"sourceCode":"  }\n  if (page) {\n    page._blockedByGuard = null;\n  }\n  if (page && typeof page.route === 'function' && !page._routeInterceptorRegistered) {\n    page._routeInterceptorRegistered = true;\n    await page.route('**/*', async (route) => {\n      const requestUrl = route.request().url();\n      const errGuard = rejectPrivateOrInvalid(requestUrl);\n      if (errGuard) {\n        console.warn(`Blocked request to restricted destination: ${requestUrl}`);\n        page._blockedByGuard = errGuard;\n        return route.abort('blockedbyclient');\n      }\n      try {\n        await validateUrlSecurity(requestUrl);\n        return route.continue();\n      } catch (err) {\n        console.warn(`Blocked request to restricted destination (DNS): ${requestUrl} - ${err.message}`);\n        // A host that resolves to nothing is a DEAD THIRD-PARTY SCRIPT, not a\n        // statement about the posting. Measured 2026-08-14 over a 217-URL\n        // recheck: 78 live postings were returned as `uncertain` because an\n        // analytics or ad host on the page no longer exists — 53 on\n        // personalisation.visitorqueue.com, 17 on s7.addthis.com (AddThis was\n        // shut down in 2023), the rest on fluidads and cloudfront. One was\n        // opened by hand to confirm: 11,178 characters of live posting and a\n        // working apply control, called uncertain because of a dead tracker.\n        //\n        // The request is still aborted either way, so the egress guard loses\n        // nothing. Only the VERDICT stops being poisoned, and only for a\n        // subresource: if the main document itself cannot resolve, that is a\n        // real finding about the posting and still counts.\n        // Whether this was the main document or a subresource can only be asked\n        // of a real Playwright request. Callers may pass a lighter route double\n        // (the test suite does, with request() returning just a url()), and for\n        // those the answer is unknowable — so default to TRUE, which keeps the\n        // pre-existing behaviour of poisoning the verdict. The relaxation only","sourceCodeStart":246,"sourceCodeEnd":282,"githubUrl":"https://github.com/santifer/career-ops/blob/e7abd431fce9348a95261acac9e0c14779c35df8/liveness-browser.mjs#L246-L282","documentation":"A second layer of the same route guard: after the URL-shape check passes, validateUrlSecurity() performs DNS resolution and rejects hosts resolving to private/invalid addresses. The warning notes a DNS-level block. Crucially, the code treats a host that resolves to nothing as a DEAD THIRD-PARTY SCRIPT rather than evidence about the posting — many live postings reference analytics hosts that no longer exist (measured 78/217 false 'uncertain' verdicts from visitorqueue, AddThis, fluidads, cloudfront).","triggerScenarios":"The route interceptor awaits validateUrlSecurity(requestUrl) and it throws because the hostname resolves to a private address or fails to resolve at all — typically an embedded analytics/ad script host that has been decommissioned.","commonSituations":"Live postings loading s7.addthis.com (shut down 2023) or personalisation.visitorqueue.com; ad hosts on dead cloudfront distributions; DNS failure on the scanning machine making everything unresolvable; split-horizon DNS resolving public names to internal IPs.","solutions":["If the blocked host is a third-party tracker, ignore — the code intentionally treats it as noise, not a liveness signal","If the posting's own host is blocked, verify DNS on the machine (dig/nslookup) and check /etc/hosts and VPN/split-horizon DNS","Do NOT downgrade the posting to dead/uncertain because of this warning; the code keeps measuring the posting itself","If a genuinely public host is misclassified as private, fix the resolver config, not the guard"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"import { lookup } from 'node:dns/promises';\nasync function hostResolves(hostname) {\n  try { await lookup(hostname); return true; } catch { return false; }\n}\n// treat a dead tracker host as noise, never as a liveness verdict","typeGuard":null,"tryCatchPattern":"try {\n  await validateUrlSecurity(requestUrl);\n  return route.continue();\n} catch (err) {\n  // DNS-dead third-party host: continue with the posting, mark host as ignored\n  ignoredHosts.add(requestUrl);\n  return route.abort('blockedbyclient');\n}","preventionTips":["Never let third-party tracker failures (visitorqueue, AddThis, dead CDNs) downgrade posting liveness to uncertain","Ensure stable DNS on the scanning machine; check /etc/hosts and VPN split-horizon configs","Maintain an allowlist of known-dead analytics hosts to skip noisy warnings","Re-measure periodically — tracker hosts die often, as the AddThis 2023 shutdown shows"],"tags":["dns","ssrf","security","playwright","third-party-scripts"],"backgroundTag":"dns-resolution-blocked","analyzedSha":"e7abd431fce9348a95261acac9e0c14779c35df8","analyzedAt":"2026-09-16T06:35:29.214Z","contentChangedAt":"2026-09-16T06:35:29.214Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}