@bramvanoploo/sandbox-runtime 0.0.0-stage → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +93 -2
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +285 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/sandbox/credential-decode.d.ts +87 -0
- package/dist/sandbox/credential-decode.d.ts.map +1 -0
- package/dist/sandbox/credential-decode.js +143 -0
- package/dist/sandbox/credential-decode.js.map +1 -0
- package/dist/sandbox/credential-extract.d.ts +67 -0
- package/dist/sandbox/credential-extract.d.ts.map +1 -0
- package/dist/sandbox/credential-extract.js +122 -0
- package/dist/sandbox/credential-extract.js.map +1 -0
- package/dist/sandbox/credential-mask-env.d.ts +33 -0
- package/dist/sandbox/credential-mask-env.d.ts.map +1 -0
- package/dist/sandbox/credential-mask-env.js +155 -0
- package/dist/sandbox/credential-mask-env.js.map +1 -0
- package/dist/sandbox/credential-mask-files.d.ts +120 -0
- package/dist/sandbox/credential-mask-files.d.ts.map +1 -0
- package/dist/sandbox/credential-mask-files.js +285 -0
- package/dist/sandbox/credential-mask-files.js.map +1 -0
- package/dist/sandbox/credential-sentinel.d.ts +88 -0
- package/dist/sandbox/credential-sentinel.d.ts.map +1 -0
- package/dist/sandbox/credential-sentinel.js +177 -0
- package/dist/sandbox/credential-sentinel.js.map +1 -0
- package/dist/sandbox/domain-pattern.d.ts +36 -0
- package/dist/sandbox/domain-pattern.d.ts.map +1 -0
- package/dist/sandbox/domain-pattern.js +60 -0
- package/dist/sandbox/domain-pattern.js.map +1 -0
- package/dist/sandbox/generate-seccomp-filter.d.ts +20 -0
- package/dist/sandbox/generate-seccomp-filter.d.ts.map +1 -0
- package/dist/sandbox/generate-seccomp-filter.js +168 -0
- package/dist/sandbox/generate-seccomp-filter.js.map +1 -0
- package/dist/sandbox/http-proxy.d.ts +85 -0
- package/dist/sandbox/http-proxy.d.ts.map +1 -0
- package/dist/sandbox/http-proxy.js +379 -0
- package/dist/sandbox/http-proxy.js.map +1 -0
- package/dist/sandbox/linux-sandbox-utils.d.ts +162 -0
- package/dist/sandbox/linux-sandbox-utils.d.ts.map +1 -0
- package/dist/sandbox/linux-sandbox-utils.js +1179 -0
- package/dist/sandbox/linux-sandbox-utils.js.map +1 -0
- package/dist/sandbox/linux-violation-monitor.d.ts +48 -0
- package/dist/sandbox/linux-violation-monitor.d.ts.map +1 -0
- package/dist/sandbox/linux-violation-monitor.js +168 -0
- package/dist/sandbox/linux-violation-monitor.js.map +1 -0
- package/dist/sandbox/listen-in-range.d.ts +12 -0
- package/dist/sandbox/listen-in-range.d.ts.map +1 -0
- package/dist/sandbox/listen-in-range.js +43 -0
- package/dist/sandbox/listen-in-range.js.map +1 -0
- package/dist/sandbox/macos-sandbox-utils.d.ts +57 -0
- package/dist/sandbox/macos-sandbox-utils.d.ts.map +1 -0
- package/dist/sandbox/macos-sandbox-utils.js +810 -0
- package/dist/sandbox/macos-sandbox-utils.js.map +1 -0
- package/dist/sandbox/mitm-ca.d.ts +112 -0
- package/dist/sandbox/mitm-ca.d.ts.map +1 -0
- package/dist/sandbox/mitm-ca.js +380 -0
- package/dist/sandbox/mitm-ca.js.map +1 -0
- package/dist/sandbox/mitm-leaf.d.ts +28 -0
- package/dist/sandbox/mitm-leaf.d.ts.map +1 -0
- package/dist/sandbox/mitm-leaf.js +132 -0
- package/dist/sandbox/mitm-leaf.js.map +1 -0
- package/dist/sandbox/mux-proxy.d.ts +59 -0
- package/dist/sandbox/mux-proxy.d.ts.map +1 -0
- package/dist/sandbox/mux-proxy.js +161 -0
- package/dist/sandbox/mux-proxy.js.map +1 -0
- package/dist/sandbox/parent-proxy.d.ts +118 -0
- package/dist/sandbox/parent-proxy.d.ts.map +1 -0
- package/dist/sandbox/parent-proxy.js +469 -0
- package/dist/sandbox/parent-proxy.js.map +1 -0
- package/dist/sandbox/request-filter.d.ts +56 -0
- package/dist/sandbox/request-filter.d.ts.map +1 -0
- package/dist/sandbox/request-filter.js +109 -0
- package/dist/sandbox/request-filter.js.map +1 -0
- package/dist/sandbox/sandbox-config.d.ts +1347 -0
- package/dist/sandbox/sandbox-config.d.ts.map +1 -0
- package/dist/sandbox/sandbox-config.js +917 -0
- package/dist/sandbox/sandbox-config.js.map +1 -0
- package/dist/sandbox/sandbox-manager.d.ts +48 -0
- package/dist/sandbox/sandbox-manager.d.ts.map +1 -0
- package/dist/sandbox/sandbox-manager.js +1498 -0
- package/dist/sandbox/sandbox-manager.js.map +1 -0
- package/dist/sandbox/sandbox-schemas.d.ts +90 -0
- package/dist/sandbox/sandbox-schemas.d.ts.map +1 -0
- package/dist/sandbox/sandbox-schemas.js +3 -0
- package/dist/sandbox/sandbox-schemas.js.map +1 -0
- package/dist/sandbox/sandbox-temp-dir.d.ts +9 -0
- package/dist/sandbox/sandbox-temp-dir.d.ts.map +1 -0
- package/dist/sandbox/sandbox-temp-dir.js +73 -0
- package/dist/sandbox/sandbox-temp-dir.js.map +1 -0
- package/dist/sandbox/sandbox-utils.d.ts +121 -0
- package/dist/sandbox/sandbox-utils.d.ts.map +1 -0
- package/dist/sandbox/sandbox-utils.js +642 -0
- package/dist/sandbox/sandbox-utils.js.map +1 -0
- package/dist/sandbox/sandbox-violation-store.d.ts +19 -0
- package/dist/sandbox/sandbox-violation-store.d.ts.map +1 -0
- package/dist/sandbox/sandbox-violation-store.js +57 -0
- package/dist/sandbox/sandbox-violation-store.js.map +1 -0
- package/dist/sandbox/socks-proxy.d.ts +38 -0
- package/dist/sandbox/socks-proxy.d.ts.map +1 -0
- package/dist/sandbox/socks-proxy.js +123 -0
- package/dist/sandbox/socks-proxy.js.map +1 -0
- package/dist/sandbox/tls-terminate-proxy.d.ts +63 -0
- package/dist/sandbox/tls-terminate-proxy.d.ts.map +1 -0
- package/dist/sandbox/tls-terminate-proxy.js +332 -0
- package/dist/sandbox/tls-terminate-proxy.js.map +1 -0
- package/dist/sandbox/windows-sandbox-utils.d.ts +625 -0
- package/dist/sandbox/windows-sandbox-utils.d.ts.map +1 -0
- package/dist/sandbox/windows-sandbox-utils.js +982 -0
- package/dist/sandbox/windows-sandbox-utils.js.map +1 -0
- package/dist/utils/config-loader.d.ts +24 -0
- package/dist/utils/config-loader.d.ts.map +1 -0
- package/dist/utils/config-loader.js +65 -0
- package/dist/utils/config-loader.js.map +1 -0
- package/dist/utils/debug.d.ts +7 -0
- package/dist/utils/debug.d.ts.map +1 -0
- package/dist/utils/debug.js +25 -0
- package/dist/utils/debug.js.map +1 -0
- package/dist/utils/platform.d.ts +15 -0
- package/dist/utils/platform.d.ts.map +1 -0
- package/dist/utils/platform.js +52 -0
- package/dist/utils/platform.js.map +1 -0
- package/dist/utils/shell-quote.d.ts +27 -0
- package/dist/utils/shell-quote.d.ts.map +1 -0
- package/dist/utils/shell-quote.js +47 -0
- package/dist/utils/shell-quote.js.map +1 -0
- package/dist/utils/which.d.ts +9 -0
- package/dist/utils/which.d.ts.map +1 -0
- package/dist/utils/which.js +28 -0
- package/dist/utils/which.js.map +1 -0
- package/package.json +85 -4
- package/vendor/seccomp/x64/apply-seccomp +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2025 Anthropic
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,94 @@
|
|
|
1
|
-
#
|
|
1
|
+
# sandbox-runtime (`srt`)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Lightweight OS-level sandboxing for enforcing filesystem and network restrictions on arbitrary processes, CLI commands, AI agents, and local MCP servers — without requiring a container.
|
|
4
|
+
|
|
5
|
+
- **macOS:** `sandbox-exec` with dynamically generated Seatbelt profiles
|
|
6
|
+
- **Linux:** `bubblewrap` (`bwrap`) with network namespace isolation and `seccomp` BPF Unix socket filtering
|
|
7
|
+
- **Windows (alpha):** dedicated `srt-sandbox` account with Windows Filtering Platform (WFP) egress fencing and NTFS ACLs
|
|
8
|
+
|
|
9
|
+
## Key Capabilities
|
|
10
|
+
|
|
11
|
+
- **Filesystem restrictions:** control which paths processes can read and write
|
|
12
|
+
- **Network restrictions:** allowlist/denylist domains via local HTTP and SOCKS5 proxies
|
|
13
|
+
- **Unix socket restrictions:** block or selectively allow local IPC sockets
|
|
14
|
+
- **Violation monitoring:** real-time blocked-access alerts on macOS (`SandboxViolationStore`)
|
|
15
|
+
|
|
16
|
+
## Prerequisites
|
|
17
|
+
|
|
18
|
+
- **macOS:** No additional dependencies.
|
|
19
|
+
- **Linux:** `bubblewrap` and `socat` on your `PATH` (e.g. `apt-get install bubblewrap socat`, `dnf install bubblewrap socat`, or `pacman -S bubblewrap socat`).
|
|
20
|
+
- *Ubuntu 24.04+:* if unprivileged user namespaces are restricted by AppArmor, run `sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0` or add an AppArmor profile granting `userns`.
|
|
21
|
+
- **Windows (alpha):** No external dependencies, but requires a one-time elevated `windows-install` step (see [Windows Support](./documentation/windows.md)).
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install -g @bramvanoploo/sandbox-runtime
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Or install as a library dependency in your project:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install @bramvanoploo/sandbox-runtime
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Quick Start
|
|
36
|
+
|
|
37
|
+
### CLI (`srt`)
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Network restrictions (allowlisted domains only)
|
|
41
|
+
srt "curl https://example.com"
|
|
42
|
+
|
|
43
|
+
# Filesystem restrictions (e.g. ~/.ssh blocked via ~/.srt-settings.json)
|
|
44
|
+
srt "cat ~/.ssh/id_rsa"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Library
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
import {
|
|
51
|
+
SandboxManager,
|
|
52
|
+
type SandboxRuntimeConfig,
|
|
53
|
+
} from '@bramvanoploo/sandbox-runtime'
|
|
54
|
+
import { spawn } from 'child_process'
|
|
55
|
+
|
|
56
|
+
const config: SandboxRuntimeConfig = {
|
|
57
|
+
network: {
|
|
58
|
+
allowedDomains: ['example.com'],
|
|
59
|
+
deniedDomains: [],
|
|
60
|
+
},
|
|
61
|
+
filesystem: {
|
|
62
|
+
denyRead: ['~/.ssh'],
|
|
63
|
+
allowWrite: ['.', '/tmp'],
|
|
64
|
+
denyWrite: ['.env'],
|
|
65
|
+
},
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
await SandboxManager.initialize(config)
|
|
69
|
+
const cmd = await SandboxManager.wrapWithSandbox('curl https://example.com')
|
|
70
|
+
|
|
71
|
+
const child = spawn(cmd, { shell: true, stdio: 'inherit' })
|
|
72
|
+
child.on('exit', async () => {
|
|
73
|
+
await SandboxManager.reset()
|
|
74
|
+
})
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
For multi-session processes on macOS/Linux, use `createSandboxManager()` to isolate proxy ports, permissions, and violation stores per session.
|
|
78
|
+
|
|
79
|
+
## Documentation
|
|
80
|
+
|
|
81
|
+
- [Configuration](./documentation/configuration.md) — `~/.srt-settings.json`, network/filesystem rules, TLS termination, platform options, and recipes
|
|
82
|
+
- [Usage & API](./documentation/usage.md) — CLI flags, library API, independent sessions, MCP server sandboxing, and troubleshooting tips
|
|
83
|
+
- [Architecture & Security](./documentation/architecture-and-security.md) — OS isolation model, Linux seccomp filtering, violation monitoring, and security limitations
|
|
84
|
+
- [Windows Support (Alpha)](./documentation/windows.md) — setup, WFP/NTFS security model, TLS termination, configuration, limitations, and uninstall
|
|
85
|
+
- [Development](./documentation/development.md) — local build, tests, linting, seccomp binaries, and source layout
|
|
86
|
+
|
|
87
|
+
## Credits & Acknowledgements
|
|
88
|
+
|
|
89
|
+
- **Fork base:** [`carderne/sandbox-runtime`](https://github.com/carderne/sandbox-runtime) ([`@carderne/sandbox-runtime`](https://www.npmjs.com/package/@carderne/sandbox-runtime)) by **Chris Arderne** (`@carderne`), which this fork is based on.
|
|
90
|
+
- **Original upstream project:** [`anthropic-experimental/sandbox-runtime`](https://github.com/anthropic-experimental/sandbox-runtime) ([`@anthropic-ai/sandbox-runtime`](https://www.npmjs.com/package/@anthropic-ai/sandbox-runtime)) by **Anthropic PBC**, Apache-2.0 License.
|
|
91
|
+
|
|
92
|
+
## License
|
|
93
|
+
|
|
94
|
+
[Apache-2.0](./LICENSE)
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { quote } from './utils/shell-quote.js';
|
|
4
|
+
import { Command } from 'commander';
|
|
5
|
+
import { SandboxManager } from './index.js';
|
|
6
|
+
import { spawn } from 'child_process';
|
|
7
|
+
import { logForDebugging } from './utils/debug.js';
|
|
8
|
+
import { loadConfigFromString, loadConfigWithStatus, } from './utils/config-loader.js';
|
|
9
|
+
import * as readline from 'readline';
|
|
10
|
+
import * as fs from 'fs';
|
|
11
|
+
import * as path from 'path';
|
|
12
|
+
import * as os from 'os';
|
|
13
|
+
/**
|
|
14
|
+
* Get default config path
|
|
15
|
+
*/
|
|
16
|
+
function getDefaultConfigPath() {
|
|
17
|
+
return path.join(os.homedir(), '.srt-settings.json');
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Create a minimal default config if no config file exists
|
|
21
|
+
*/
|
|
22
|
+
function getDefaultConfig() {
|
|
23
|
+
return {
|
|
24
|
+
network: {
|
|
25
|
+
allowedDomains: [],
|
|
26
|
+
deniedDomains: [],
|
|
27
|
+
},
|
|
28
|
+
filesystem: {
|
|
29
|
+
denyRead: [],
|
|
30
|
+
allowRead: [],
|
|
31
|
+
allowWrite: [],
|
|
32
|
+
denyWrite: [],
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function getCliVersion() {
|
|
37
|
+
try {
|
|
38
|
+
const require = createRequire(import.meta.url);
|
|
39
|
+
const pkg = require('../package.json');
|
|
40
|
+
if (pkg.version)
|
|
41
|
+
return pkg.version;
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
// Fallback if package.json cannot be resolved
|
|
45
|
+
}
|
|
46
|
+
return process.env.npm_package_version || '0.0.0';
|
|
47
|
+
}
|
|
48
|
+
async function main() {
|
|
49
|
+
const program = new Command();
|
|
50
|
+
program
|
|
51
|
+
.name('srt')
|
|
52
|
+
.description('Run commands in a sandbox with network and filesystem restrictions')
|
|
53
|
+
.version(getCliVersion());
|
|
54
|
+
// ── Windows install/uninstall ─────────────────────────────────
|
|
55
|
+
// Self-elevating one-shot install (one UAC prompt). Also
|
|
56
|
+
// available programmatically as installWindowsSandbox().
|
|
57
|
+
program
|
|
58
|
+
.command('windows-install')
|
|
59
|
+
.description('Windows: provision the `srt-sandbox` user account + install WFP ' +
|
|
60
|
+
'filters (one UAC prompt). No logout needed.')
|
|
61
|
+
.option('--sublayer-guid <guid>', 'WFP sublayer GUID')
|
|
62
|
+
.option('--proxy-port-range <lo-hi>', 'loopback PERMIT port range (e.g. 60080-60089)')
|
|
63
|
+
.option('--sandbox-user <name>', 'name for the sandbox user account (default: srt-sandbox)')
|
|
64
|
+
.option('--force', 'replace an existing install with different config')
|
|
65
|
+
.action(async (o) => {
|
|
66
|
+
const { installWindowsSandbox } = await import('./sandbox/windows-sandbox-utils.js');
|
|
67
|
+
let range;
|
|
68
|
+
if (typeof o.proxyPortRange === 'string') {
|
|
69
|
+
const match = /^(\d+)-(\d+)$/.exec(o.proxyPortRange.trim());
|
|
70
|
+
if (!match) {
|
|
71
|
+
console.error(`Error: Invalid --proxy-port-range ${JSON.stringify(o.proxyPortRange)} (expected "<lo>-<hi>")`);
|
|
72
|
+
process.exit(1);
|
|
73
|
+
}
|
|
74
|
+
range = [Number(match[1]), Number(match[2])];
|
|
75
|
+
}
|
|
76
|
+
try {
|
|
77
|
+
const r = installWindowsSandbox({
|
|
78
|
+
sublayerGuid: o.sublayerGuid,
|
|
79
|
+
proxyPortRange: range,
|
|
80
|
+
sandboxUser: o.sandboxUser,
|
|
81
|
+
force: Boolean(o.force),
|
|
82
|
+
});
|
|
83
|
+
if (r.cancelled) {
|
|
84
|
+
console.error('Install cancelled at the UAC prompt. Nothing changed.');
|
|
85
|
+
process.exit(2);
|
|
86
|
+
}
|
|
87
|
+
console.log(`Installed.\n` +
|
|
88
|
+
` sandbox user: ${r.user.provisioned ? 'provisioned' : 'MISSING'}` +
|
|
89
|
+
(r.user.sid ? ` (${r.user.sid})` : '') +
|
|
90
|
+
`\n` +
|
|
91
|
+
` WFP: ${r.wfp.state}, ${r.wfp.filters} filters` +
|
|
92
|
+
(r.wfp.portRange
|
|
93
|
+
? `, port range ${r.wfp.portRange[0]}-${r.wfp.portRange[1]}`
|
|
94
|
+
: '') +
|
|
95
|
+
`\n\n` +
|
|
96
|
+
`No logout needed — the WFP filter keys on the dedicated ` +
|
|
97
|
+
`\`srt-sandbox\` user's SID, so your network is unaffected.`);
|
|
98
|
+
}
|
|
99
|
+
catch (e) {
|
|
100
|
+
console.error(`Error: ${e.message}`);
|
|
101
|
+
process.exit(1);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
program
|
|
105
|
+
.command('windows-uninstall')
|
|
106
|
+
.description('Windows: remove WFP filters + the `srt-sandbox` account (one UAC prompt).')
|
|
107
|
+
.option('--sublayer-guid <guid>', 'WFP sublayer GUID')
|
|
108
|
+
.action(async (o) => {
|
|
109
|
+
const { uninstallWindowsSandbox } = await import('./sandbox/windows-sandbox-utils.js');
|
|
110
|
+
try {
|
|
111
|
+
const r = uninstallWindowsSandbox({ sublayerGuid: o.sublayerGuid });
|
|
112
|
+
if (r.cancelled) {
|
|
113
|
+
console.error('Uninstall cancelled at the UAC prompt.');
|
|
114
|
+
process.exit(2);
|
|
115
|
+
}
|
|
116
|
+
console.log('WFP filters and `srt-sandbox` account removed.');
|
|
117
|
+
}
|
|
118
|
+
catch (e) {
|
|
119
|
+
console.error(`Error: ${e.message}`);
|
|
120
|
+
process.exit(1);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
// Default command - run command in sandbox
|
|
124
|
+
program
|
|
125
|
+
.argument('[command...]', 'command to run in the sandbox')
|
|
126
|
+
.option('-d, --debug', 'enable debug logging')
|
|
127
|
+
.option('-s, --settings <path>', 'path to config file (default: ~/.srt-settings.json)')
|
|
128
|
+
.option('-c <command>', 'run command string directly (like sh -c), no escaping applied')
|
|
129
|
+
.option('--control-fd <fd>', 'read config updates from file descriptor (JSON lines protocol)', parseInt)
|
|
130
|
+
.allowUnknownOption()
|
|
131
|
+
.action(async (commandArgs, options) => {
|
|
132
|
+
try {
|
|
133
|
+
// Enable debug logging if requested. logForDebugging() reads
|
|
134
|
+
// SRT_DEBUG (not DEBUG, to avoid clashing with the npm `debug`
|
|
135
|
+
// package and other tools) — keep this in sync with utils/debug.ts.
|
|
136
|
+
if (options.debug) {
|
|
137
|
+
process.env.SRT_DEBUG = 'true';
|
|
138
|
+
}
|
|
139
|
+
// Load config from file. Always fail closed when an existing file
|
|
140
|
+
// is malformed or fails validation, even at the default path.
|
|
141
|
+
const configPath = options.settings || getDefaultConfigPath();
|
|
142
|
+
const loaded = loadConfigWithStatus(configPath);
|
|
143
|
+
let runtimeConfig;
|
|
144
|
+
if (loaded.status === 'ok') {
|
|
145
|
+
runtimeConfig = loaded.config;
|
|
146
|
+
}
|
|
147
|
+
else if (loaded.status === 'invalid' || options.settings) {
|
|
148
|
+
console.error(`Error: Could not load settings from ${configPath} (missing, unreadable, or invalid). ` +
|
|
149
|
+
'Refusing to run with the default config.');
|
|
150
|
+
process.exit(1);
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
logForDebugging(`No config found at ${configPath}, using default config`);
|
|
154
|
+
runtimeConfig = getDefaultConfig();
|
|
155
|
+
}
|
|
156
|
+
// Initialize sandbox with config
|
|
157
|
+
logForDebugging('Initializing sandbox...');
|
|
158
|
+
await SandboxManager.initialize(runtimeConfig);
|
|
159
|
+
// Set up control fd for dynamic config updates if specified
|
|
160
|
+
let controlReader = null;
|
|
161
|
+
if (options.controlFd !== undefined) {
|
|
162
|
+
try {
|
|
163
|
+
const controlStream = fs.createReadStream('', {
|
|
164
|
+
fd: options.controlFd,
|
|
165
|
+
});
|
|
166
|
+
controlReader = readline.createInterface({
|
|
167
|
+
input: controlStream,
|
|
168
|
+
crlfDelay: Infinity,
|
|
169
|
+
});
|
|
170
|
+
controlReader.on('line', line => {
|
|
171
|
+
const newConfig = loadConfigFromString(line);
|
|
172
|
+
if (newConfig) {
|
|
173
|
+
logForDebugging(`Config updated from control fd: ${JSON.stringify(newConfig)}`);
|
|
174
|
+
SandboxManager.updateConfig(newConfig);
|
|
175
|
+
}
|
|
176
|
+
else if (line.trim()) {
|
|
177
|
+
// Only log non-empty lines that failed to parse
|
|
178
|
+
logForDebugging(`Invalid config on control fd (ignored): ${line}`);
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
controlReader.on('error', err => {
|
|
182
|
+
logForDebugging(`Control fd error: ${err.message}`);
|
|
183
|
+
});
|
|
184
|
+
logForDebugging(`Listening for config updates on fd ${options.controlFd}`);
|
|
185
|
+
}
|
|
186
|
+
catch (err) {
|
|
187
|
+
logForDebugging(`Failed to open control fd ${options.controlFd}: ${err instanceof Error ? err.message : String(err)}`);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
// Cleanup control reader on exit
|
|
191
|
+
process.on('exit', () => {
|
|
192
|
+
controlReader?.close();
|
|
193
|
+
});
|
|
194
|
+
let child;
|
|
195
|
+
if (process.platform === 'win32') {
|
|
196
|
+
let winCommand;
|
|
197
|
+
if (options.c) {
|
|
198
|
+
winCommand = options.c;
|
|
199
|
+
logForDebugging(`Command string mode (-c): ${winCommand}`);
|
|
200
|
+
}
|
|
201
|
+
else if (commandArgs.length > 0) {
|
|
202
|
+
// On Windows, cmd.exe /d /s /c treats POSIX single quotes as
|
|
203
|
+
// literal characters; quote each argument with double quotes
|
|
204
|
+
// and cmd metacharacter escaping.
|
|
205
|
+
winCommand = commandArgs
|
|
206
|
+
.map(arg => /[\s"&|<>^()%!]/.test(arg)
|
|
207
|
+
? `"${arg.replace(/"/g, '""')}"`
|
|
208
|
+
: arg)
|
|
209
|
+
.join(' ');
|
|
210
|
+
logForDebugging(`Original command (win32): ${winCommand}`);
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
console.error('Error: No command specified. Use -c <command> or provide command arguments.');
|
|
214
|
+
process.exit(1);
|
|
215
|
+
}
|
|
216
|
+
// env carries the proxy vars the sandboxed child must inherit.
|
|
217
|
+
const { argv, env } = await SandboxManager.wrapWithSandboxArgv(winCommand);
|
|
218
|
+
child = spawn(argv[0], argv.slice(1), {
|
|
219
|
+
shell: false,
|
|
220
|
+
stdio: 'inherit',
|
|
221
|
+
env,
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
let command;
|
|
226
|
+
if (options.c) {
|
|
227
|
+
command = options.c;
|
|
228
|
+
logForDebugging(`Command string mode (-c): ${command}`);
|
|
229
|
+
}
|
|
230
|
+
else if (commandArgs.length > 0) {
|
|
231
|
+
command = quote(commandArgs);
|
|
232
|
+
logForDebugging(`Original command: ${command}`);
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
console.error('Error: No command specified. Use -c <command> or provide command arguments.');
|
|
236
|
+
process.exit(1);
|
|
237
|
+
}
|
|
238
|
+
logForDebugging(JSON.stringify(SandboxManager.getNetworkRestrictionConfig(), null, 2));
|
|
239
|
+
const sandboxedCommand = await SandboxManager.wrapWithSandbox(command);
|
|
240
|
+
child = spawn(sandboxedCommand, {
|
|
241
|
+
shell: true,
|
|
242
|
+
stdio: 'inherit',
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
// Handle process exit
|
|
246
|
+
child.on('exit', async (code, signal) => {
|
|
247
|
+
// Clean up bwrap mount point artifacts and await async session
|
|
248
|
+
// teardown (unix sockets, CA temp dirs, masked file store).
|
|
249
|
+
SandboxManager.cleanupAfterCommand();
|
|
250
|
+
await SandboxManager.reset();
|
|
251
|
+
if (signal) {
|
|
252
|
+
if (signal === 'SIGINT' || signal === 'SIGTERM') {
|
|
253
|
+
process.exit(0);
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
console.error(`Process killed by signal: ${signal}`);
|
|
257
|
+
process.exit(1);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
process.exit(code ?? 0);
|
|
261
|
+
});
|
|
262
|
+
child.on('error', error => {
|
|
263
|
+
console.error(`Failed to execute command: ${error.message}`);
|
|
264
|
+
process.exit(1);
|
|
265
|
+
});
|
|
266
|
+
// Handle cleanup on interrupt
|
|
267
|
+
process.on('SIGINT', () => {
|
|
268
|
+
child.kill('SIGINT');
|
|
269
|
+
});
|
|
270
|
+
process.on('SIGTERM', () => {
|
|
271
|
+
child.kill('SIGTERM');
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
catch (error) {
|
|
275
|
+
console.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
|
|
276
|
+
process.exit(1);
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
program.parse();
|
|
280
|
+
}
|
|
281
|
+
main().catch(error => {
|
|
282
|
+
console.error('Fatal error:', error);
|
|
283
|
+
process.exit(1);
|
|
284
|
+
});
|
|
285
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAE3C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAA;AACpC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AAExB;;GAEG;AACH,SAAS,oBAAoB;IAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,oBAAoB,CAAC,CAAA;AACtD,CAAC;AAED;;GAEG;AACH,SAAS,gBAAgB;IACvB,OAAO;QACL,OAAO,EAAE;YACP,cAAc,EAAE,EAAE;YAClB,aAAa,EAAE,EAAE;SAClB;QACD,UAAU,EAAE;YACV,QAAQ,EAAE,EAAE;YACZ,SAAS,EAAE,EAAE;YACb,UAAU,EAAE,EAAE;YACd,SAAS,EAAE,EAAE;SACd;KACF,CAAA;AACH,CAAC;AAED,SAAS,aAAa;IACpB,IAAI,CAAC;QACH,MAAM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K,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;gBACxB,OAAO,CAAC,KAAK,CAAC,8BAA8B,KAAK,CAAC,OAAO,EAAE,CAAC,CAAA;gBAC5D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;YACjB,CAAC,CAAC,CAAA;YAEF,8BAA8B;YAC9B,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;gBACxB,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;YACtB,CAAC,CAAC,CAAA;YAEF,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE;gBACzB,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;YACvB,CAAC,CAAC,CAAA;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CACX,UAAU,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CACnE,CAAA;YACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACjB,CAAC;IACH,CAAC,CACF,CAAA;IAEH,OAAO,CAAC,KAAK,EAAE,CAAA;AACjB,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAA;IACpC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC,CAAC,CAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { SandboxManager, createSandboxManager, type ISandboxManager, } from './sandbox/sandbox-manager.js';
|
|
2
|
+
export { SandboxViolationStore } from './sandbox/sandbox-violation-store.js';
|
|
3
|
+
export type { SandboxRuntimeConfig, NetworkConfig, FilesystemConfig, CredentialsConfig, CredentialFileConfig, CredentialEnvVarConfig, CredentialMode, IgnoreViolationsConfig, } from './sandbox/sandbox-config.js';
|
|
4
|
+
export { SandboxRuntimeConfigSchema, NetworkConfigSchema, FilesystemConfigSchema, CredentialsConfigSchema, IgnoreViolationsConfigSchema, } from './sandbox/sandbox-config.js';
|
|
5
|
+
export type { SandboxAskCallback, FsReadRestrictionConfig, FsWriteRestrictionConfig, CredentialRestrictionConfig, NetworkRestrictionConfig, NetworkHostPattern, } from './sandbox/sandbox-schemas.js';
|
|
6
|
+
export type { FilterRequestCallback, RequestDecision, MutateForwardedHeaders, } from './sandbox/request-filter.js';
|
|
7
|
+
export type { SandboxViolationEvent } from './sandbox/macos-sandbox-utils.js';
|
|
8
|
+
export { type SandboxDependencyCheck } from './sandbox/linux-sandbox-utils.js';
|
|
9
|
+
export { getSrtWinPath, resolveSrtWin, getWindowsWfpStatus, verifyWindowsWfpEgress, getWindowsSandboxUserStatus, getWindowsSandboxCaCert, windowsTrustCa, installWindowsSandbox, uninstallWindowsSandbox, windowsInstallInstructions, stampWindowsAcl, restoreWindowsAcl, grantWindowsAcl, revokeWindowsAcl, expandWindowsFsPaths, buildGitConfigEnv, parseWindowsBinShell, DEFAULT_WINDOWS_PROXY_PORT_RANGE, SRT_WIN_DISPATCH_ARG1, } from './sandbox/windows-sandbox-utils.js';
|
|
10
|
+
export type { WindowsBinShell, WindowsInstallOptions, WindowsInstallResult, WindowsWfpStatus, WindowsAclStampOptions, WindowsAclGrantOptions, WindowsAclAceOutcome, WindowsWfpStatusResult, WindowsWfpVerifyResult, WindowsSandboxUserStatus, SrtWinSpawn, } from './sandbox/windows-sandbox-utils.js';
|
|
11
|
+
export type { WindowsConfig, SrtWinConfig } from './sandbox/sandbox-config.js';
|
|
12
|
+
export { WindowsConfigSchema, SrtWinConfigSchema, } from './sandbox/sandbox-config.js';
|
|
13
|
+
export { getDefaultWritePaths } from './sandbox/sandbox-utils.js';
|
|
14
|
+
export { getWslVersion } from './utils/platform.js';
|
|
15
|
+
export type { Platform } from './utils/platform.js';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,KAAK,eAAe,GACrB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAA;AAG5E,YAAY,EACV,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,cAAc,EACd,sBAAsB,GACvB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EACL,0BAA0B,EAC1B,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,4BAA4B,GAC7B,MAAM,6BAA6B,CAAA;AAGpC,YAAY,EACV,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,EACxB,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,8BAA8B,CAAA;AAGrC,YAAY,EACV,qBAAqB,EACrB,eAAe,EACf,sBAAsB,GACvB,MAAM,6BAA6B,CAAA;AAGpC,YAAY,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;AAC7E,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,kCAAkC,CAAA;AAG9E,OAAO,EACL,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,uBAAuB,EACvB,cAAc,EACd,qBAAqB,EACrB,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,gCAAgC,EAChC,qBAAqB,GACtB,MAAM,oCAAoC,CAAA;AAC3C,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,WAAW,GACZ,MAAM,oCAAoC,CAAA;AAC3C,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC9E,OAAO,EACL,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,6BAA6B,CAAA;AAGpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAGjE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,YAAY,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Library exports
|
|
2
|
+
export { SandboxManager, createSandboxManager, } from './sandbox/sandbox-manager.js';
|
|
3
|
+
export { SandboxViolationStore } from './sandbox/sandbox-violation-store.js';
|
|
4
|
+
export { SandboxRuntimeConfigSchema, NetworkConfigSchema, FilesystemConfigSchema, CredentialsConfigSchema, IgnoreViolationsConfigSchema, } from './sandbox/sandbox-config.js';
|
|
5
|
+
// Windows install/status API
|
|
6
|
+
export { getSrtWinPath, resolveSrtWin, getWindowsWfpStatus, verifyWindowsWfpEgress, getWindowsSandboxUserStatus, getWindowsSandboxCaCert, windowsTrustCa, installWindowsSandbox, uninstallWindowsSandbox, windowsInstallInstructions, stampWindowsAcl, restoreWindowsAcl, grantWindowsAcl, revokeWindowsAcl, expandWindowsFsPaths, buildGitConfigEnv, parseWindowsBinShell, DEFAULT_WINDOWS_PROXY_PORT_RANGE, SRT_WIN_DISPATCH_ARG1, } from './sandbox/windows-sandbox-utils.js';
|
|
7
|
+
export { WindowsConfigSchema, SrtWinConfigSchema, } from './sandbox/sandbox-config.js';
|
|
8
|
+
// Utility functions
|
|
9
|
+
export { getDefaultWritePaths } from './sandbox/sandbox-utils.js';
|
|
10
|
+
// Platform utilities
|
|
11
|
+
export { getWslVersion } from './utils/platform.js';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAClB,OAAO,EACL,cAAc,EACd,oBAAoB,GAErB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAA;AAc5E,OAAO,EACL,0BAA0B,EAC1B,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,4BAA4B,GAC7B,MAAM,6BAA6B,CAAA;AAuBpC,6BAA6B;AAC7B,OAAO,EACL,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,uBAAuB,EACvB,cAAc,EACd,qBAAqB,EACrB,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,gCAAgC,EAChC,qBAAqB,GACtB,MAAM,oCAAoC,CAAA;AAe3C,OAAO,EACL,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,6BAA6B,CAAA;AAEpC,oBAAoB;AACpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAEjE,qBAAqB;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA"}
|