anthropics / anthropics/sandbox-runtime
srt leaks dotfiles and directories while running commands and when sigkilled
- Lingua principale
- TypeScript
- Stelle
- 5.2k
- Fork
- 439
- Merge medio
- 2g 9m
- PR unite (30g)
- 13
Descrizione
## Description
Running any command via `srt` generates numerous dotfiles/directories in the current working directory. These files exist during command execution and will stay if the srt command is terminated during execution (SIGKILL).
## Files Created
```
.bash_profile .claude .env .gitmodules .mcp.json .ripgreprc .vscode .zshrc
.bashrc config .gitconfig .idea .profile .zprofile
```
## Reproduction Steps
1. Create empty directory with only `srt-settings.json`
2. Run `srt --settings srt-settings.json "sleep 100" &; sleep 1; kill $!`
3. Check directory contents with `ls -a`
## Observed Behavior
All files listed above appear in working directory after command execution.
## Expected Behavior
`srt` should not create files and directories in working directory. These appear to be sandbox/container home directory files leaking into host working directory.
## Environment
- **OS**: Ubuntu 24.04.3 LTS (Noble Numbat)
- **Kernel**: 6.8.0-100-generic x86_64
- **srt version**: 0.0.37 (`cat ~/.npm_global/lib/node_modules/@anthropic-ai/sandbox-runtime`)
## Configuration
### srt-settings.json
```json
{
"network": {
"allowedDomains": [
"github.com",
"*.github.com",
"lfs.github.com",
"api.github.com",
"npmjs.org",
"*.npmjs.org"
],
"deniedDomains": [
"malicious.com"
],
"allowUnixSockets": [
"/var/run/docker.sock"
],
"allowLocalBinding": false
},
"filesystem": {
"denyRead": [
"~/.ssh"
],
"allowWrite": [
".",
"src/",
"test/",
"/tmp"
],
"denyWrite": [
".env",
"config/production.json"
]
},
"ignoreViolations": {
"*": [
"/usr/bin",
"/System"
],
"git push": [
"/usr/bin/nc"
],
"npm": [
"/private/tmp"
]
},
"enableWeakerNestedSandbox": false
}
```
### AppArmor Profile (`/etc/apparmor.d/bwrap`)
```
abi ,
include
profile bwrap /usr/bin/bwrap flags=(unconfined) {
userns,
# Site-specific additions and overrides. See local/README for details.
include if exists
}
```
Bug was reintroduced in #126
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.