Skip to content

follow-up from #165: installed Chrome fallback, check cost, logging and candidate order #169

Open

Description

@pahud

Open MEDIUM and LOW findings from the reviews of #165 (installed Chrome fallback, closes #128). None is a HIGH finding. File references are on main.

MEDIUM

  • Sources/InstanceMCPCore/Browser/PlaywrightBackend.swift, managedTransportFor() calling ManagedPlaywrightLocator.locate(): with the installed Chrome selected, every status() (so every browser_* call, and sys_info) runs SecStaticCodeCheckValidity with nested-code and strict flags over the whole Chrome bundle, which is several hundred MB of sealed code. The latency is unmeasured and is added to each call. docs/browser-tools.md says the check runs "each time the managed child is started" and R7.3.1.5 says "before the child is launched", which is not what the code does. Fix: measure one validation, then either reword the docs to "on every browser call", or run the full check only when the spec changes or the child is about to start, with a cheap per-call identity check (device, inode, mtime of bundle and executable) that triggers a full check on change.
  • PlaywrightBackend.swift, managedTransportFor(): when locate() returns an InstalledChromeProblem during normal backend use, no browser: chrome_check_failed class=<class> event is logged. Only BrowserToolsController.requestChromeConsent() logs it, so R7.3.1.9 is not met for failures found at call time. Fix: log the fixed, path-free event whenever locate() returns one of InstalledChromeProblem.classes.
  • Sources/InstanceMCPCore/Browser/InstalledChrome.swift, check(): it takes the first Google Chrome.app that exists and checks only that one. If the /Applications copy is invalid, incomplete or fails the signature check while a valid copy sits in ~/Applications, Chrome is refused although R7.3.1.3 accepts either location. Fix: check candidates in priority order until one passes, and report a useful failure when none does.
  • Accepted risk, for the record: the signature check and the launch are separate steps, so a swap of a bundle in a user-writable folder between them cannot be excluded. The docs and R7.3.1.5 already state this. No action unless the threat model changes.

LOW

  • Test fixture (FakeInstallFixture.installer(... chromeChecker:) and PlaywrightInstaller.init): the default is the real InstalledChromeChecker over the real /Applications. Existing tests only lstat it, but a future test that confirms consent without injecting a checker would run the real Security check and could launch the owner's Chrome. Fix: default the fixture to a stub or an empty directory.
  • systemChromeSummary and the menu line show a version read from Info.plist with no signature check (display only, documented). When the check fails, sys_info still prints chrome: system <version> next to the chrome_* class, which can read as "in use". Fix: omit the version when the check fails, or label it as not verified.
  • Remove copy: it says "If you had chosen your installed Google Chrome, that choice is removed too", but with an unreadable or invalid install.json Remove leaves the file (R7.7) and the choice stays recorded. locate() already fails then, so the choice is not in effect. Fix: add "when install.json is removed" to the sentence.

Source: PR #165 review notes (opus and sol) and gate.

Activity

  1. added
    p2Priority 2: real bug or scoped planned work
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2Priority 2: real bug or scoped planned work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions