ForkMicrosoftMicrosoftpublished Mar 10, 2026seen 2w

microsoft/vscode-sandbox-runtime

forked from anthropic-experimental/sandbox-runtime

Open original ↗

Captured source

source ↗

microsoft/vscode-sandbox-runtime

Description: A lightweight sandboxing tool for enforcing filesystem and network restrictions on arbitrary processes at the OS level, without requiring a container.

Language: TypeScript

License: Apache-2.0

Stars: 15

Forks: 0

Open issues: 1

Created: 2026-03-10T04:53:22Z

Pushed: 2026-07-10T05:49:59Z

Default branch: main

Fork: yes

Parent repository: anthropic-experimental/sandbox-runtime

Archived: no

README:

vscode-sandbox-runtime

This is an npm module and CLI for applying OS-level filesystem and network restrictions to arbitrary processes. This repository is a fork of Anthropic Sandbox Runtime, adapted for VS Code packaging and distribution.

How it works

  • Install the @vscode/sandbox-runtime package as a dependency or global CLI.
  • Configure filesystem and network restrictions in ~/.srt-settings.json, or pass a custom configuration with srt --settings .
  • Run commands through the srt CLI, or use the exported SandboxManager API to wrap commands programmatically.
  • The runtime applies native sandboxing primitives: sandbox-exec on macOS and bubblewrap/seccomp-based isolation on Linux.
  • Network access is mediated through local HTTP and SOCKS proxy helpers so allowed and denied domains can be enforced for the sandboxed process tree.

Usage example

Install the package and run a command through the sandbox:

npm install -g @vscode/sandbox-runtime

cat > ~/.srt-settings.json {
await SandboxManager.reset()
})

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Excerpt shown — open the source for the full document.