@namzu/sandbox 16.0.0 → 17.0.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/CHANGELOG.md +238 -0
- package/README.md +164 -0
- package/dist/backends/aci-standby-pool/index.d.ts +22 -4
- package/dist/backends/aci-standby-pool/index.d.ts.map +1 -1
- package/dist/backends/aci-standby-pool/index.js +31 -7
- package/dist/backends/aci-standby-pool/index.js.map +1 -1
- package/dist/backends/docker/index.d.ts +243 -24
- package/dist/backends/docker/index.d.ts.map +1 -1
- package/dist/backends/docker/index.js +717 -108
- package/dist/backends/docker/index.js.map +1 -1
- package/dist/backends/firecracker/transport.d.ts +156 -1
- package/dist/backends/firecracker/transport.d.ts.map +1 -1
- package/dist/backends/firecracker/transport.js +223 -29
- package/dist/backends/firecracker/transport.js.map +1 -1
- package/dist/backends/http-worker-client.d.ts +64 -2
- package/dist/backends/http-worker-client.d.ts.map +1 -1
- package/dist/backends/http-worker-client.js +78 -7
- package/dist/backends/http-worker-client.js.map +1 -1
- package/dist/backends/kubernetes/transport.d.ts +7 -0
- package/dist/backends/kubernetes/transport.d.ts.map +1 -1
- package/dist/backends/kubernetes/transport.js.map +1 -1
- package/dist/egress/proxy.d.ts +47 -2
- package/dist/egress/proxy.d.ts.map +1 -1
- package/dist/egress/proxy.js +31 -7
- package/dist/egress/proxy.js.map +1 -1
- package/dist/index.d.ts +67 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/backends/aci-standby-pool/index.ts +37 -7
- package/src/backends/docker/index.ts +909 -126
- package/src/backends/firecracker/transport.ts +387 -36
- package/src/backends/http-worker-client.ts +89 -5
- package/src/backends/kubernetes/transport.ts +7 -0
- package/src/egress/proxy.ts +65 -8
- package/src/index.ts +89 -0
|
@@ -14,14 +14,34 @@
|
|
|
14
14
|
* Trust model:
|
|
15
15
|
* - Container is the trust boundary; everything inside is treated
|
|
16
16
|
* as untrusted code.
|
|
17
|
-
* -
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
17
|
+
* - Every call to the worker's control API carries the per-instance
|
|
18
|
+
* `NAMZU_SANDBOX_TOKEN` this backend mints at create time and
|
|
19
|
+
* injects into the container's environment; a worker the host did
|
|
20
|
+
* not create must be provisioned with its own. The worker requires
|
|
21
|
+
* it on every route but `/healthz`, and refuses to start at all if
|
|
22
|
+
* it has none and is bound to anything routable.
|
|
23
|
+
* - Outbound network from the worker is restricted by the network
|
|
24
|
+
* it is attached to (see {@link DockerBackendConfig.network}) and,
|
|
25
|
+
* for a host allowlist, by an egress proxy running as a sibling
|
|
26
|
+
* container on that same network — the only way its traffic reaches
|
|
27
|
+
* the internet, because the network is `--internal` and has no route
|
|
28
|
+
* off it. The proxy is a container on that subnet like any other, so
|
|
29
|
+
* it is not the sandbox's only reachable destination. The proxy
|
|
30
|
+
* environment the sandbox is given directs traffic; the topology is
|
|
31
|
+
* what confines it. See {@link assertNetworkCarriesThePolicy} and
|
|
32
|
+
* #398.
|
|
33
|
+
*
|
|
34
|
+
* The credential above is what a previous version of this docblock
|
|
35
|
+
* claimed network placement alone provided. It said the worker "only
|
|
36
|
+
* listens on loopback inside its own netns", which is false — the worker
|
|
37
|
+
* binds every interface by default and has to, because a published
|
|
38
|
+
* container port forwards to the container's interface address rather
|
|
39
|
+
* than to its loopback, so a loopback-bound worker is unreachable through
|
|
40
|
+
* the port this backend publishes. The boundary was the network the
|
|
41
|
+
* container is attached to, and wanted a credential behind it.
|
|
22
42
|
*/
|
|
23
43
|
import { type ContainerSandboxLayout, type ResolvedContainerSandboxLayout } from '@namzu/sdk';
|
|
24
|
-
import type { BrokeredCredential
|
|
44
|
+
import type { BrokeredCredential } from '../../egress/index.js';
|
|
25
45
|
import { type EgressPolicy, type SandboxBackend, type SandboxBackendOptions } from '../../index.js';
|
|
26
46
|
/**
|
|
27
47
|
* Backend-specific tuning. Most hosts use the defaults; advanced
|
|
@@ -133,6 +153,53 @@ export interface DockerBackendInternalConfig {
|
|
|
133
153
|
* is the hole the screen exists to close.
|
|
134
154
|
*/
|
|
135
155
|
readonly allowInwardFor?: readonly string[];
|
|
156
|
+
/**
|
|
157
|
+
* Image the egress proxy runs as, when the policy needs one.
|
|
158
|
+
*
|
|
159
|
+
* A host allowlist (`static` or `resolver`) is enforced by a proxy, and
|
|
160
|
+
* this backend no longer runs that proxy in its own process: it runs it as
|
|
161
|
+
* a sibling container, dual-homed between the sandbox's `--internal`
|
|
162
|
+
* network (where the sandbox can reach it, and nothing else) and an
|
|
163
|
+
* ordinary bridge (where it reaches the internet). See
|
|
164
|
+
* {@link renderEgressProxyRunArgs} for the argv and
|
|
165
|
+
* `egress-proxy/Dockerfile` for the image to build.
|
|
166
|
+
*
|
|
167
|
+
* It is a second image rather than a reuse of `image` on purpose, and the
|
|
168
|
+
* reason is deployment-shaped rather than hygienic: the sandbox image is a
|
|
169
|
+
* host-supplied string that this backend cannot read, so there is no way to
|
|
170
|
+
* know whether the image named there has the proxy module in it, and the
|
|
171
|
+
* bind-mount alternative breaks exactly on the remote-daemon deployment
|
|
172
|
+
* (`hostReachability: 'container-network'`) where the SDK's own filesystem
|
|
173
|
+
* is not the daemon's.
|
|
174
|
+
*
|
|
175
|
+
* Unset, an allowlist policy is REFUSED at `create()` rather than
|
|
176
|
+
* downgraded — the same rule the rest of this file applies to a policy it
|
|
177
|
+
* cannot enforce. `deny-all` and `allow-all` need no image.
|
|
178
|
+
*/
|
|
179
|
+
readonly egressProxyImage?: string;
|
|
180
|
+
/**
|
|
181
|
+
* Network the egress proxy joins for its route to the internet. Default
|
|
182
|
+
* `'bridge'`, docker's own default bridge.
|
|
183
|
+
*
|
|
184
|
+
* This is the proxy's second leg, and it exists because the internal
|
|
185
|
+
* network the sandbox sits on has no route out by design. `'bridge'` is
|
|
186
|
+
* the default because it always exists and always has NAT, which keeps a
|
|
187
|
+
* host's first allowlist policy working without a second network to
|
|
188
|
+
* create.
|
|
189
|
+
*
|
|
190
|
+
* **The default is also the one wart of this topology, and a host that
|
|
191
|
+
* shares a docker daemon should know it.** The proxy listens on every
|
|
192
|
+
* interface inside its own container, so any other container attached to
|
|
193
|
+
* the same network reaches it too — and this proxy enforces its allowlist
|
|
194
|
+
* for whoever asks and stamps brokered credentials on the requests it
|
|
195
|
+
* forwards. On `'bridge'` that means every container on the host's default
|
|
196
|
+
* bridge. Name a dedicated network here (one only this deployment's
|
|
197
|
+
* containers join) to decide who that is. There is deliberately no switch
|
|
198
|
+
* that narrows the listener instead: the container has no way to know
|
|
199
|
+
* which of its own interfaces is which, and a listener bound to the wrong
|
|
200
|
+
* one is a sandbox with no route out at all.
|
|
201
|
+
*/
|
|
202
|
+
readonly egressProxyUpstreamNetwork?: string;
|
|
136
203
|
readonly network?: 'none' | 'bridge' | string;
|
|
137
204
|
readonly readyPollIntervalMs?: number;
|
|
138
205
|
readonly readyTimeoutMs?: number;
|
|
@@ -173,6 +240,12 @@ export interface DockerBackendInternalConfig {
|
|
|
173
240
|
* monitoring filters) via `docker ps --filter label=…`. Keys
|
|
174
241
|
* containing `=` or empty names throw at spawn time — the docker
|
|
175
242
|
* CLI accepts them but the resulting label split is ambiguous.
|
|
243
|
+
*
|
|
244
|
+
* They are applied to the egress proxy's container too, when one runs.
|
|
245
|
+
* That is deliberate in both directions: a reaper that collects a
|
|
246
|
+
* sandbox's containers should collect the proxy with them, and a proxy
|
|
247
|
+
* left running by a sandbox that died is a container holding real
|
|
248
|
+
* credentials with a route to the internet.
|
|
176
249
|
*/
|
|
177
250
|
readonly labels?: Readonly<Record<string, string>>;
|
|
178
251
|
}
|
|
@@ -198,6 +271,14 @@ export declare function buildDockerBackend(config: DockerBackendInternalConfig):
|
|
|
198
271
|
* just the way out. It now keeps the configured network, and
|
|
199
272
|
* {@link assertNetworkCarriesThePolicy} is what makes that network a
|
|
200
273
|
* boundary.
|
|
274
|
+
*
|
|
275
|
+
* Every policy that returns the configured network depends on that same
|
|
276
|
+
* assertion, which is why the two live side by side: this function says which
|
|
277
|
+
* network the container joins, and that one refuses the network if it cannot
|
|
278
|
+
* do what the policy asks of it (#398). An allowlist used to answer the
|
|
279
|
+
* configured network and get a proxy environment variable pointed at a
|
|
280
|
+
* host-side listener — enforcement by convention, which an uncooperative
|
|
281
|
+
* process simply ignores.
|
|
201
282
|
*/
|
|
202
283
|
export declare function resolveNetwork(configured: string, egress: EgressPolicy | undefined, hasProxy?: boolean): string;
|
|
203
284
|
/**
|
|
@@ -224,9 +305,9 @@ export declare function isInternalNetwork(inspectedInternalFlag: string): boolea
|
|
|
224
305
|
/**
|
|
225
306
|
* Refuse a container whose network cannot do what was asked of it.
|
|
226
307
|
*
|
|
227
|
-
*
|
|
228
|
-
* unstated — which is how the backend came to ship a default
|
|
229
|
-
* that could not create a sandbox at all:
|
|
308
|
+
* Three requirements meet on the same object here, and the first two were
|
|
309
|
+
* previously unstated — which is how the backend came to ship a default
|
|
310
|
+
* configuration that could not create a sandbox at all:
|
|
230
311
|
*
|
|
231
312
|
* - **A published host port needs a route out.** Docker binds the port by
|
|
232
313
|
* NAT to the container's address, so a container with no address gets no
|
|
@@ -242,24 +323,125 @@ export declare function isInternalNetwork(inspectedInternalFlag: string): boolea
|
|
|
242
323
|
* nothing. `deny-all` pointed at the default bridge would be full egress
|
|
243
324
|
* under a policy object claiming none — the "accepted and silently
|
|
244
325
|
* ignored" failure the rest of this file exists to refuse.
|
|
326
|
+
* - **A host allowlist needs one too, for the same reason and with one
|
|
327
|
+
* addition.** Until #398 the allowlist tier answered the configured
|
|
328
|
+
* network and pointed the sandbox at a proxy running on the host's
|
|
329
|
+
* loopback, and the only thing making traffic go through it was
|
|
330
|
+
* `HTTP_PROXY`. That is a request, not a boundary: anything inside the
|
|
331
|
+
* container that opens a socket directly reaches the network with the
|
|
332
|
+
* allowlist unconsulted, and untrusted code is the caller least likely to
|
|
333
|
+
* honour a convention. With the proxy as a sibling container on an
|
|
334
|
+
* `--internal` network, the only way the sandbox's traffic reaches the
|
|
335
|
+
* internet is that container, and it cannot change that because
|
|
336
|
+
* `--cap-drop=ALL` took `NET_ADMIN` away (see {@link HARDENING_ARGS}). The
|
|
337
|
+
* environment variables stay and now DIRECT traffic rather than permit it.
|
|
338
|
+
* On a network that is not internal there is no such route to remove, and
|
|
339
|
+
* the policy is back to being advisory — which is what this refuses.
|
|
245
340
|
*
|
|
246
|
-
*
|
|
247
|
-
* impossible rather than merely unsupported: no arrangement of docker
|
|
341
|
+
* The first two are exact opposites, so `deny-all` over a published host port
|
|
342
|
+
* is impossible rather than merely unsupported: no arrangement of docker
|
|
248
343
|
* networking both denies all egress and lets the host reach the worker over
|
|
249
|
-
* TCP. Closing that needs the control channel moved off TCP — see #398 —
|
|
250
|
-
*
|
|
344
|
+
* TCP. Closing that needs the control channel moved off TCP — see #398 — and
|
|
345
|
+
* is not a flag this function could accept. The same opposition now reaches
|
|
346
|
+
* an allowlist policy, which is new: an allowlist on an internal network must
|
|
347
|
+
* be reached by container name, so a host that used a published port with a
|
|
348
|
+
* host allowlist has to move that consumer onto the internal network. That is
|
|
349
|
+
* a consequence of the boundary existing at all and not a gap in this
|
|
350
|
+
* function; the refusal below names the mode to move to.
|
|
251
351
|
*/
|
|
252
352
|
export declare function assertNetworkCarriesThePolicy(network: string, reachability: 'host-port' | 'container-network', egress: EgressPolicy | undefined, inspectedInternalFlag: string): void;
|
|
253
353
|
/**
|
|
254
|
-
*
|
|
354
|
+
* What the proxy container is told, as a value.
|
|
355
|
+
*
|
|
356
|
+
* The boundary's whole configuration. It is a value for the reason
|
|
357
|
+
* {@link resolveNetwork} is one: everything downstream of here needs a running
|
|
358
|
+
* Docker daemon, so a credential that failed to reach the boundary could only
|
|
359
|
+
* be caught by an operator noticing their requests arrive unauthenticated in
|
|
360
|
+
* production. A knob a host sets and the boundary never receives is the
|
|
361
|
+
* failure this shape exists to make testable.
|
|
362
|
+
*
|
|
363
|
+
* `parseProxyConfig` in `egress-proxy/server.mjs` refuses every shape in here
|
|
364
|
+
* it cannot read — and this function's own output is fed to that parser by
|
|
365
|
+
* `__tests__/hardening.test.ts`, so the two ends are pinned against each other
|
|
366
|
+
* rather than each against its own idea of the shape. A field renamed on one
|
|
367
|
+
* side alone fails a test rather than starting a boundary that enforces
|
|
368
|
+
* something nobody wrote.
|
|
369
|
+
*/
|
|
370
|
+
export interface EgressProxyContainerConfig {
|
|
371
|
+
readonly port: number;
|
|
372
|
+
readonly allowedHosts: readonly string[];
|
|
373
|
+
readonly credentials: readonly BrokeredCredential[];
|
|
374
|
+
readonly allowInwardFor?: readonly string[];
|
|
375
|
+
/**
|
|
376
|
+
* Names that denote the proxy itself, for its loop guard. The container's
|
|
377
|
+
* own hostname is added to this by the entrypoint; this field carries the
|
|
378
|
+
* network alias, which is the name the sandbox actually dials.
|
|
379
|
+
*/
|
|
380
|
+
readonly selfNames?: readonly string[];
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Build the proxy container's configuration.
|
|
384
|
+
*
|
|
385
|
+
* `allowedHosts` is already resolved here rather than passed as a policy, and
|
|
386
|
+
* that is the one behavioural difference this change carries into the
|
|
387
|
+
* boundary: the in-process proxy called the host's resolver per request, and
|
|
388
|
+
* the container cannot. A `resolver` policy that rotates is honoured at
|
|
389
|
+
* `create()` and again at every `setNetworkPolicy()` — the container has no
|
|
390
|
+
* channel back to the host's resolver, and a channel the container CAN reach
|
|
391
|
+
* is one the sandbox can reach too, which would let the sandbox ask for its
|
|
392
|
+
* own allowlist to be widened. See `docs/sdk/sandbox-egress.md`.
|
|
393
|
+
*/
|
|
394
|
+
export declare function egressProxyContainerConfig(config: Pick<DockerBackendInternalConfig, 'brokeredCredentials' | 'allowInwardFor'>, allowedHosts: readonly string[], port: number): EgressProxyContainerConfig;
|
|
395
|
+
/** Everything {@link renderEgressProxyRunArgs} renders, as a value. */
|
|
396
|
+
export interface EgressProxyArgvInput {
|
|
397
|
+
readonly config: DockerBackendInternalConfig;
|
|
398
|
+
readonly containerName: string;
|
|
399
|
+
/** Network the proxy reaches the internet through. See `egressProxyUpstreamNetwork`. */
|
|
400
|
+
readonly upstreamNetwork: string;
|
|
401
|
+
/** The internal network the sandbox is on, which the proxy is also joined to. */
|
|
402
|
+
readonly internalNetwork: string;
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* The `docker run` argv for the egress proxy container, as a value.
|
|
406
|
+
*
|
|
407
|
+
* Extracted for the reason every other argv in this file is: nothing
|
|
408
|
+
* downstream of it can run without a docker daemon, so a flag that never
|
|
409
|
+
* reached it — or a `--network` that named the wrong side of a dual-homed
|
|
410
|
+
* container — could only be caught by an operator in production, where the
|
|
411
|
+
* symptom is a sandbox that reaches nothing.
|
|
412
|
+
*
|
|
413
|
+
* The two networks are the whole topology and they are two calls:
|
|
414
|
+
* `docker run --network <upstream>` gives the container a default route, and
|
|
415
|
+
* {@link renderEgressProxyAttachArgs}'s `docker network connect` adds the
|
|
416
|
+
* internal network afterwards. The order is load-bearing. Attached to the
|
|
417
|
+
* internal network FIRST it would come up with no default route and no way to
|
|
418
|
+
* acquire one, and the proxy would be a boundary in front of nothing.
|
|
419
|
+
*
|
|
420
|
+
* The hardening baseline is the sandbox's, minus the parts that describe a
|
|
421
|
+
* filesystem. `--cap-drop=ALL`, `--no-new-privileges` and `--ipc private` are
|
|
422
|
+
* applied exactly as {@link HARDENING_ARGS} defines them, because this
|
|
423
|
+
* container sits between untrusted code and the internet and is the last one in
|
|
424
|
+
* the deployment that should be holding a capability. `--read-only` is the
|
|
425
|
+
* sandbox's too, with one tmpfs: the proxy writes nothing, and the tmpfs is
|
|
426
|
+
* there so that a Node process which one day wants a temp file fails at a
|
|
427
|
+
* filesystem boundary rather than at a mysterious `EROFS`.
|
|
255
428
|
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
* traffic denied in production. A knob a host sets and the boundary never
|
|
260
|
-
* receives is the failure this shape exists to make testable.
|
|
429
|
+
* The image is last, so nothing after it is read as a flag — the same rule the
|
|
430
|
+
* sandbox argv follows, and here it also means the image's own `CMD` starts the
|
|
431
|
+
* proxy rather than this argv naming an entrypoint.
|
|
261
432
|
*/
|
|
262
|
-
export declare function
|
|
433
|
+
export declare function renderEgressProxyRunArgs(input: EgressProxyArgvInput): string[];
|
|
434
|
+
/**
|
|
435
|
+
* The `docker network connect` argv that makes the proxy dual-homed.
|
|
436
|
+
*
|
|
437
|
+
* `--alias` is what puts `namzu-egress` in the internal network's DNS, which
|
|
438
|
+
* is the name {@link buildDockerRunArgs} hands the sandbox in its proxy
|
|
439
|
+
* environment. The alias rather than the container name because the alias is
|
|
440
|
+
* the constant: a container named `namzu-egress-<sandbox-id>` would otherwise
|
|
441
|
+
* make the sandbox's `HTTP_PROXY` value depend on a generated id, and the two
|
|
442
|
+
* would have to be kept in step by hand.
|
|
443
|
+
*/
|
|
444
|
+
export declare function renderEgressProxyAttachArgs(input: EgressProxyArgvInput): string[];
|
|
263
445
|
/** The backend config the hardening flags are rendered from. */
|
|
264
446
|
export type DockerHardeningConfig = Pick<DockerBackendInternalConfig, 'cpuLimit' | 'layout' | 'readOnlyRootfs' | 'writableRootfsPaths'>;
|
|
265
447
|
/**
|
|
@@ -345,9 +527,12 @@ export interface DockerRunArgvInput {
|
|
|
345
527
|
readonly network: string;
|
|
346
528
|
readonly hostReachability: 'host-port' | 'container-network';
|
|
347
529
|
/**
|
|
348
|
-
* Port the
|
|
349
|
-
*
|
|
350
|
-
*
|
|
530
|
+
* Port the egress proxy listens on, when one is running. Absent means no
|
|
531
|
+
* proxy, and no proxy environment is passed in — which is not the same
|
|
532
|
+
* fact as a proxy that was configured and is unreachable.
|
|
533
|
+
*
|
|
534
|
+
* It is the proxy CONTAINER's port, on the internal network the two
|
|
535
|
+
* containers share; nothing is published on the host any more.
|
|
351
536
|
*/
|
|
352
537
|
readonly egressProxyPort?: number;
|
|
353
538
|
}
|
|
@@ -355,7 +540,7 @@ export interface DockerRunArgvInput {
|
|
|
355
540
|
* The complete `docker run` argv, as a value.
|
|
356
541
|
*
|
|
357
542
|
* Extracted for the same reason {@link resolveNetwork} and
|
|
358
|
-
* {@link
|
|
543
|
+
* {@link egressProxyContainerConfig} were: everything downstream of it needs a running
|
|
359
544
|
* Docker daemon, so a confinement flag that never reached the argv — or one
|
|
360
545
|
* that reached it in an order that cancels another — could only be caught by an
|
|
361
546
|
* operator noticing its effect missing in production. Spawning a fake `docker`
|
|
@@ -370,6 +555,40 @@ export interface DockerRunArgvInput {
|
|
|
370
555
|
* value is ever re-split by anything downstream.
|
|
371
556
|
*/
|
|
372
557
|
export declare function buildDockerRunArgs(input: DockerRunArgvInput): string[];
|
|
558
|
+
/**
|
|
559
|
+
* The argv as it may appear in an error message: the KEYS of every env
|
|
560
|
+
* entry, with the values replaced.
|
|
561
|
+
*
|
|
562
|
+
* A rendered argv is the last place a secret should survive. A non-zero
|
|
563
|
+
* `docker run` is a routine outcome — a missing image, a name conflict, a
|
|
564
|
+
* daemon hiccup, ENOSPC — and its message goes wherever the sandbox
|
|
565
|
+
* package's errors go: a log line, a telemetry batch, a CI transcript, a
|
|
566
|
+
* pasted bug report. The env flags carry the worker's credential and every
|
|
567
|
+
* value the host put in `options.env` (an API key, a broker token), and
|
|
568
|
+
* none of them are needed to explain an exit code. The keys are kept
|
|
569
|
+
* because they are what distinguishes "the image could not be pulled" from
|
|
570
|
+
* "the environment was rejected".
|
|
571
|
+
*
|
|
572
|
+
* EVERY SPELLING docker accepts for that flag, not the one this backend
|
|
573
|
+
* happens to emit today. `-e` IS `--env`, separated or `=`-attached, and
|
|
574
|
+
* this function used to compare each element to the literal `'--env'`: the
|
|
575
|
+
* long separated form this builder writes was redacted and `-e K=V`,
|
|
576
|
+
* `--env=K=V` and `-e=K=V` were printed in full. A future caller writing
|
|
577
|
+
* any of the three would have put a credential in a log line behind a
|
|
578
|
+
* docblock that promised it would not. The covered forms are `--env K=V`,
|
|
579
|
+
* `--env=K=V`, `-e K=V`, `-e=K=V` and the attached short form `-eK=V`; the
|
|
580
|
+
* one shape it does not read is a value attached to an `-e` bundled into a
|
|
581
|
+
* group of other short flags (`-iteK=V`), which no caller here writes and
|
|
582
|
+
* which no rule short of matching `-e` anywhere inside an option could
|
|
583
|
+
* catch. A valueless entry in any form (`--env K`) is passed through: it
|
|
584
|
+
* resolves from the CLI's own environment and carries no value to redact.
|
|
585
|
+
*
|
|
586
|
+
* That redacts the workspace paths the layout is rendered from as well,
|
|
587
|
+
* which are not secrets. They are also not what an exit code is about, and
|
|
588
|
+
* a rule with exceptions is a rule that leaks the first time someone's
|
|
589
|
+
* credential does not look like one.
|
|
590
|
+
*/
|
|
591
|
+
export declare function redactDockerArgv(args: readonly string[]): string[];
|
|
373
592
|
/**
|
|
374
593
|
* Validate and resolve a {@link ContainerSandboxLayout}. Returns a
|
|
375
594
|
* {@link ResolvedContainerSandboxLayout} with every container path
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/backends/docker/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/backends/docker/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAKH,OAAO,EACN,KAAK,sBAAsB,EAE3B,KAAK,8BAA8B,EAmBnC,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAE/D,OAAO,EAEN,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,MAAM,gBAAgB,CAAA;AAkBvB;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,2BAA2B;IAC3C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,8BAA8B,CAAA;IAC/C,QAAQ,CAAC,YAAY,CAA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