Skip to content

fix(local-sandbox): allow SRT proxy sockets on Linux - #798

Merged
chiragjn merged 3 commits into
truefoundry:mainfrom
sirmace72:fix/local-sandbox-pypi-proxy
Sep 18, 2026
Merged

chiragjn merged 3 commits into
truefoundry:mainfrom
sirmace72:fix/local-sandbox-pypi-proxy

Conversation

@sirmace72

@sirmace72 sirmace72 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Fixes #482

Summary

Allow the Linux local sandbox to read the SRT HTTP/SOCKS Unix socket paths without exposing unrelated host paths.

This fixes sandboxed network access that could fail when denyRead: ['/'] hid the SRT proxy bridge sockets.

Changes

  • add exact Linux SRT HTTP/SOCKS socket paths to the local sandbox read allowlist
  • keep unrelated host /tmp paths hidden
  • strengthen host-home secret read protection coverage
  • add a Linux smoke regression test for SRT socket visibility

Validation

  • pnpm smoke:local-sandbox
  • pnpm --filter @truefoundry/trueforge typecheck
  • pnpm --filter @truefoundry/trueforge test:local-sandbox:contract

All passed.


Note

Medium Risk
Narrows the sandbox filesystem read policy for Linux; regression tests assert SRT sockets stay reachable while unrelated host /tmp and home secrets remain blocked.

Overview
Fixes Linux local sandbox HTTPS/pip-style network failures when broad denyRead: ['/'] blocked the SRT HTTP/SOCKS bridge Unix sockets under host /tmp.

hostRun.ts now adds a Linux-only read allowlist for the exact paths from SandboxManager.getLinuxHttpSocketPath() and getLinuxSocksSocketPath(), merged into filesystemPolicy alongside the existing sandbox root and Code Mode socket parent entries—without opening all of host /tmp.

Smoke coverage adds smokeLinuxSrtProxySocketReadGate (stat the HTTP bridge socket, assert an unrelated /tmp sentinel stays invisible) and tightens host-home isolation by probing a secret file under $HOME instead of only listing $HOME. Lima provisioning installs python3-venv for the guest smoke environment.

Reviewed by Cursor Bugbot for commit 5f24fb3. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Sep 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5f24fb3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@truefoundry/trueforge Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chiragjn

Copy link
Copy Markdown
Member

Thank you for raising this fix, we will do some testing and get this in

@chiragjn chiragjn self-assigned this Sep 18, 2026
@chiragjn
chiragjn force-pushed the fix/local-sandbox-pypi-proxy branch from 8994f1d to 6abf816 Compare September 18, 2026 12:55
@chiragjn
chiragjn force-pushed the fix/local-sandbox-pypi-proxy branch from 6abf816 to 53b2cb1 Compare September 18, 2026 14:29
@chiragjn
chiragjn merged commit a09f2b1 into truefoundry:main Sep 18, 2026
1 check passed
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.

TrueForge standalone sandbox bootstrap fails to install pydantic due to proxy/package-index connectivity

2 participants