Skip to content

fix: keep socket and transform cache directories private to the user - #43691

Closed
Yury Semikhatsky (yury-s) wants to merge 1 commit into
microsoft:mainfrom
yury-s:fix-private-temp-dirs
Closed

Yury Semikhatsky (yury-s) wants to merge 1 commit into
microsoft:mainfrom
yury-s:fix-private-temp-dirs

Conversation

@yury-s

@yury-s Yury Semikhatsky (yury-s) commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Create the socket directory (CLI daemon, dashboard, browser.bind) and the transform cache directory with mode 0700, and refuse an existing one that the current user does not own. On a shared /tmp, another user could create these predictable directories first.
  • When the transform cache directory is refused, transpile without the disk cache.

Fixes #43698

On a shared /tmp, another user could create the predictable socket or
transform cache directory first, then replace sockets or plant cached
code. Create these directories with mode 0700 and refuse ones that the
current user does not own. The transform cache falls back to no disk
cache in that case.
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

5189 passed, 614 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

1 failed
❌ [playwright-test] › reporter-html.spec.ts:3723 › created › speedboard › next/prev buttons should follow speed @macos-latest-node22

23574 passed, 708 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

🟡 Uncertain whether this PR caused the failure

Hi, I'm the Playwright bot. I checked the latest CI report, the diff, and refreshed test history for c1c0e66a21bf8743be165bbde19c4a70ad3fd9dc.

Details

There is one failing test. I found no direct link to the PR's changes, but no matching historical failure that would establish a pre-existing flake either.

Uncertain

[playwright-test] › reporter-html.spec.ts:3723 › created › speedboard › next/prev buttons should follow speed — macOS failure.

  • Failure: after selecting three, the previous link stayed visible for 75 seconds (:3746). The test assumes its 100/200/300 ms waits make three the slowest test. Timing variation could explain the result, but the timeout alone does not establish a flake.
  • Diff: the PR changes socket-directory permissions and compilation-cache access, not Speedboard sorting or navigation. This test runs an inline suite through the changed compilation cache, so an indirect effect cannot be ruled out.
  • History: after updating the aggregated results, this exact test passed in all 619 other macOS run attempts across 618 SHAs, in the September 30–October 27 window. No matching failure or retry-rescued failure appeared on another PR/SHA, including other platforms.

A repeated comparison of this test on the PR head and its base, using the same macOS runner setup, is needed to distinguish a PR effect from an unconfirmed timing failure.

Triaged by the Playwright bot - agent run

@yury-s
Yury Semikhatsky (yury-s) marked this pull request as ready for review October 28, 2026 00:09

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would make this opt-in with a documented environment variable pointing to the location.

@yury-s

Copy link
Copy Markdown
Member Author

Replaced by #43732 (sockets) and #43733 (transform cache).

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.

[Bug]: Socket and transform cache directories in a shared /tmp are not private to the user

2 participants