Skip to content

DNS prefetching off for every renderer (ticket 662): a store frame's page asks the resolver for nothing - #669

Merged
SSFSKIM merged 6 commits into
masterfrom
ux-wave/dns-prefetch-off
Nov 15, 2026
Merged

SSFSKIM merged 6 commits into
masterfrom
ux-wave/dns-prefetch-off

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Closes #662. Main switches Blink's DNS prefetching off for every renderer before the app is ready, so a page in a store frame (an HTML artifact's script, or markup it writes into its own document) can no longer send data out of the machine in DNS queries through <link rel="dns-prefetch">.

What changes

  • src/main/chromium-features.ts: STARTUP_BLINK_SETTINGS = ['dnsPrefetchingEnabled=false'] and setBlinkSettings, the one writer of the blink-settings switch (Chromium reads one list; a second append would replace the first).
  • src/main/index.ts: the one call, right after the startup feature switches, in the app's entry and so before either root (the app, the render host) loads.
  • docs/tech-debt-tracker.md: the row of 2026-11-14 "Residual egress from an HTML-artifact frame by DNS" is amended in place to say it is fixed by this landing. No new row.

What it costs

No page in the app gets DNS-prefetch hints any more, the in-app browser included (its links lose their hover prefetch). Name resolution and page loads are untouched.

Why the switch and not the page

On Chromium 152 an X-DNS-Prefetch-Control: off header or meta does not stop an explicit dns-prefetch link: it still sends (measured in the viewer-frame spike, spikes/viewer-frame/FINDINGS.md, "2026-11-14 follow-up: the DNS-prefetch channel"). The frame's CSP, its sandbox, main's request filter, the store-frame policies and a session proxy never see the query, and Electron's web preferences and sessions have nothing that reaches the Blink setting.

Proof

  • Unit guard (src/main/chromium-features.test.ts, src/main/index.test.ts): the exact value; the switch is set before registerStoreSchemes and before the root loads, in the app mode and in --render-host; no source file under src/ other than chromium-features.ts contains blink-settings, and index.ts is the only caller of setBlinkSettings, exactly once (so nothing later replaces the list).

  • e2e scene (e2e/deliverables.spec.ts, "ticket 662: an HTML artifact's dns-prefetch links ask the resolver for nothing; a name main resolves on purpose is in the same net log"): an HTML artifact served under the real handler and frame policies attaches one prefetch link by script and one as markup, each with a random name under example.com; main then resolves a third name on purpose (session.resolveHost), the positive control; Chromium's net log must hold the control's resolver job and no event for either page name. The report prints event types and counts only.

  • Red run on a Mac, the switch not set (a side branch that is not merged; run 43654278209, hosted macOS, e2e:deliverables; the run shows as cancelled because it was cancelled by hand after its hosted job had failed as intended, so that its Mac mini copy would not run): the scene fails, on the run and on its retry, with

    Error: the script-made link asked for no name
    control …-control.example.com: 6 events ["HOST_RESOLVER_MANAGER_REQUEST","HOST_RESOLVER_MANAGER_JOB","DNS_TRANSACTION","DNS_TRANSACTION_QUERY","HOST_RESOLVER_DNS_TASK_EXTRACTION_RESULTS","HOST_RESOLVER_DNS_TASK"]
    script …-script.example.com: 6 events [the same six types]
    markup …-markup.example.com: 6 events [the same six types]
    
  • Green run, this branch (run 43654259870, e2e:deliverables on hosted macOS): 14 passed; the scene's report: control 6 events, script 0, markup 0.

  • The builder's Linux runs agree (red: 10 events for each page name; green: 0 and 0).

Checks

  • Class 1a (static, unit 1/4 to 4/4, probes) and e2e:deliverables with its copy on the Mac mini lane, on 904222afd: run 43654259870, success (the hosted macOS job and the copy on the Mac mini lane: 14 passed each; the mini copy's log shows this scene passing).
  • unit:darwin --affected on 904222afd: run 43654212363, success.
  • The head cb733a13a adds one merge of master's tracker rows (docs/tech-debt-tracker.md only) on top of 904222afd.
  • Review: one independent reviewer (medium) on the branch's diff: no findings.

Not verified

  • The real in-app browser under the switch (its pages load as before by construction; its hover prefetch is gone by intent).
  • A net log on a Mac that resolves through the system resolver in a way Chromium does not log: the control would then fail the scene, and it did not on the hosted Mac.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)

…ge cannot send a name out (ticket 662)

setBlinkSettings in chromium-features.ts is the one writer of blink-settings
(dnsPrefetchingEnabled=false), called once from main's entry beside the other
switches. The unit guard pins the value, its place in the entry's order before
any root loads, and that no other source under src/ names the switch. The
e2e:deliverables scene frames an HTML artifact whose script connects a
dns-prefetch link by script and by markup, and reads Chromium's net log of the
window's session: a name main resolves on purpose is there, the page's are not.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…s type alone (ticket 662)

An event's other params carry the machine's resolver settings, such as its
search domains; the report keeps them out of test output.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…pike, PR 664)

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
… this landing (ticket 662)

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…e/dns-prefetch-off

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…fetch-off

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T00:12:30.450197Z cb733a1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

An HTML-artifact frame can send data out through DNS prefetch: switch Blink's DNS prefetching off

1 participant