Skip to content

fix(search): actually move stock-engine profiles to pit.world - #143

Merged
ralyodio merged 1 commit into
mainfrom
fix/pit-default-replaces-stock
Oct 17, 2026
Merged

ralyodio merged 1 commit into
mainfrom
fix/pit-default-replaces-stock

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

pit.world wasn't the default, and didn't appear in chrome://settings/searchEngines, on profiles whose default was one of Chromium's stock engines (Ecosia, Google, Bing). 3.17.0 only replaced engines the launcher had set itself, then recorded the switch as done anyway.

  • A one-time pass (.tron-search-stock) also replaces a stock engine nobody edited (prepopulate_id > 0 and still safe_for_autoreplace). Edited engines, engines the user added, and tron search <x> are still left alone.
  • Clears default_search_provider.guid and rewrites the mirrored copy. Otherwise Chromium re-selects the old engine from Web Data by that guid.
  • Skips while the profile is open, since Chromium rewrites Preferences on exit. Marks are written only once the edit has landed.

Tests: 4 new launcher tests, 44/44 pass. Checked on Chromium 152 with a copy of a real Ecosia profile: pit.world becomes the default and is added to the engines list.

🤖 Generated with Claude Code

3.17.0 only replaced an engine the launcher had set itself, so a profile on
one of Chromium's stock engines (Ecosia from the choice screen, Google, Bing)
kept it, and .tron-search was still written as pit, so it never retried.
pit.world then never showed in chrome://settings/searchEngines either, since
Chromium only adds the default to that list.

- A one-time pass (.tron-search-stock) also replaces a stock engine nobody
  edited (prepopulate_id > 0, safe_for_autoreplace). Edited engines, engines
  the user added, and `tron search <x>` are still left alone.
- Clear default_search_provider.guid and rewrite the mirrored copy: Chromium
  otherwise re-selects the old engine from Web Data by that guid.
- Skip while the profile is open (SingletonLock -> live pid): Chromium
  rewrites Preferences on exit and the edit would be lost. Marks are written
  only after the edit actually lands.

Checked against a copy of a real Ecosia profile on Chromium 152: pit.world
becomes the default and is added to the keywords table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

ThreatCrush Security Scan

48 finding(s)

HIGH/CRITICAL: 2 | MEDIUM: 25 | LOW: 21

Severity Rule Location
HIGH py-ssrf-outbound-request apps/desktop/launcher/tron-tor-helper:303
HIGH py-ssrf-outbound-request apps/desktop/launcher/tron-tor-helper:437
MEDIUM js-open-redirect apps/desktop/extensions/ai-sidebar/install-helper.js:156
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/media.js:34
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/media.js:57
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/newtab.js:239
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/newtab.js:268
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/newtab.js:338
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/options.js:306
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/sidepanel.js:78
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/sidepanel.js:166
MEDIUM js-unescaped-html-sink apps/extensions/public/store.js:77
MEDIUM js-unescaped-html-sink apps/extensions/public/store.js:227
MEDIUM js-unescaped-html-sink apps/extensions/public/store.js:569
MEDIUM js-unescaped-html-sink apps/web/public/app.js:29
MEDIUM js-unescaped-html-sink apps/web/public/dns.js:54
MEDIUM sh-remote-script-execution apps/web/public/install.sh:167
MEDIUM sh-remote-script-execution apps/web/public/install.sh:407
MEDIUM sh-remote-script-execution apps/web/public/install.sh:425
MEDIUM js-unescaped-html-sink apps/web/public/settings.js:96
MEDIUM js-unescaped-html-sink apps/web/public/settings.js:168
MEDIUM js-dynamic-code-execution packages/sdk/src/mcp/tools.ts:125
MEDIUM js-dynamic-code-execution packages/sdk/src/page.ts:68
MEDIUM js-dynamic-code-execution packages/sdk/src/page.ts:73
MEDIUM sql-template-interpolation services/api/src/store/db.ts:116
MEDIUM js-dynamic-code-execution services/api/src/store/scanner.ts:44
MEDIUM sh-predictable-temp-path start.sh:25
LOW js-dynamic-code-execution apps/desktop/extensions/ai-sidebar/pit-proxy.test.js:8
LOW js-dynamic-code-execution packages/agent-runtime/src/analyze/form-script.test.ts:6
LOW js-unescaped-html-sink packages/agent-runtime/src/analyze/form-script.test.ts:26
LOW js-unescaped-html-sink packages/agent-runtime/src/analyze/form-script.test.ts:49
LOW js-dynamic-code-execution packages/browser-core/src/automation/extract-script.test.ts:6
LOW js-unescaped-html-sink packages/browser-core/src/automation/extract-script.test.ts:16
LOW js-unescaped-html-sink packages/browser-core/src/automation/extract-script.test.ts:45
LOW js-unescaped-html-sink packages/browser-core/src/automation/extract-script.test.ts:57
LOW js-unescaped-html-sink packages/browser-core/src/automation/extract-script.test.ts:80
LOW js-unescaped-html-sink packages/browser-core/src/automation/extract-script.test.ts:99
LOW js-dynamic-code-execution packages/browser-core/src/automation/snapshot-script.test.ts:11
LOW js-unescaped-html-sink packages/browser-core/src/automation/snapshot-script.test.ts:62
LOW js-unescaped-html-sink packages/browser-core/src/automation/snapshot-script.test.ts:101
LOW js-unescaped-html-sink packages/provenance/src/scan.test.ts:47
LOW js-unescaped-html-sink packages/provenance/src/scan.test.ts:170
LOW js-unescaped-html-sink packages/provenance/src/scan.test.ts:216
LOW js-dynamic-code-execution packages/sdk/src/mcp/automate.test.ts:261
LOW secret-generic-api-key packages/storage/src/config.ts:51
LOW secret-generic-credential packages/storage/src/config.ts:51
LOW js-dynamic-code-execution services/api/src/store/scanner.test.ts:32
LOW js-hardcoded-crypto-key services/api/src/store/signing.test.ts:24

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit 1e2a320 into main Oct 17, 2026
12 checks passed
@ralyodio
ralyodio deleted the fix/pit-default-replaces-stock branch October 17, 2026 09:47
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