anthropics / anthropics/sandbox-runtime

Windows WFP verification fails from protected installs with 0x80070005

Aperta
#396 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
5.2k
Fork
439
Merge medio
2g 9m
PR unite (30g)
13

Descrizione

## Summary

On native Windows, `verifyWindowsWfpEgress()` can fail before the egress probe starts when the sandbox account cannot read and execute the installed `srt-win.exe`.

The reported error is:

```text
WFP egress fence could not be verified — srt-win wfp verify exited 1
srt-win: error: spawn runner for egress probe:
CreateProcessWithLogonW(srt-sandbox): Access is denied. (0x80070005)
```

The message suggests checking Secondary Logon, but the service and sandbox account can both be healthy. The actual failure can be the file ACL on the protected package install.

## Reproduction

With the Windows sandbox installed, run:

```sh
node -e "(async()=>{try{const{verifyWindowsWfpEgress}=await import('@anthropic-ai/sandbox-runtime');await verifyWindowsWfpEgress({proxyPortRange:[60080,60089]});console.log('OK')}catch(e){console.log(String(e))}})()"
```

This reproduces when the sandbox account has no read/execute access to the resolved `srt-win.exe`.

Granting recursive RX to the whole package makes the probe work, which confirms the ACL cause, but that workaround is broader than necessary.

## Expected behavior

The verification path should:

1. grant the sandbox SID read/execute access only to the canonical `srt-win.exe`;
2. bind that grant to a dedicated holder whose lifetime follows the original parent process;
3. run the WFP probe from a safe Windows directory;
4. strictly revoke the temporary grant without disturbing existing session grants;
5. recover stale holder grants after a crash.

A companion pull request adds this least-privilege bootstrap and protected-path regression coverage.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.