Repository navigation
Open
Labels
p2Priority 2: real bug or scoped planned workPriority 2: real bug or scoped planned work
Description
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()callingManagedPlaywrightLocator.locate(): with the installed Chrome selected, everystatus()(so everybrowser_*call, andsys_info) runsSecStaticCodeCheckValiditywith 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.mdsays 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(): whenlocate()returns anInstalledChromeProblemduring normal backend use, nobrowser: chrome_check_failed class=<class>event is logged. OnlyBrowserToolsController.requestChromeConsent()logs it, so R7.3.1.9 is not met for failures found at call time. Fix: log the fixed, path-free event wheneverlocate()returns one ofInstalledChromeProblem.classes. -
Sources/InstanceMCPCore/Browser/InstalledChrome.swift,check(): it takes the firstGoogle Chrome.appthat exists and checks only that one. If the/Applicationscopy 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:)andPlaywrightInstaller.init): the default is the realInstalledChromeCheckerover the real/Applications. Existing tests onlylstatit, 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. -
systemChromeSummaryand the menu line show a version read fromInfo.plistwith no signature check (display only, documented). When the check fails,sys_infostill printschrome: system <version>next to thechrome_*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.jsonRemove 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.
Metadata
Metadata
Assignees
Labels
p2Priority 2: real bug or scoped planned workPriority 2: real bug or scoped planned work
Activity