@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.
Files changed (136) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +93 -2
  3. package/dist/cli.d.ts +3 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +285 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/index.d.ts +16 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +12 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/sandbox/credential-decode.d.ts +87 -0
  12. package/dist/sandbox/credential-decode.d.ts.map +1 -0
  13. package/dist/sandbox/credential-decode.js +143 -0
  14. package/dist/sandbox/credential-decode.js.map +1 -0
  15. package/dist/sandbox/credential-extract.d.ts +67 -0
  16. package/dist/sandbox/credential-extract.d.ts.map +1 -0
  17. package/dist/sandbox/credential-extract.js +122 -0
  18. package/dist/sandbox/credential-extract.js.map +1 -0
  19. package/dist/sandbox/credential-mask-env.d.ts +33 -0
  20. package/dist/sandbox/credential-mask-env.d.ts.map +1 -0
  21. package/dist/sandbox/credential-mask-env.js +155 -0
  22. package/dist/sandbox/credential-mask-env.js.map +1 -0
  23. package/dist/sandbox/credential-mask-files.d.ts +120 -0
  24. package/dist/sandbox/credential-mask-files.d.ts.map +1 -0
  25. package/dist/sandbox/credential-mask-files.js +285 -0
  26. package/dist/sandbox/credential-mask-files.js.map +1 -0
  27. package/dist/sandbox/credential-sentinel.d.ts +88 -0
  28. package/dist/sandbox/credential-sentinel.d.ts.map +1 -0
  29. package/dist/sandbox/credential-sentinel.js +177 -0
  30. package/dist/sandbox/credential-sentinel.js.map +1 -0
  31. package/dist/sandbox/domain-pattern.d.ts +36 -0
  32. package/dist/sandbox/domain-pattern.d.ts.map +1 -0
  33. package/dist/sandbox/domain-pattern.js +60 -0
  34. package/dist/sandbox/domain-pattern.js.map +1 -0
  35. package/dist/sandbox/generate-seccomp-filter.d.ts +20 -0
  36. package/dist/sandbox/generate-seccomp-filter.d.ts.map +1 -0
  37. package/dist/sandbox/generate-seccomp-filter.js +168 -0
  38. package/dist/sandbox/generate-seccomp-filter.js.map +1 -0
  39. package/dist/sandbox/http-proxy.d.ts +85 -0
  40. package/dist/sandbox/http-proxy.d.ts.map +1 -0
  41. package/dist/sandbox/http-proxy.js +379 -0
  42. package/dist/sandbox/http-proxy.js.map +1 -0
  43. package/dist/sandbox/linux-sandbox-utils.d.ts +162 -0
  44. package/dist/sandbox/linux-sandbox-utils.d.ts.map +1 -0
  45. package/dist/sandbox/linux-sandbox-utils.js +1179 -0
  46. package/dist/sandbox/linux-sandbox-utils.js.map +1 -0
  47. package/dist/sandbox/linux-violation-monitor.d.ts +48 -0
  48. package/dist/sandbox/linux-violation-monitor.d.ts.map +1 -0
  49. package/dist/sandbox/linux-violation-monitor.js +168 -0
  50. package/dist/sandbox/linux-violation-monitor.js.map +1 -0
  51. package/dist/sandbox/listen-in-range.d.ts +12 -0
  52. package/dist/sandbox/listen-in-range.d.ts.map +1 -0
  53. package/dist/sandbox/listen-in-range.js +43 -0
  54. package/dist/sandbox/listen-in-range.js.map +1 -0
  55. package/dist/sandbox/macos-sandbox-utils.d.ts +57 -0
  56. package/dist/sandbox/macos-sandbox-utils.d.ts.map +1 -0
  57. package/dist/sandbox/macos-sandbox-utils.js +810 -0
  58. package/dist/sandbox/macos-sandbox-utils.js.map +1 -0
  59. package/dist/sandbox/mitm-ca.d.ts +112 -0
  60. package/dist/sandbox/mitm-ca.d.ts.map +1 -0
  61. package/dist/sandbox/mitm-ca.js +380 -0
  62. package/dist/sandbox/mitm-ca.js.map +1 -0
  63. package/dist/sandbox/mitm-leaf.d.ts +28 -0
  64. package/dist/sandbox/mitm-leaf.d.ts.map +1 -0
  65. package/dist/sandbox/mitm-leaf.js +132 -0
  66. package/dist/sandbox/mitm-leaf.js.map +1 -0
  67. package/dist/sandbox/mux-proxy.d.ts +59 -0
  68. package/dist/sandbox/mux-proxy.d.ts.map +1 -0
  69. package/dist/sandbox/mux-proxy.js +161 -0
  70. package/dist/sandbox/mux-proxy.js.map +1 -0
  71. package/dist/sandbox/parent-proxy.d.ts +118 -0
  72. package/dist/sandbox/parent-proxy.d.ts.map +1 -0
  73. package/dist/sandbox/parent-proxy.js +469 -0
  74. package/dist/sandbox/parent-proxy.js.map +1 -0
  75. package/dist/sandbox/request-filter.d.ts +56 -0
  76. package/dist/sandbox/request-filter.d.ts.map +1 -0
  77. package/dist/sandbox/request-filter.js +109 -0
  78. package/dist/sandbox/request-filter.js.map +1 -0
  79. package/dist/sandbox/sandbox-config.d.ts +1347 -0
  80. package/dist/sandbox/sandbox-config.d.ts.map +1 -0
  81. package/dist/sandbox/sandbox-config.js +917 -0
  82. package/dist/sandbox/sandbox-config.js.map +1 -0
  83. package/dist/sandbox/sandbox-manager.d.ts +48 -0
  84. package/dist/sandbox/sandbox-manager.d.ts.map +1 -0
  85. package/dist/sandbox/sandbox-manager.js +1498 -0
  86. package/dist/sandbox/sandbox-manager.js.map +1 -0
  87. package/dist/sandbox/sandbox-schemas.d.ts +90 -0
  88. package/dist/sandbox/sandbox-schemas.d.ts.map +1 -0
  89. package/dist/sandbox/sandbox-schemas.js +3 -0
  90. package/dist/sandbox/sandbox-schemas.js.map +1 -0
  91. package/dist/sandbox/sandbox-temp-dir.d.ts +9 -0
  92. package/dist/sandbox/sandbox-temp-dir.d.ts.map +1 -0
  93. package/dist/sandbox/sandbox-temp-dir.js +73 -0
  94. package/dist/sandbox/sandbox-temp-dir.js.map +1 -0
  95. package/dist/sandbox/sandbox-utils.d.ts +121 -0
  96. package/dist/sandbox/sandbox-utils.d.ts.map +1 -0
  97. package/dist/sandbox/sandbox-utils.js +642 -0
  98. package/dist/sandbox/sandbox-utils.js.map +1 -0
  99. package/dist/sandbox/sandbox-violation-store.d.ts +19 -0
  100. package/dist/sandbox/sandbox-violation-store.d.ts.map +1 -0
  101. package/dist/sandbox/sandbox-violation-store.js +57 -0
  102. package/dist/sandbox/sandbox-violation-store.js.map +1 -0
  103. package/dist/sandbox/socks-proxy.d.ts +38 -0
  104. package/dist/sandbox/socks-proxy.d.ts.map +1 -0
  105. package/dist/sandbox/socks-proxy.js +123 -0
  106. package/dist/sandbox/socks-proxy.js.map +1 -0
  107. package/dist/sandbox/tls-terminate-proxy.d.ts +63 -0
  108. package/dist/sandbox/tls-terminate-proxy.d.ts.map +1 -0
  109. package/dist/sandbox/tls-terminate-proxy.js +332 -0
  110. package/dist/sandbox/tls-terminate-proxy.js.map +1 -0
  111. package/dist/sandbox/windows-sandbox-utils.d.ts +625 -0
  112. package/dist/sandbox/windows-sandbox-utils.d.ts.map +1 -0
  113. package/dist/sandbox/windows-sandbox-utils.js +982 -0
  114. package/dist/sandbox/windows-sandbox-utils.js.map +1 -0
  115. package/dist/utils/config-loader.d.ts +24 -0
  116. package/dist/utils/config-loader.d.ts.map +1 -0
  117. package/dist/utils/config-loader.js +65 -0
  118. package/dist/utils/config-loader.js.map +1 -0
  119. package/dist/utils/debug.d.ts +7 -0
  120. package/dist/utils/debug.d.ts.map +1 -0
  121. package/dist/utils/debug.js +25 -0
  122. package/dist/utils/debug.js.map +1 -0
  123. package/dist/utils/platform.d.ts +15 -0
  124. package/dist/utils/platform.d.ts.map +1 -0
  125. package/dist/utils/platform.js +52 -0
  126. package/dist/utils/platform.js.map +1 -0
  127. package/dist/utils/shell-quote.d.ts +27 -0
  128. package/dist/utils/shell-quote.d.ts.map +1 -0
  129. package/dist/utils/shell-quote.js +47 -0
  130. package/dist/utils/shell-quote.js.map +1 -0
  131. package/dist/utils/which.d.ts +9 -0
  132. package/dist/utils/which.d.ts.map +1 -0
  133. package/dist/utils/which.js +28 -0
  134. package/dist/utils/which.js.map +1 -0
  135. package/package.json +85 -4
  136. package/vendor/seccomp/x64/apply-seccomp +0 -0
@@ -0,0 +1,1347 @@
1
+ /**
2
+ * Configuration for Sandbox Runtime
3
+ * This is the main configuration interface that consumers pass to SandboxManager.initialize()
4
+ */
5
+ import type { FilterRequestCallback } from './request-filter.js';
6
+ import { z } from 'zod/v3';
7
+ declare const ParentProxyConfigSchema: z.ZodObject<{
8
+ http: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
9
+ https: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
10
+ noProxy: z.ZodOptional<z.ZodString>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ http?: string | undefined;
13
+ https?: string | undefined;
14
+ noProxy?: string | undefined;
15
+ }, {
16
+ http?: string | undefined;
17
+ https?: string | undefined;
18
+ noProxy?: string | undefined;
19
+ }>;
20
+ /**
21
+ * Schema for the access mode of a declared credential source.
22
+ *
23
+ * - `deny` — the sandboxed process cannot read the file / does not see the
24
+ * environment variable.
25
+ * - `mask` — the sandboxed process sees a per-session sentinel value; the
26
+ * host proxy substitutes sentinel→real on egress to `injectHosts`.
27
+ * For files this is whole-file masking (Linux only; degrades to `deny`
28
+ * on macOS — see {@link CredentialFileConfigSchema}).
29
+ */
30
+ declare const credentialModeSchema: z.ZodEnum<["deny", "mask"]>;
31
+ /**
32
+ * Schema for a single credential file/directory entry.
33
+ *
34
+ * `mode: "mask"` without `extract` is **whole-file** masking: the entire
35
+ * file content is replaced inside the sandbox with one sentinel string,
36
+ * and the proxy substitutes that sentinel back to the real bytes on egress.
37
+ * This works for files whose content *is* the credential (a token file, a
38
+ * single-line secret).
39
+ *
40
+ * `mode: "mask"` with `extract` is **structured** masking: the regex is
41
+ * applied globally to the real file, capture group 1 of each match is a
42
+ * credential value, and only those captured spans are replaced with
43
+ * sentinels — the rest of the file is preserved byte-for-byte. This lets a
44
+ * tool that parses the file (`.netrc`, JSON/YAML configs) still succeed
45
+ * inside the sandbox while the credential values are protected. If the
46
+ * pattern matches nothing, behaviour is governed by `onExtractNoMatch`
47
+ * (default `"warn"` — the file is left readable as-is and a stderr
48
+ * warning is emitted).
49
+ *
50
+ * `mode: "mask"` with `decode: "jwt"` extends structured masking into
51
+ * encoded values: where `extract` opens plain text to mask a span inside
52
+ * it, `decode` opens the encoding so masking can target fields inside the
53
+ * decoded payload (`maskClaims`):
54
+ *
55
+ * - **Default pattern**: when `extract` is absent, a built-in JWT regex is
56
+ * used (every JWT starts `eyJ` — base64url of `{"`), so authors don't
57
+ * hand-write it. An explicit `extract` wins; its group-1 captures are the
58
+ * candidates.
59
+ * - **Decode-verification**: each candidate must actually BE a JWT (three
60
+ * segments, JSON header/payload, `alg` in the header) before it is
61
+ * masked; candidates failing verification are left untouched.
62
+ * - **Claim-level masking** (`maskClaims`): each named top-level payload
63
+ * claim present with a string value is replaced by its own sentinel and
64
+ * the token is rebuilt around the modified payload (original header,
65
+ * filler signature). All other claims stay real, so a client that
66
+ * decodes the token and reads a non-secret claim keeps working. The
67
+ * proxy substitutes both the whole rebuilt token (sent as a bearer
68
+ * credential) and each claim sentinel (extracted and sent alone).
69
+ * - **Whole-token fallback** (no `maskClaims`): the whole decoded value is
70
+ * treated as the credential — for bearer-style usage where the token
71
+ * itself is the secret — and replaced with a structurally valid fake JWT
72
+ * (parseable header/payload, far-future `exp`), so client-side token
73
+ * parsing inside the sandbox doesn't break. Its header declares
74
+ * `alg: HS256` (not `alg: none`, which misconfigured validators accept)
75
+ * with a garbage signature, so any validator the unswapped fake reaches
76
+ * rejects it.
77
+ * - **No verified candidate**: if nothing matches, no candidate verifies,
78
+ * or (with `maskClaims`) no named claim matches in any verified token,
79
+ * behaviour is governed by `onExtractNoMatch` — same as a non-matching
80
+ * `extract` (default `"warn"`: stderr warning, file left readable
81
+ * as-is).
82
+ *
83
+ * `maskDuplicates: true` (only meaningful with `extract` or `decode`)
84
+ * additionally replaces every verbatim occurrence of each masked value
85
+ * *outside* the regex-matched spans — for a secret repeated where the
86
+ * regex does not reach (e.g. pasted into a comment). The scan is raw
87
+ * substring matching, so a short or common captured value may also hit
88
+ * unrelated content that happens to contain it; intended for long,
89
+ * high-entropy secrets. Composed with `decode`, only captures that passed
90
+ * verification are scanned — a duplicate is the same value and reuses the
91
+ * verified capture's fake without re-verification.
92
+ *
93
+ * On macOS, SBPL cannot redirect reads, so `mode: "mask"` (with or without
94
+ * `extract`/`decode`) currently degrades to `mode: "deny"` (the file is
95
+ * unreadable inside the sandbox).
96
+ */
97
+ export declare const CredentialFileConfigSchema: z.ZodObject<{
98
+ path: z.ZodString;
99
+ mode: z.ZodEnum<["deny", "mask"]>;
100
+ extract: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
101
+ /**
102
+ * What to do when `extract` matches nothing in the file at runtime —
103
+ * or, with `decode`, when no candidate survives verification.
104
+ *
105
+ * - `"warn"` (default): emit a stderr warning and leave the file
106
+ * readable as-is inside the sandbox (fail-open). A non-matching
107
+ * pattern is treated as a config error to surface and fix, not a
108
+ * reason to break a tool that needs the file when the credential is
109
+ * legitimately absent.
110
+ * - `"deny"`: degrade the entry to `mode: "deny"` so the file is
111
+ * unreadable inside the sandbox (fail-closed). The operator declared
112
+ * this file as containing a credential; if the regex cannot find it,
113
+ * block access rather than expose it.
114
+ * - `"error"`: throw at wrap time so nothing runs until the operator
115
+ * fixes the config.
116
+ *
117
+ * Only meaningful when `mode` is `"mask"` and `extract` or `decode` is
118
+ * set; accepted but ignored otherwise.
119
+ */
120
+ onExtractNoMatch: z.ZodOptional<z.ZodEnum<["warn", "deny", "error"]>>;
121
+ decode: z.ZodOptional<z.ZodEnum<["jwt"]>>;
122
+ /**
123
+ * Names of top-level payload claims to mask inside each decoded value —
124
+ * the claim-level counterpart of `extract`: where `extract` opens plain
125
+ * text to mask a span inside it, `decode` + `maskClaims` opens the
126
+ * encoding to mask a field inside the decoded payload.
127
+ *
128
+ * For each verified JWT candidate, every named claim present with a
129
+ * string value is replaced by its own sentinel and the token is rebuilt
130
+ * around the modified payload (original header, filler signature). All
131
+ * other claims are preserved verbatim, so a tool that decodes the token
132
+ * and reads a non-secret claim (issuer, audience, user id) keeps
133
+ * working while the secret claim is protected. A named claim that is
134
+ * absent or non-string in a given token is skipped. If no named claim
135
+ * matches in any verified token, behaviour is governed by
136
+ * `onExtractNoMatch` — same as no candidate verifying.
137
+ *
138
+ * Requires `decode` (there is no payload to look inside otherwise); an
139
+ * explicitly empty list is rejected — see the superRefine below.
140
+ */
141
+ maskClaims: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
142
+ maskDuplicates: z.ZodOptional<z.ZodBoolean>;
143
+ injectHosts: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
144
+ }, "strip", z.ZodTypeAny, {
145
+ mode: "deny" | "mask";
146
+ path: string;
147
+ extract?: string | undefined;
148
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
149
+ decode?: "jwt" | undefined;
150
+ maskClaims?: string[] | undefined;
151
+ maskDuplicates?: boolean | undefined;
152
+ injectHosts?: string[] | undefined;
153
+ }, {
154
+ mode: "deny" | "mask";
155
+ path: string;
156
+ extract?: string | undefined;
157
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
158
+ decode?: "jwt" | undefined;
159
+ maskClaims?: string[] | undefined;
160
+ maskDuplicates?: boolean | undefined;
161
+ injectHosts?: string[] | undefined;
162
+ }>;
163
+ /**
164
+ * Schema for a single credential environment variable entry.
165
+ *
166
+ * `mode: "mask"` replaces the variable's value inside the sandbox with a
167
+ * per-session sentinel; the proxy substitutes sentinel→real on egress to
168
+ * the credential's injectHosts. A masked var that is unset on the host is
169
+ * skipped — there is nothing to protect.
170
+ *
171
+ * `mode: "mask"` without `extract` is **whole-value** masking: the entire
172
+ * value is replaced inside the sandbox with one sentinel string, and the
173
+ * proxy substitutes that sentinel back to the real value on egress. This
174
+ * works for variables whose value *is* the credential (a bare token).
175
+ *
176
+ * `mode: "mask"` with `extract` is **structured** masking: the regex is
177
+ * applied globally to the real value, capture group 1 of each match is a
178
+ * credential value, and only those captured spans are replaced with
179
+ * sentinels — the rest of the value is preserved byte-for-byte. This lets
180
+ * a tool that parses the value (a `DATABASE_URL` connection string, a
181
+ * composite `KEY:SECRET` pair) still succeed inside the sandbox while the
182
+ * credential spans are protected. If the pattern matches nothing,
183
+ * behaviour is governed by `onExtractNoMatch` (default `"warn"` — the
184
+ * variable passes through unmasked and a stderr warning is emitted).
185
+ *
186
+ * `mode: "mask"` with `decode: "jwt"` handles a variable whose whole value
187
+ * is a JWT (CI OIDC tokens, Supabase keys, ...). `decode` opens the encoded
188
+ * value for masking: without claim-level configuration the entire token is
189
+ * replaced by a structurally valid fake JWT — parseable three-segment shape
190
+ * with JSON header/payload and far-future `exp`, so a tool that inspects
191
+ * the token before sending it (segment count, exp, claims) keeps working.
192
+ * The fake's header declares `alg: HS256` — never `alg: none`, which
193
+ * misconfigured validators accept — with a filler signature, so a verifier
194
+ * the unswapped fake ever reaches rejects it cryptographically. The proxy
195
+ * swaps the whole fake token for the real one on egress.
196
+ *
197
+ * `decode: "jwt"` with `maskClaims` masks at the claim level instead: each
198
+ * named top-level payload claim present with a string value is replaced by
199
+ * its own sentinel and the token is rebuilt around the modified payload
200
+ * (original header segment, filler signature). All other claims stay real,
201
+ * so a client that decodes the token and reads a non-secret claim keeps
202
+ * working. The proxy substitutes both the whole rebuilt token (sent as a
203
+ * bearer credential) and each claim sentinel (extracted and sent alone).
204
+ *
205
+ * If the variable is set but its value does not verify as a JWT — or, with
206
+ * `maskClaims`, no named claim is present as a string — nothing was masked:
207
+ * the entry currently fails open — the real value stays in the sandbox
208
+ * environment and a loud stderr warning names the variable.
209
+ */
210
+ export declare const CredentialEnvVarConfigSchema: z.ZodObject<{
211
+ name: z.ZodString;
212
+ mode: z.ZodEnum<["deny", "mask"]>;
213
+ extract: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
214
+ /**
215
+ * What to do when `extract` matches nothing in the value at runtime.
216
+ *
217
+ * - `"warn"` (default): emit a stderr warning and let the variable pass
218
+ * through unmasked inside the sandbox (fail-open). A non-matching
219
+ * pattern is treated as a config error to surface and fix, not a
220
+ * reason to break a tool that needs the variable when the credential
221
+ * is legitimately absent from it.
222
+ * - `"deny"`: unset the variable inside the sandbox (fail-closed) — the
223
+ * env analog of degrading a file to `mode: "deny"`. The operator
224
+ * declared this variable as containing a credential; if the regex
225
+ * cannot find it, withhold the value rather than expose it.
226
+ * - `"error"`: throw at wrap time so nothing runs until the operator
227
+ * fixes the regex.
228
+ *
229
+ * Only meaningful when `mode` is `"mask"` and `extract` is set;
230
+ * accepted but ignored otherwise.
231
+ */
232
+ onExtractNoMatch: z.ZodOptional<z.ZodEnum<["warn", "deny", "error"]>>;
233
+ decode: z.ZodOptional<z.ZodEnum<["jwt"]>>;
234
+ /**
235
+ * Names of top-level payload claims to mask inside the decoded value —
236
+ * the env-var counterpart of the `maskClaims` on a file entry: `decode`
237
+ * opens the variable's encoded value so masking can target a field
238
+ * inside the decoded payload instead of replacing the whole token.
239
+ *
240
+ * Every named claim present with a string value is replaced by its own
241
+ * sentinel and the token is rebuilt around the modified payload
242
+ * (original header segment, filler signature). All other claims are
243
+ * preserved verbatim, so a tool that decodes the token and reads a
244
+ * non-secret claim (issuer, audience, user id) keeps working while the
245
+ * secret claim is protected. A named claim that is absent or non-string
246
+ * is skipped. If no named claim matches, nothing was masked and the
247
+ * entry fails open with a stderr warning — same path as a value that
248
+ * does not verify as a JWT.
249
+ *
250
+ * Requires `decode` (there is no payload to look inside otherwise); an
251
+ * explicitly empty list is rejected — see the superRefine below.
252
+ */
253
+ maskClaims: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
254
+ injectHosts: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
255
+ }, "strip", z.ZodTypeAny, {
256
+ mode: "deny" | "mask";
257
+ name: string;
258
+ extract?: string | undefined;
259
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
260
+ decode?: "jwt" | undefined;
261
+ maskClaims?: string[] | undefined;
262
+ injectHosts?: string[] | undefined;
263
+ }, {
264
+ mode: "deny" | "mask";
265
+ name: string;
266
+ extract?: string | undefined;
267
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
268
+ decode?: "jwt" | undefined;
269
+ maskClaims?: string[] | undefined;
270
+ injectHosts?: string[] | undefined;
271
+ }>;
272
+ /**
273
+ * Credentials configuration schema for validation.
274
+ *
275
+ * Declares credential sources (files and environment variables) with a
276
+ * per-source mode:
277
+ * - `deny` blocks the source inside the sandbox (file reads are denied via the
278
+ * filesystem read-deny mechanism, env vars are unset in the child).
279
+ *
280
+ * Additional modes (e.g. `mask`) will be added in future releases.
281
+ *
282
+ * Only the sources declared here are affected; the section applies no
283
+ * implicit restrictions beyond them.
284
+ */
285
+ export declare const CredentialsConfigSchema: z.ZodObject<{
286
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
287
+ path: z.ZodString;
288
+ mode: z.ZodEnum<["deny", "mask"]>;
289
+ extract: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
290
+ /**
291
+ * What to do when `extract` matches nothing in the file at runtime —
292
+ * or, with `decode`, when no candidate survives verification.
293
+ *
294
+ * - `"warn"` (default): emit a stderr warning and leave the file
295
+ * readable as-is inside the sandbox (fail-open). A non-matching
296
+ * pattern is treated as a config error to surface and fix, not a
297
+ * reason to break a tool that needs the file when the credential is
298
+ * legitimately absent.
299
+ * - `"deny"`: degrade the entry to `mode: "deny"` so the file is
300
+ * unreadable inside the sandbox (fail-closed). The operator declared
301
+ * this file as containing a credential; if the regex cannot find it,
302
+ * block access rather than expose it.
303
+ * - `"error"`: throw at wrap time so nothing runs until the operator
304
+ * fixes the config.
305
+ *
306
+ * Only meaningful when `mode` is `"mask"` and `extract` or `decode` is
307
+ * set; accepted but ignored otherwise.
308
+ */
309
+ onExtractNoMatch: z.ZodOptional<z.ZodEnum<["warn", "deny", "error"]>>;
310
+ decode: z.ZodOptional<z.ZodEnum<["jwt"]>>;
311
+ /**
312
+ * Names of top-level payload claims to mask inside each decoded value —
313
+ * the claim-level counterpart of `extract`: where `extract` opens plain
314
+ * text to mask a span inside it, `decode` + `maskClaims` opens the
315
+ * encoding to mask a field inside the decoded payload.
316
+ *
317
+ * For each verified JWT candidate, every named claim present with a
318
+ * string value is replaced by its own sentinel and the token is rebuilt
319
+ * around the modified payload (original header, filler signature). All
320
+ * other claims are preserved verbatim, so a tool that decodes the token
321
+ * and reads a non-secret claim (issuer, audience, user id) keeps
322
+ * working while the secret claim is protected. A named claim that is
323
+ * absent or non-string in a given token is skipped. If no named claim
324
+ * matches in any verified token, behaviour is governed by
325
+ * `onExtractNoMatch` — same as no candidate verifying.
326
+ *
327
+ * Requires `decode` (there is no payload to look inside otherwise); an
328
+ * explicitly empty list is rejected — see the superRefine below.
329
+ */
330
+ maskClaims: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
331
+ maskDuplicates: z.ZodOptional<z.ZodBoolean>;
332
+ injectHosts: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
333
+ }, "strip", z.ZodTypeAny, {
334
+ mode: "deny" | "mask";
335
+ path: string;
336
+ extract?: string | undefined;
337
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
338
+ decode?: "jwt" | undefined;
339
+ maskClaims?: string[] | undefined;
340
+ maskDuplicates?: boolean | undefined;
341
+ injectHosts?: string[] | undefined;
342
+ }, {
343
+ mode: "deny" | "mask";
344
+ path: string;
345
+ extract?: string | undefined;
346
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
347
+ decode?: "jwt" | undefined;
348
+ maskClaims?: string[] | undefined;
349
+ maskDuplicates?: boolean | undefined;
350
+ injectHosts?: string[] | undefined;
351
+ }>, "many">>;
352
+ envVars: z.ZodOptional<z.ZodArray<z.ZodObject<{
353
+ name: z.ZodString;
354
+ mode: z.ZodEnum<["deny", "mask"]>;
355
+ extract: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
356
+ /**
357
+ * What to do when `extract` matches nothing in the value at runtime.
358
+ *
359
+ * - `"warn"` (default): emit a stderr warning and let the variable pass
360
+ * through unmasked inside the sandbox (fail-open). A non-matching
361
+ * pattern is treated as a config error to surface and fix, not a
362
+ * reason to break a tool that needs the variable when the credential
363
+ * is legitimately absent from it.
364
+ * - `"deny"`: unset the variable inside the sandbox (fail-closed) — the
365
+ * env analog of degrading a file to `mode: "deny"`. The operator
366
+ * declared this variable as containing a credential; if the regex
367
+ * cannot find it, withhold the value rather than expose it.
368
+ * - `"error"`: throw at wrap time so nothing runs until the operator
369
+ * fixes the regex.
370
+ *
371
+ * Only meaningful when `mode` is `"mask"` and `extract` is set;
372
+ * accepted but ignored otherwise.
373
+ */
374
+ onExtractNoMatch: z.ZodOptional<z.ZodEnum<["warn", "deny", "error"]>>;
375
+ decode: z.ZodOptional<z.ZodEnum<["jwt"]>>;
376
+ /**
377
+ * Names of top-level payload claims to mask inside the decoded value —
378
+ * the env-var counterpart of the `maskClaims` on a file entry: `decode`
379
+ * opens the variable's encoded value so masking can target a field
380
+ * inside the decoded payload instead of replacing the whole token.
381
+ *
382
+ * Every named claim present with a string value is replaced by its own
383
+ * sentinel and the token is rebuilt around the modified payload
384
+ * (original header segment, filler signature). All other claims are
385
+ * preserved verbatim, so a tool that decodes the token and reads a
386
+ * non-secret claim (issuer, audience, user id) keeps working while the
387
+ * secret claim is protected. A named claim that is absent or non-string
388
+ * is skipped. If no named claim matches, nothing was masked and the
389
+ * entry fails open with a stderr warning — same path as a value that
390
+ * does not verify as a JWT.
391
+ *
392
+ * Requires `decode` (there is no payload to look inside otherwise); an
393
+ * explicitly empty list is rejected — see the superRefine below.
394
+ */
395
+ maskClaims: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
396
+ injectHosts: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
397
+ }, "strip", z.ZodTypeAny, {
398
+ mode: "deny" | "mask";
399
+ name: string;
400
+ extract?: string | undefined;
401
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
402
+ decode?: "jwt" | undefined;
403
+ maskClaims?: string[] | undefined;
404
+ injectHosts?: string[] | undefined;
405
+ }, {
406
+ mode: "deny" | "mask";
407
+ name: string;
408
+ extract?: string | undefined;
409
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
410
+ decode?: "jwt" | undefined;
411
+ maskClaims?: string[] | undefined;
412
+ injectHosts?: string[] | undefined;
413
+ }>, "many">>;
414
+ allowPlaintextInject: z.ZodOptional<z.ZodBoolean>;
415
+ }, "strict", z.ZodTypeAny, {
416
+ files?: {
417
+ mode: "deny" | "mask";
418
+ path: string;
419
+ extract?: string | undefined;
420
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
421
+ decode?: "jwt" | undefined;
422
+ maskClaims?: string[] | undefined;
423
+ maskDuplicates?: boolean | undefined;
424
+ injectHosts?: string[] | undefined;
425
+ }[] | undefined;
426
+ envVars?: {
427
+ mode: "deny" | "mask";
428
+ name: string;
429
+ extract?: string | undefined;
430
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
431
+ decode?: "jwt" | undefined;
432
+ maskClaims?: string[] | undefined;
433
+ injectHosts?: string[] | undefined;
434
+ }[] | undefined;
435
+ allowPlaintextInject?: boolean | undefined;
436
+ }, {
437
+ files?: {
438
+ mode: "deny" | "mask";
439
+ path: string;
440
+ extract?: string | undefined;
441
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
442
+ decode?: "jwt" | undefined;
443
+ maskClaims?: string[] | undefined;
444
+ maskDuplicates?: boolean | undefined;
445
+ injectHosts?: string[] | undefined;
446
+ }[] | undefined;
447
+ envVars?: {
448
+ mode: "deny" | "mask";
449
+ name: string;
450
+ extract?: string | undefined;
451
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
452
+ decode?: "jwt" | undefined;
453
+ maskClaims?: string[] | undefined;
454
+ injectHosts?: string[] | undefined;
455
+ }[] | undefined;
456
+ allowPlaintextInject?: boolean | undefined;
457
+ }>;
458
+ /**
459
+ * Network configuration schema for validation
460
+ */
461
+ export declare const NetworkConfigSchema: z.ZodObject<{
462
+ allowedDomains: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
463
+ deniedDomains: z.ZodArray<z.ZodUnion<[z.ZodLiteral<"*">, z.ZodEffects<z.ZodString, string, string>]>, "many">;
464
+ strictAllowlist: z.ZodOptional<z.ZodBoolean>;
465
+ allowUnixSockets: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
466
+ allowAllUnixSockets: z.ZodOptional<z.ZodBoolean>;
467
+ allowLocalBinding: z.ZodOptional<z.ZodBoolean>;
468
+ allowMachLookup: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
469
+ httpProxyPort: z.ZodOptional<z.ZodNumber>;
470
+ socksProxyPort: z.ZodOptional<z.ZodNumber>;
471
+ allowUnauthenticatedSocksProxy: z.ZodOptional<z.ZodBoolean>;
472
+ mitmProxy: z.ZodOptional<z.ZodObject<{
473
+ socketPath: z.ZodString;
474
+ domains: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
475
+ }, "strip", z.ZodTypeAny, {
476
+ socketPath: string;
477
+ domains: string[];
478
+ }, {
479
+ socketPath: string;
480
+ domains: string[];
481
+ }>>;
482
+ filterRequest: z.ZodOptional<z.ZodType<FilterRequestCallback, z.ZodTypeDef, FilterRequestCallback>>;
483
+ tlsTerminate: z.ZodOptional<z.ZodEffects<z.ZodObject<{
484
+ caCertPath: z.ZodOptional<z.ZodString>;
485
+ caKeyPath: z.ZodOptional<z.ZodString>;
486
+ excludeDomains: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
487
+ extraCaCertPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
488
+ }, "strip", z.ZodTypeAny, {
489
+ caCertPath?: string | undefined;
490
+ caKeyPath?: string | undefined;
491
+ excludeDomains?: string[] | undefined;
492
+ extraCaCertPaths?: string[] | undefined;
493
+ }, {
494
+ caCertPath?: string | undefined;
495
+ caKeyPath?: string | undefined;
496
+ excludeDomains?: string[] | undefined;
497
+ extraCaCertPaths?: string[] | undefined;
498
+ }>, {
499
+ caCertPath?: string | undefined;
500
+ caKeyPath?: string | undefined;
501
+ excludeDomains?: string[] | undefined;
502
+ extraCaCertPaths?: string[] | undefined;
503
+ }, {
504
+ caCertPath?: string | undefined;
505
+ caKeyPath?: string | undefined;
506
+ excludeDomains?: string[] | undefined;
507
+ extraCaCertPaths?: string[] | undefined;
508
+ }>>;
509
+ parentProxy: z.ZodOptional<z.ZodObject<{
510
+ http: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
511
+ https: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
512
+ noProxy: z.ZodOptional<z.ZodString>;
513
+ }, "strip", z.ZodTypeAny, {
514
+ http?: string | undefined;
515
+ https?: string | undefined;
516
+ noProxy?: string | undefined;
517
+ }, {
518
+ http?: string | undefined;
519
+ https?: string | undefined;
520
+ noProxy?: string | undefined;
521
+ }>>;
522
+ }, "strip", z.ZodTypeAny, {
523
+ allowedDomains: string[];
524
+ deniedDomains: string[];
525
+ strictAllowlist?: boolean | undefined;
526
+ allowUnixSockets?: string[] | undefined;
527
+ allowAllUnixSockets?: boolean | undefined;
528
+ allowLocalBinding?: boolean | undefined;
529
+ allowMachLookup?: string[] | undefined;
530
+ httpProxyPort?: number | undefined;
531
+ socksProxyPort?: number | undefined;
532
+ allowUnauthenticatedSocksProxy?: boolean | undefined;
533
+ mitmProxy?: {
534
+ socketPath: string;
535
+ domains: string[];
536
+ } | undefined;
537
+ filterRequest?: FilterRequestCallback | undefined;
538
+ tlsTerminate?: {
539
+ caCertPath?: string | undefined;
540
+ caKeyPath?: string | undefined;
541
+ excludeDomains?: string[] | undefined;
542
+ extraCaCertPaths?: string[] | undefined;
543
+ } | undefined;
544
+ parentProxy?: {
545
+ http?: string | undefined;
546
+ https?: string | undefined;
547
+ noProxy?: string | undefined;
548
+ } | undefined;
549
+ }, {
550
+ allowedDomains: string[];
551
+ deniedDomains: string[];
552
+ strictAllowlist?: boolean | undefined;
553
+ allowUnixSockets?: string[] | undefined;
554
+ allowAllUnixSockets?: boolean | undefined;
555
+ allowLocalBinding?: boolean | undefined;
556
+ allowMachLookup?: string[] | undefined;
557
+ httpProxyPort?: number | undefined;
558
+ socksProxyPort?: number | undefined;
559
+ allowUnauthenticatedSocksProxy?: boolean | undefined;
560
+ mitmProxy?: {
561
+ socketPath: string;
562
+ domains: string[];
563
+ } | undefined;
564
+ filterRequest?: FilterRequestCallback | undefined;
565
+ tlsTerminate?: {
566
+ caCertPath?: string | undefined;
567
+ caKeyPath?: string | undefined;
568
+ excludeDomains?: string[] | undefined;
569
+ extraCaCertPaths?: string[] | undefined;
570
+ } | undefined;
571
+ parentProxy?: {
572
+ http?: string | undefined;
573
+ https?: string | undefined;
574
+ noProxy?: string | undefined;
575
+ } | undefined;
576
+ }>;
577
+ /**
578
+ * Filesystem configuration schema for validation
579
+ */
580
+ export declare const FilesystemConfigSchema: z.ZodObject<{
581
+ disabled: z.ZodOptional<z.ZodBoolean>;
582
+ denyRead: z.ZodArray<z.ZodString, "many">;
583
+ allowRead: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
584
+ allowWrite: z.ZodArray<z.ZodString, "many">;
585
+ denyWrite: z.ZodArray<z.ZodString, "many">;
586
+ }, "strip", z.ZodTypeAny, {
587
+ denyRead: string[];
588
+ allowWrite: string[];
589
+ denyWrite: string[];
590
+ disabled?: boolean | undefined;
591
+ allowRead?: string[] | undefined;
592
+ }, {
593
+ denyRead: string[];
594
+ allowWrite: string[];
595
+ denyWrite: string[];
596
+ disabled?: boolean | undefined;
597
+ allowRead?: string[] | undefined;
598
+ }>;
599
+ /**
600
+ * Configuration schema for ignoring specific sandbox violations
601
+ * Maps command patterns to filesystem paths to ignore violations for.
602
+ */
603
+ export declare const IgnoreViolationsConfigSchema: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>;
604
+ export declare const SrtWinConfigSchema: z.ZodObject<{
605
+ path: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
606
+ }, "strip", z.ZodTypeAny, {
607
+ path?: string | undefined;
608
+ }, {
609
+ path?: string | undefined;
610
+ }>;
611
+ /**
612
+ * Windows-specific configuration schema. See
613
+ * `windows-sandbox-utils.ts` for the install flow these settings
614
+ * must agree with.
615
+ *
616
+ * Canonical: `sublayerGuid`; the `wfpSublayerGuid` alias is resolved
617
+ * at read sites (`sublayerGuid ?? wfpSublayerGuid`) rather than via
618
+ * `.transform()` so this stays a plain `ZodObject` for consumers that
619
+ * `.extend()`/`.shape` it.
620
+ */
621
+ export declare const WindowsConfigSchema: z.ZodObject<{
622
+ sublayerGuid: z.ZodOptional<z.ZodString>;
623
+ wfpSublayerGuid: z.ZodOptional<z.ZodString>;
624
+ proxyPortRange: z.ZodOptional<z.ZodEffects<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, [number, number], [number, number]>>;
625
+ srtWin: z.ZodOptional<z.ZodObject<{
626
+ path: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
627
+ }, "strip", z.ZodTypeAny, {
628
+ path?: string | undefined;
629
+ }, {
630
+ path?: string | undefined;
631
+ }>>;
632
+ }, "strip", z.ZodTypeAny, {
633
+ sublayerGuid?: string | undefined;
634
+ wfpSublayerGuid?: string | undefined;
635
+ proxyPortRange?: [number, number] | undefined;
636
+ srtWin?: {
637
+ path?: string | undefined;
638
+ } | undefined;
639
+ }, {
640
+ sublayerGuid?: string | undefined;
641
+ wfpSublayerGuid?: string | undefined;
642
+ proxyPortRange?: [number, number] | undefined;
643
+ srtWin?: {
644
+ path?: string | undefined;
645
+ } | undefined;
646
+ }>;
647
+ /**
648
+ * Seccomp configuration schema (Linux only)
649
+ */
650
+ declare const SeccompConfigSchema: z.ZodObject<{
651
+ applyPath: z.ZodOptional<z.ZodString>;
652
+ argv0: z.ZodOptional<z.ZodString>;
653
+ }, "strip", z.ZodTypeAny, {
654
+ applyPath?: string | undefined;
655
+ argv0?: string | undefined;
656
+ }, {
657
+ applyPath?: string | undefined;
658
+ argv0?: string | undefined;
659
+ }>;
660
+ /**
661
+ * Main configuration schema for Sandbox Runtime validation
662
+ */
663
+ export declare const SandboxRuntimeConfigSchema: z.ZodEffects<z.ZodObject<{
664
+ network: z.ZodObject<{
665
+ allowedDomains: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
666
+ deniedDomains: z.ZodArray<z.ZodUnion<[z.ZodLiteral<"*">, z.ZodEffects<z.ZodString, string, string>]>, "many">;
667
+ strictAllowlist: z.ZodOptional<z.ZodBoolean>;
668
+ allowUnixSockets: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
669
+ allowAllUnixSockets: z.ZodOptional<z.ZodBoolean>;
670
+ allowLocalBinding: z.ZodOptional<z.ZodBoolean>;
671
+ allowMachLookup: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
672
+ httpProxyPort: z.ZodOptional<z.ZodNumber>;
673
+ socksProxyPort: z.ZodOptional<z.ZodNumber>;
674
+ allowUnauthenticatedSocksProxy: z.ZodOptional<z.ZodBoolean>;
675
+ mitmProxy: z.ZodOptional<z.ZodObject<{
676
+ socketPath: z.ZodString;
677
+ domains: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
678
+ }, "strip", z.ZodTypeAny, {
679
+ socketPath: string;
680
+ domains: string[];
681
+ }, {
682
+ socketPath: string;
683
+ domains: string[];
684
+ }>>;
685
+ filterRequest: z.ZodOptional<z.ZodType<FilterRequestCallback, z.ZodTypeDef, FilterRequestCallback>>;
686
+ tlsTerminate: z.ZodOptional<z.ZodEffects<z.ZodObject<{
687
+ caCertPath: z.ZodOptional<z.ZodString>;
688
+ caKeyPath: z.ZodOptional<z.ZodString>;
689
+ excludeDomains: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
690
+ extraCaCertPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
691
+ }, "strip", z.ZodTypeAny, {
692
+ caCertPath?: string | undefined;
693
+ caKeyPath?: string | undefined;
694
+ excludeDomains?: string[] | undefined;
695
+ extraCaCertPaths?: string[] | undefined;
696
+ }, {
697
+ caCertPath?: string | undefined;
698
+ caKeyPath?: string | undefined;
699
+ excludeDomains?: string[] | undefined;
700
+ extraCaCertPaths?: string[] | undefined;
701
+ }>, {
702
+ caCertPath?: string | undefined;
703
+ caKeyPath?: string | undefined;
704
+ excludeDomains?: string[] | undefined;
705
+ extraCaCertPaths?: string[] | undefined;
706
+ }, {
707
+ caCertPath?: string | undefined;
708
+ caKeyPath?: string | undefined;
709
+ excludeDomains?: string[] | undefined;
710
+ extraCaCertPaths?: string[] | undefined;
711
+ }>>;
712
+ parentProxy: z.ZodOptional<z.ZodObject<{
713
+ http: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
714
+ https: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
715
+ noProxy: z.ZodOptional<z.ZodString>;
716
+ }, "strip", z.ZodTypeAny, {
717
+ http?: string | undefined;
718
+ https?: string | undefined;
719
+ noProxy?: string | undefined;
720
+ }, {
721
+ http?: string | undefined;
722
+ https?: string | undefined;
723
+ noProxy?: string | undefined;
724
+ }>>;
725
+ }, "strip", z.ZodTypeAny, {
726
+ allowedDomains: string[];
727
+ deniedDomains: string[];
728
+ strictAllowlist?: boolean | undefined;
729
+ allowUnixSockets?: string[] | undefined;
730
+ allowAllUnixSockets?: boolean | undefined;
731
+ allowLocalBinding?: boolean | undefined;
732
+ allowMachLookup?: string[] | undefined;
733
+ httpProxyPort?: number | undefined;
734
+ socksProxyPort?: number | undefined;
735
+ allowUnauthenticatedSocksProxy?: boolean | undefined;
736
+ mitmProxy?: {
737
+ socketPath: string;
738
+ domains: string[];
739
+ } | undefined;
740
+ filterRequest?: FilterRequestCallback | undefined;
741
+ tlsTerminate?: {
742
+ caCertPath?: string | undefined;
743
+ caKeyPath?: string | undefined;
744
+ excludeDomains?: string[] | undefined;
745
+ extraCaCertPaths?: string[] | undefined;
746
+ } | undefined;
747
+ parentProxy?: {
748
+ http?: string | undefined;
749
+ https?: string | undefined;
750
+ noProxy?: string | undefined;
751
+ } | undefined;
752
+ }, {
753
+ allowedDomains: string[];
754
+ deniedDomains: string[];
755
+ strictAllowlist?: boolean | undefined;
756
+ allowUnixSockets?: string[] | undefined;
757
+ allowAllUnixSockets?: boolean | undefined;
758
+ allowLocalBinding?: boolean | undefined;
759
+ allowMachLookup?: string[] | undefined;
760
+ httpProxyPort?: number | undefined;
761
+ socksProxyPort?: number | undefined;
762
+ allowUnauthenticatedSocksProxy?: boolean | undefined;
763
+ mitmProxy?: {
764
+ socketPath: string;
765
+ domains: string[];
766
+ } | undefined;
767
+ filterRequest?: FilterRequestCallback | undefined;
768
+ tlsTerminate?: {
769
+ caCertPath?: string | undefined;
770
+ caKeyPath?: string | undefined;
771
+ excludeDomains?: string[] | undefined;
772
+ extraCaCertPaths?: string[] | undefined;
773
+ } | undefined;
774
+ parentProxy?: {
775
+ http?: string | undefined;
776
+ https?: string | undefined;
777
+ noProxy?: string | undefined;
778
+ } | undefined;
779
+ }>;
780
+ filesystem: z.ZodObject<{
781
+ disabled: z.ZodOptional<z.ZodBoolean>;
782
+ denyRead: z.ZodArray<z.ZodString, "many">;
783
+ allowRead: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
784
+ allowWrite: z.ZodArray<z.ZodString, "many">;
785
+ denyWrite: z.ZodArray<z.ZodString, "many">;
786
+ }, "strip", z.ZodTypeAny, {
787
+ denyRead: string[];
788
+ allowWrite: string[];
789
+ denyWrite: string[];
790
+ disabled?: boolean | undefined;
791
+ allowRead?: string[] | undefined;
792
+ }, {
793
+ denyRead: string[];
794
+ allowWrite: string[];
795
+ denyWrite: string[];
796
+ disabled?: boolean | undefined;
797
+ allowRead?: string[] | undefined;
798
+ }>;
799
+ credentials: z.ZodOptional<z.ZodObject<{
800
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
801
+ path: z.ZodString;
802
+ mode: z.ZodEnum<["deny", "mask"]>;
803
+ extract: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
804
+ /**
805
+ * What to do when `extract` matches nothing in the file at runtime —
806
+ * or, with `decode`, when no candidate survives verification.
807
+ *
808
+ * - `"warn"` (default): emit a stderr warning and leave the file
809
+ * readable as-is inside the sandbox (fail-open). A non-matching
810
+ * pattern is treated as a config error to surface and fix, not a
811
+ * reason to break a tool that needs the file when the credential is
812
+ * legitimately absent.
813
+ * - `"deny"`: degrade the entry to `mode: "deny"` so the file is
814
+ * unreadable inside the sandbox (fail-closed). The operator declared
815
+ * this file as containing a credential; if the regex cannot find it,
816
+ * block access rather than expose it.
817
+ * - `"error"`: throw at wrap time so nothing runs until the operator
818
+ * fixes the config.
819
+ *
820
+ * Only meaningful when `mode` is `"mask"` and `extract` or `decode` is
821
+ * set; accepted but ignored otherwise.
822
+ */
823
+ onExtractNoMatch: z.ZodOptional<z.ZodEnum<["warn", "deny", "error"]>>;
824
+ decode: z.ZodOptional<z.ZodEnum<["jwt"]>>;
825
+ /**
826
+ * Names of top-level payload claims to mask inside each decoded value —
827
+ * the claim-level counterpart of `extract`: where `extract` opens plain
828
+ * text to mask a span inside it, `decode` + `maskClaims` opens the
829
+ * encoding to mask a field inside the decoded payload.
830
+ *
831
+ * For each verified JWT candidate, every named claim present with a
832
+ * string value is replaced by its own sentinel and the token is rebuilt
833
+ * around the modified payload (original header, filler signature). All
834
+ * other claims are preserved verbatim, so a tool that decodes the token
835
+ * and reads a non-secret claim (issuer, audience, user id) keeps
836
+ * working while the secret claim is protected. A named claim that is
837
+ * absent or non-string in a given token is skipped. If no named claim
838
+ * matches in any verified token, behaviour is governed by
839
+ * `onExtractNoMatch` — same as no candidate verifying.
840
+ *
841
+ * Requires `decode` (there is no payload to look inside otherwise); an
842
+ * explicitly empty list is rejected — see the superRefine below.
843
+ */
844
+ maskClaims: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
845
+ maskDuplicates: z.ZodOptional<z.ZodBoolean>;
846
+ injectHosts: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
847
+ }, "strip", z.ZodTypeAny, {
848
+ mode: "deny" | "mask";
849
+ path: string;
850
+ extract?: string | undefined;
851
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
852
+ decode?: "jwt" | undefined;
853
+ maskClaims?: string[] | undefined;
854
+ maskDuplicates?: boolean | undefined;
855
+ injectHosts?: string[] | undefined;
856
+ }, {
857
+ mode: "deny" | "mask";
858
+ path: string;
859
+ extract?: string | undefined;
860
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
861
+ decode?: "jwt" | undefined;
862
+ maskClaims?: string[] | undefined;
863
+ maskDuplicates?: boolean | undefined;
864
+ injectHosts?: string[] | undefined;
865
+ }>, "many">>;
866
+ envVars: z.ZodOptional<z.ZodArray<z.ZodObject<{
867
+ name: z.ZodString;
868
+ mode: z.ZodEnum<["deny", "mask"]>;
869
+ extract: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
870
+ /**
871
+ * What to do when `extract` matches nothing in the value at runtime.
872
+ *
873
+ * - `"warn"` (default): emit a stderr warning and let the variable pass
874
+ * through unmasked inside the sandbox (fail-open). A non-matching
875
+ * pattern is treated as a config error to surface and fix, not a
876
+ * reason to break a tool that needs the variable when the credential
877
+ * is legitimately absent from it.
878
+ * - `"deny"`: unset the variable inside the sandbox (fail-closed) — the
879
+ * env analog of degrading a file to `mode: "deny"`. The operator
880
+ * declared this variable as containing a credential; if the regex
881
+ * cannot find it, withhold the value rather than expose it.
882
+ * - `"error"`: throw at wrap time so nothing runs until the operator
883
+ * fixes the regex.
884
+ *
885
+ * Only meaningful when `mode` is `"mask"` and `extract` is set;
886
+ * accepted but ignored otherwise.
887
+ */
888
+ onExtractNoMatch: z.ZodOptional<z.ZodEnum<["warn", "deny", "error"]>>;
889
+ decode: z.ZodOptional<z.ZodEnum<["jwt"]>>;
890
+ /**
891
+ * Names of top-level payload claims to mask inside the decoded value —
892
+ * the env-var counterpart of the `maskClaims` on a file entry: `decode`
893
+ * opens the variable's encoded value so masking can target a field
894
+ * inside the decoded payload instead of replacing the whole token.
895
+ *
896
+ * Every named claim present with a string value is replaced by its own
897
+ * sentinel and the token is rebuilt around the modified payload
898
+ * (original header segment, filler signature). All other claims are
899
+ * preserved verbatim, so a tool that decodes the token and reads a
900
+ * non-secret claim (issuer, audience, user id) keeps working while the
901
+ * secret claim is protected. A named claim that is absent or non-string
902
+ * is skipped. If no named claim matches, nothing was masked and the
903
+ * entry fails open with a stderr warning — same path as a value that
904
+ * does not verify as a JWT.
905
+ *
906
+ * Requires `decode` (there is no payload to look inside otherwise); an
907
+ * explicitly empty list is rejected — see the superRefine below.
908
+ */
909
+ maskClaims: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
910
+ injectHosts: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
911
+ }, "strip", z.ZodTypeAny, {
912
+ mode: "deny" | "mask";
913
+ name: string;
914
+ extract?: string | undefined;
915
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
916
+ decode?: "jwt" | undefined;
917
+ maskClaims?: string[] | undefined;
918
+ injectHosts?: string[] | undefined;
919
+ }, {
920
+ mode: "deny" | "mask";
921
+ name: string;
922
+ extract?: string | undefined;
923
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
924
+ decode?: "jwt" | undefined;
925
+ maskClaims?: string[] | undefined;
926
+ injectHosts?: string[] | undefined;
927
+ }>, "many">>;
928
+ allowPlaintextInject: z.ZodOptional<z.ZodBoolean>;
929
+ }, "strict", z.ZodTypeAny, {
930
+ files?: {
931
+ mode: "deny" | "mask";
932
+ path: string;
933
+ extract?: string | undefined;
934
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
935
+ decode?: "jwt" | undefined;
936
+ maskClaims?: string[] | undefined;
937
+ maskDuplicates?: boolean | undefined;
938
+ injectHosts?: string[] | undefined;
939
+ }[] | undefined;
940
+ envVars?: {
941
+ mode: "deny" | "mask";
942
+ name: string;
943
+ extract?: string | undefined;
944
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
945
+ decode?: "jwt" | undefined;
946
+ maskClaims?: string[] | undefined;
947
+ injectHosts?: string[] | undefined;
948
+ }[] | undefined;
949
+ allowPlaintextInject?: boolean | undefined;
950
+ }, {
951
+ files?: {
952
+ mode: "deny" | "mask";
953
+ path: string;
954
+ extract?: string | undefined;
955
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
956
+ decode?: "jwt" | undefined;
957
+ maskClaims?: string[] | undefined;
958
+ maskDuplicates?: boolean | undefined;
959
+ injectHosts?: string[] | undefined;
960
+ }[] | undefined;
961
+ envVars?: {
962
+ mode: "deny" | "mask";
963
+ name: string;
964
+ extract?: string | undefined;
965
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
966
+ decode?: "jwt" | undefined;
967
+ maskClaims?: string[] | undefined;
968
+ injectHosts?: string[] | undefined;
969
+ }[] | undefined;
970
+ allowPlaintextInject?: boolean | undefined;
971
+ }>>;
972
+ ignoreViolations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
973
+ enableWeakerNestedSandbox: z.ZodOptional<z.ZodBoolean>;
974
+ enableWeakerNetworkIsolation: z.ZodOptional<z.ZodBoolean>;
975
+ allowAppleEvents: z.ZodOptional<z.ZodBoolean>;
976
+ allowProcessSignals: z.ZodOptional<z.ZodBoolean>;
977
+ allowPty: z.ZodOptional<z.ZodBoolean>;
978
+ allowBrowserProcess: z.ZodOptional<z.ZodBoolean>;
979
+ seccomp: z.ZodOptional<z.ZodObject<{
980
+ applyPath: z.ZodOptional<z.ZodString>;
981
+ argv0: z.ZodOptional<z.ZodString>;
982
+ }, "strip", z.ZodTypeAny, {
983
+ applyPath?: string | undefined;
984
+ argv0?: string | undefined;
985
+ }, {
986
+ applyPath?: string | undefined;
987
+ argv0?: string | undefined;
988
+ }>>;
989
+ bwrapPath: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
990
+ socatPath: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
991
+ windows: z.ZodOptional<z.ZodObject<{
992
+ sublayerGuid: z.ZodOptional<z.ZodString>;
993
+ wfpSublayerGuid: z.ZodOptional<z.ZodString>;
994
+ proxyPortRange: z.ZodOptional<z.ZodEffects<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, [number, number], [number, number]>>;
995
+ srtWin: z.ZodOptional<z.ZodObject<{
996
+ path: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
997
+ }, "strip", z.ZodTypeAny, {
998
+ path?: string | undefined;
999
+ }, {
1000
+ path?: string | undefined;
1001
+ }>>;
1002
+ }, "strip", z.ZodTypeAny, {
1003
+ sublayerGuid?: string | undefined;
1004
+ wfpSublayerGuid?: string | undefined;
1005
+ proxyPortRange?: [number, number] | undefined;
1006
+ srtWin?: {
1007
+ path?: string | undefined;
1008
+ } | undefined;
1009
+ }, {
1010
+ sublayerGuid?: string | undefined;
1011
+ wfpSublayerGuid?: string | undefined;
1012
+ proxyPortRange?: [number, number] | undefined;
1013
+ srtWin?: {
1014
+ path?: string | undefined;
1015
+ } | undefined;
1016
+ }>>;
1017
+ }, "strip", z.ZodTypeAny, {
1018
+ network: {
1019
+ allowedDomains: string[];
1020
+ deniedDomains: string[];
1021
+ strictAllowlist?: boolean | undefined;
1022
+ allowUnixSockets?: string[] | undefined;
1023
+ allowAllUnixSockets?: boolean | undefined;
1024
+ allowLocalBinding?: boolean | undefined;
1025
+ allowMachLookup?: string[] | undefined;
1026
+ httpProxyPort?: number | undefined;
1027
+ socksProxyPort?: number | undefined;
1028
+ allowUnauthenticatedSocksProxy?: boolean | undefined;
1029
+ mitmProxy?: {
1030
+ socketPath: string;
1031
+ domains: string[];
1032
+ } | undefined;
1033
+ filterRequest?: FilterRequestCallback | undefined;
1034
+ tlsTerminate?: {
1035
+ caCertPath?: string | undefined;
1036
+ caKeyPath?: string | undefined;
1037
+ excludeDomains?: string[] | undefined;
1038
+ extraCaCertPaths?: string[] | undefined;
1039
+ } | undefined;
1040
+ parentProxy?: {
1041
+ http?: string | undefined;
1042
+ https?: string | undefined;
1043
+ noProxy?: string | undefined;
1044
+ } | undefined;
1045
+ };
1046
+ filesystem: {
1047
+ denyRead: string[];
1048
+ allowWrite: string[];
1049
+ denyWrite: string[];
1050
+ disabled?: boolean | undefined;
1051
+ allowRead?: string[] | undefined;
1052
+ };
1053
+ credentials?: {
1054
+ files?: {
1055
+ mode: "deny" | "mask";
1056
+ path: string;
1057
+ extract?: string | undefined;
1058
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
1059
+ decode?: "jwt" | undefined;
1060
+ maskClaims?: string[] | undefined;
1061
+ maskDuplicates?: boolean | undefined;
1062
+ injectHosts?: string[] | undefined;
1063
+ }[] | undefined;
1064
+ envVars?: {
1065
+ mode: "deny" | "mask";
1066
+ name: string;
1067
+ extract?: string | undefined;
1068
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
1069
+ decode?: "jwt" | undefined;
1070
+ maskClaims?: string[] | undefined;
1071
+ injectHosts?: string[] | undefined;
1072
+ }[] | undefined;
1073
+ allowPlaintextInject?: boolean | undefined;
1074
+ } | undefined;
1075
+ ignoreViolations?: Record<string, string[]> | undefined;
1076
+ enableWeakerNestedSandbox?: boolean | undefined;
1077
+ enableWeakerNetworkIsolation?: boolean | undefined;
1078
+ allowAppleEvents?: boolean | undefined;
1079
+ allowProcessSignals?: boolean | undefined;
1080
+ allowPty?: boolean | undefined;
1081
+ allowBrowserProcess?: boolean | undefined;
1082
+ seccomp?: {
1083
+ applyPath?: string | undefined;
1084
+ argv0?: string | undefined;
1085
+ } | undefined;
1086
+ bwrapPath?: string | undefined;
1087
+ socatPath?: string | undefined;
1088
+ windows?: {
1089
+ sublayerGuid?: string | undefined;
1090
+ wfpSublayerGuid?: string | undefined;
1091
+ proxyPortRange?: [number, number] | undefined;
1092
+ srtWin?: {
1093
+ path?: string | undefined;
1094
+ } | undefined;
1095
+ } | undefined;
1096
+ }, {
1097
+ network: {
1098
+ allowedDomains: string[];
1099
+ deniedDomains: string[];
1100
+ strictAllowlist?: boolean | undefined;
1101
+ allowUnixSockets?: string[] | undefined;
1102
+ allowAllUnixSockets?: boolean | undefined;
1103
+ allowLocalBinding?: boolean | undefined;
1104
+ allowMachLookup?: string[] | undefined;
1105
+ httpProxyPort?: number | undefined;
1106
+ socksProxyPort?: number | undefined;
1107
+ allowUnauthenticatedSocksProxy?: boolean | undefined;
1108
+ mitmProxy?: {
1109
+ socketPath: string;
1110
+ domains: string[];
1111
+ } | undefined;
1112
+ filterRequest?: FilterRequestCallback | undefined;
1113
+ tlsTerminate?: {
1114
+ caCertPath?: string | undefined;
1115
+ caKeyPath?: string | undefined;
1116
+ excludeDomains?: string[] | undefined;
1117
+ extraCaCertPaths?: string[] | undefined;
1118
+ } | undefined;
1119
+ parentProxy?: {
1120
+ http?: string | undefined;
1121
+ https?: string | undefined;
1122
+ noProxy?: string | undefined;
1123
+ } | undefined;
1124
+ };
1125
+ filesystem: {
1126
+ denyRead: string[];
1127
+ allowWrite: string[];
1128
+ denyWrite: string[];
1129
+ disabled?: boolean | undefined;
1130
+ allowRead?: string[] | undefined;
1131
+ };
1132
+ credentials?: {
1133
+ files?: {
1134
+ mode: "deny" | "mask";
1135
+ path: string;
1136
+ extract?: string | undefined;
1137
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
1138
+ decode?: "jwt" | undefined;
1139
+ maskClaims?: string[] | undefined;
1140
+ maskDuplicates?: boolean | undefined;
1141
+ injectHosts?: string[] | undefined;
1142
+ }[] | undefined;
1143
+ envVars?: {
1144
+ mode: "deny" | "mask";
1145
+ name: string;
1146
+ extract?: string | undefined;
1147
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
1148
+ decode?: "jwt" | undefined;
1149
+ maskClaims?: string[] | undefined;
1150
+ injectHosts?: string[] | undefined;
1151
+ }[] | undefined;
1152
+ allowPlaintextInject?: boolean | undefined;
1153
+ } | undefined;
1154
+ ignoreViolations?: Record<string, string[]> | undefined;
1155
+ enableWeakerNestedSandbox?: boolean | undefined;
1156
+ enableWeakerNetworkIsolation?: boolean | undefined;
1157
+ allowAppleEvents?: boolean | undefined;
1158
+ allowProcessSignals?: boolean | undefined;
1159
+ allowPty?: boolean | undefined;
1160
+ allowBrowserProcess?: boolean | undefined;
1161
+ seccomp?: {
1162
+ applyPath?: string | undefined;
1163
+ argv0?: string | undefined;
1164
+ } | undefined;
1165
+ bwrapPath?: string | undefined;
1166
+ socatPath?: string | undefined;
1167
+ windows?: {
1168
+ sublayerGuid?: string | undefined;
1169
+ wfpSublayerGuid?: string | undefined;
1170
+ proxyPortRange?: [number, number] | undefined;
1171
+ srtWin?: {
1172
+ path?: string | undefined;
1173
+ } | undefined;
1174
+ } | undefined;
1175
+ }>, {
1176
+ network: {
1177
+ allowedDomains: string[];
1178
+ deniedDomains: string[];
1179
+ strictAllowlist?: boolean | undefined;
1180
+ allowUnixSockets?: string[] | undefined;
1181
+ allowAllUnixSockets?: boolean | undefined;
1182
+ allowLocalBinding?: boolean | undefined;
1183
+ allowMachLookup?: string[] | undefined;
1184
+ httpProxyPort?: number | undefined;
1185
+ socksProxyPort?: number | undefined;
1186
+ allowUnauthenticatedSocksProxy?: boolean | undefined;
1187
+ mitmProxy?: {
1188
+ socketPath: string;
1189
+ domains: string[];
1190
+ } | undefined;
1191
+ filterRequest?: FilterRequestCallback | undefined;
1192
+ tlsTerminate?: {
1193
+ caCertPath?: string | undefined;
1194
+ caKeyPath?: string | undefined;
1195
+ excludeDomains?: string[] | undefined;
1196
+ extraCaCertPaths?: string[] | undefined;
1197
+ } | undefined;
1198
+ parentProxy?: {
1199
+ http?: string | undefined;
1200
+ https?: string | undefined;
1201
+ noProxy?: string | undefined;
1202
+ } | undefined;
1203
+ };
1204
+ filesystem: {
1205
+ denyRead: string[];
1206
+ allowWrite: string[];
1207
+ denyWrite: string[];
1208
+ disabled?: boolean | undefined;
1209
+ allowRead?: string[] | undefined;
1210
+ };
1211
+ credentials?: {
1212
+ files?: {
1213
+ mode: "deny" | "mask";
1214
+ path: string;
1215
+ extract?: string | undefined;
1216
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
1217
+ decode?: "jwt" | undefined;
1218
+ maskClaims?: string[] | undefined;
1219
+ maskDuplicates?: boolean | undefined;
1220
+ injectHosts?: string[] | undefined;
1221
+ }[] | undefined;
1222
+ envVars?: {
1223
+ mode: "deny" | "mask";
1224
+ name: string;
1225
+ extract?: string | undefined;
1226
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
1227
+ decode?: "jwt" | undefined;
1228
+ maskClaims?: string[] | undefined;
1229
+ injectHosts?: string[] | undefined;
1230
+ }[] | undefined;
1231
+ allowPlaintextInject?: boolean | undefined;
1232
+ } | undefined;
1233
+ ignoreViolations?: Record<string, string[]> | undefined;
1234
+ enableWeakerNestedSandbox?: boolean | undefined;
1235
+ enableWeakerNetworkIsolation?: boolean | undefined;
1236
+ allowAppleEvents?: boolean | undefined;
1237
+ allowProcessSignals?: boolean | undefined;
1238
+ allowPty?: boolean | undefined;
1239
+ allowBrowserProcess?: boolean | undefined;
1240
+ seccomp?: {
1241
+ applyPath?: string | undefined;
1242
+ argv0?: string | undefined;
1243
+ } | undefined;
1244
+ bwrapPath?: string | undefined;
1245
+ socatPath?: string | undefined;
1246
+ windows?: {
1247
+ sublayerGuid?: string | undefined;
1248
+ wfpSublayerGuid?: string | undefined;
1249
+ proxyPortRange?: [number, number] | undefined;
1250
+ srtWin?: {
1251
+ path?: string | undefined;
1252
+ } | undefined;
1253
+ } | undefined;
1254
+ }, {
1255
+ network: {
1256
+ allowedDomains: string[];
1257
+ deniedDomains: string[];
1258
+ strictAllowlist?: boolean | undefined;
1259
+ allowUnixSockets?: string[] | undefined;
1260
+ allowAllUnixSockets?: boolean | undefined;
1261
+ allowLocalBinding?: boolean | undefined;
1262
+ allowMachLookup?: string[] | undefined;
1263
+ httpProxyPort?: number | undefined;
1264
+ socksProxyPort?: number | undefined;
1265
+ allowUnauthenticatedSocksProxy?: boolean | undefined;
1266
+ mitmProxy?: {
1267
+ socketPath: string;
1268
+ domains: string[];
1269
+ } | undefined;
1270
+ filterRequest?: FilterRequestCallback | undefined;
1271
+ tlsTerminate?: {
1272
+ caCertPath?: string | undefined;
1273
+ caKeyPath?: string | undefined;
1274
+ excludeDomains?: string[] | undefined;
1275
+ extraCaCertPaths?: string[] | undefined;
1276
+ } | undefined;
1277
+ parentProxy?: {
1278
+ http?: string | undefined;
1279
+ https?: string | undefined;
1280
+ noProxy?: string | undefined;
1281
+ } | undefined;
1282
+ };
1283
+ filesystem: {
1284
+ denyRead: string[];
1285
+ allowWrite: string[];
1286
+ denyWrite: string[];
1287
+ disabled?: boolean | undefined;
1288
+ allowRead?: string[] | undefined;
1289
+ };
1290
+ credentials?: {
1291
+ files?: {
1292
+ mode: "deny" | "mask";
1293
+ path: string;
1294
+ extract?: string | undefined;
1295
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
1296
+ decode?: "jwt" | undefined;
1297
+ maskClaims?: string[] | undefined;
1298
+ maskDuplicates?: boolean | undefined;
1299
+ injectHosts?: string[] | undefined;
1300
+ }[] | undefined;
1301
+ envVars?: {
1302
+ mode: "deny" | "mask";
1303
+ name: string;
1304
+ extract?: string | undefined;
1305
+ onExtractNoMatch?: "error" | "warn" | "deny" | undefined;
1306
+ decode?: "jwt" | undefined;
1307
+ maskClaims?: string[] | undefined;
1308
+ injectHosts?: string[] | undefined;
1309
+ }[] | undefined;
1310
+ allowPlaintextInject?: boolean | undefined;
1311
+ } | undefined;
1312
+ ignoreViolations?: Record<string, string[]> | undefined;
1313
+ enableWeakerNestedSandbox?: boolean | undefined;
1314
+ enableWeakerNetworkIsolation?: boolean | undefined;
1315
+ allowAppleEvents?: boolean | undefined;
1316
+ allowProcessSignals?: boolean | undefined;
1317
+ allowPty?: boolean | undefined;
1318
+ allowBrowserProcess?: boolean | undefined;
1319
+ seccomp?: {
1320
+ applyPath?: string | undefined;
1321
+ argv0?: string | undefined;
1322
+ } | undefined;
1323
+ bwrapPath?: string | undefined;
1324
+ socatPath?: string | undefined;
1325
+ windows?: {
1326
+ sublayerGuid?: string | undefined;
1327
+ wfpSublayerGuid?: string | undefined;
1328
+ proxyPortRange?: [number, number] | undefined;
1329
+ srtWin?: {
1330
+ path?: string | undefined;
1331
+ } | undefined;
1332
+ } | undefined;
1333
+ }>;
1334
+ export type ParentProxyConfig = z.infer<typeof ParentProxyConfigSchema>;
1335
+ export type NetworkConfig = z.infer<typeof NetworkConfigSchema>;
1336
+ export type FilesystemConfig = z.infer<typeof FilesystemConfigSchema>;
1337
+ export type CredentialMode = z.infer<typeof credentialModeSchema>;
1338
+ export type CredentialFileConfig = z.infer<typeof CredentialFileConfigSchema>;
1339
+ export type CredentialEnvVarConfig = z.infer<typeof CredentialEnvVarConfigSchema>;
1340
+ export type CredentialsConfig = z.infer<typeof CredentialsConfigSchema>;
1341
+ export type IgnoreViolationsConfig = z.infer<typeof IgnoreViolationsConfigSchema>;
1342
+ export type SeccompConfig = z.infer<typeof SeccompConfigSchema>;
1343
+ export type SrtWinConfig = z.infer<typeof SrtWinConfigSchema>;
1344
+ export type WindowsConfig = z.infer<typeof WindowsConfigSchema>;
1345
+ export type SandboxRuntimeConfig = z.infer<typeof SandboxRuntimeConfigSchema>;
1346
+ export {};
1347
+ //# sourceMappingURL=sandbox-config.d.ts.map