Files
devvm/testdata/script
w3cjandClaude Opus 5.5 fd6170c7f7 fix(lima): the sandbox refuses the hostagent's port binds; ssh ports recorded
On macOS, a network-policy VM's hostagent Seatbelt profile denies every
network bind but TCP on its ssh port and unix sockets in its Lima
folder, so Lima forwards none of the guest's ports even if its ignore
rules were bypassed. Lima's host resolver is off for these VMs, as on
Linux: it binds a random port the profile can't allow.

Every VM's ssh port is chosen and recorded before create (VMSpec.SSHPort,
Lima's .ssh.localPort), under a lock so two VMs can't choose the same
one, and checked free by a bind as well as a connect. Other VMs'
forwarders reserve it, so none can take it while Lima boots, when
Lima's unpinned ssh would reach whatever has it.

Design note: the sandbox's binds, how they were found, the threat check.
e2e: the profile's rules, binds refused around Lima's rules, a taken
ssh port, a direct VM's recorded port.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 01:14:22 -07:00
..
2026-10-25 13:43:00 -06:00