Skip to content

fix(api): skip public lookups for non-routable hosts#311

Open
Gujiassh wants to merge 3 commits into
lissy93:masterfrom
Gujiassh:fix/non-routable-public-api-skip-302
Open

fix(api): skip public lookups for non-routable hosts#311
Gujiassh wants to merge 3 commits into
lissy93:masterfrom
Gujiassh:fix/non-routable-public-api-skip-302

Conversation

@Gujiassh

@Gujiassh Gujiassh commented Jun 4, 2026

Copy link
Copy Markdown

Summary

  • skip third-party public API lookups when the target is a direct non-routable host such as RFC1918 IPv4, localhost, link-local, or IPv6 ULA
  • add a shared host-scope helper and focused node tests for the non-routable classification
  • apply the guard to Archive, IP geolocation, Tranco rank, Shodan, and threat-intelligence lookups

Testing

  • node --test api/_common/target-scope.test.js
  • git diff --check

Fixes #302

@netlify

netlify Bot commented Jun 4, 2026

Copy link
Copy Markdown

Deploy Preview for web-check failed. Why did it fail? →

Built without sensitive environment variables

Name Link
🔨 Latest commit 31910c1
🔍 Latest deploy log https://app.netlify.com/projects/web-check/deploys/6a2a223fa923eb0008ff0dff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Don't bother using public APIs on non-routable IP addresses

1 participant