anthropics / anthropics/sandbox-runtime

Windows WFP verification fails from protected installs with 0x80070005

Open
#396 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
5.2k
Forks
439
Avg merge
2d 9m
Merged PRs (30d)
13

Description

## 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.