Skip to content

Remove the public DNS fallback, and correct the privacy page - #551

Merged
fstubner merged 2 commits into
mainfrom
fix/remove-dns-fallback
Oct 7, 2026
Merged

fstubner merged 2 commits into
mainfrom
fix/remove-dns-fallback

Conversation

@fstubner

@fstubner fstubner commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Audit finding C1 and H2 (.agent-evidence/audit-2026-10-07/AUDIT.md, local only).

What was wrong

  • When the system resolver returned any error, including a plain "no records" answer, netscli-core asked Cloudflare's public resolver (1.1.1.1) the same question.
  • It applied to every name lookup: dns, and every command given a host name, in the CLI, TUI, desktop app and MCP server.
  • It was on by default, and its only off switch, NETSCLI_DNS_FALLBACK=0, was documented nowhere.
  • The privacy page said lookups contact only the DNS servers you ask. That page is also the privacy policy on the Microsoft Store listing.

What changes

  • dns/resolver.rs keeps only the system resolver. lookup.rs reports the system resolver's own error, so a refusal reads as a refusal.
  • resolver_source stays in the output, always system, so saved results and scripts keep working.
  • A test fails if any resolver other than the system one is built again: anything that mentions hickory's ResolverConfig, builder_with_config or a public preset. I checked it by putting a CLOUDFLARE mention back, and the test failed.
  • privacy.ts now covers:
    • what 0.3.4 and earlier did, and how to turn it off there
    • the CLI history database. The text says it is opt-in from 0.3.5, matching the CLI branch.
    • that Cloudflare proxies every page of the site
  • Docs:
    • the cli.md example that showed a public_fallback answer is regenerated from a real run
    • result-model.md and operations.md say where lookups go
  • A CHANGELOG entry under 0.3.5, Security.

Worth knowing

On this machine the router's DNS server refuses MX queries. nslookup -type=MX netscli.com gets "Query refused" too. That is why the fallback existed. Without it, netscli dns netscli.com --record MX now fails here with "MX lookup failed: DNS error: error response: Query Refused", the same as the system's own tools. If you want lookups against a server you choose, a --server option would be the honest replacement. It is not in this PR.

Checked

  • cargo fmt --all --check
  • cargo clippy -p netscli-core -p netscli --all-targets -- -D warnings
  • cargo test -p netscli-core: 125 tests plus the integration tests pass
  • Real runs: netscli dns netscli.com --record A --csv and --md answer from system
  • The generated TypeScript types were regenerated. Only DnsRecord.ts's comment changed.
  • Site npm run check: 0 errors
  • The prose checker passes on the changed copy

Merging this deploys the corrected privacy page.

… page

When the system resolver returned any error, including a plain "no records"
answer, netscli-core asked Cloudflare's public resolver the same question.
That sent names users looked up to a third party, unencrypted and
undisclosed, from the CLI, TUI, desktop app and MCP server, while the
privacy page said lookups only reach the DNS servers you ask. The fallback
is gone: lookups use the system resolver only, and a refusal from it is
reported as is. NETSCLI_DNS_FALLBACK no longer does anything.

A test fails if any resolver other than the system one is built again,
because nothing else would notice: a fallback changes no result, only where
the question goes.

The privacy page now discloses the fallback in 0.3.4 and earlier and how to
turn it off there, the CLI history database, and that Cloudflare proxies
every page of the site. The cli.md example that showed a public_fallback
answer is regenerated from a real run.
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Site preview: https://pr-551.netscli-site-preview.pages.dev

Built from de00783 with NETSCLI_PREVIEW=1 — noindex, and analytics disabled so it does not report into netscli.com's numbers.

Production is unaffected: netscli.com is served from GitHub Pages via pages.yml, which is manual-only.

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.

1 participant