@questpie/sandbox 3.17.0 → 3.19.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/dist/{adapter-http-DDeL-Ym3.d.mts → adapter-http-CCmYxOrN.d.mts} +1 -1
- package/dist/adapter.d.mts +2 -2
- package/dist/{custom-tools-CgfgyVNv.d.mts → custom-tools-CbaRJ1ei.d.mts} +0 -2
- package/dist/index.d.mts +21 -6
- package/dist/modules/sandbox.d.mts +1 -2
- package/package.json +6 -5
- package/src/net-validation.ts +19 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as SandboxCustomToolsRunOptions } from "./custom-tools-
|
|
1
|
+
import { a as SandboxCustomToolsRunOptions } from "./custom-tools-CbaRJ1ei.mjs";
|
|
2
2
|
import { ExecutorAdapter, ExecutorRunOptions, ExecutorRunResult } from "questpie/executor";
|
|
3
3
|
|
|
4
4
|
//#region src/workload-admission.d.ts
|
package/dist/adapter.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { f as SandboxWorkloadPolicy, i as httpSandboxAdapter, n as HttpSandboxAdapterOptions, o as SandboxWorkloadAuditContext, p as SandboxWorkloadRunOptions, r as WorkloadHttpSandboxOptions, s as SandboxWorkloadAuditEvent, t as HttpSandboxAdapter, u as SandboxWorkloadAuthorizer } from "./adapter-http-
|
|
2
|
-
import { a as SandboxCustomToolsRunOptions, i as SandboxCustomToolsLimits, n as SandboxCustomToolEvidenceEvent, o as sandboxCustomTools, r as SandboxCustomToolsConfig, t as SandboxCustomToolEvidenceContext } from "./custom-tools-
|
|
1
|
+
import { f as SandboxWorkloadPolicy, i as httpSandboxAdapter, n as HttpSandboxAdapterOptions, o as SandboxWorkloadAuditContext, p as SandboxWorkloadRunOptions, r as WorkloadHttpSandboxOptions, s as SandboxWorkloadAuditEvent, t as HttpSandboxAdapter, u as SandboxWorkloadAuthorizer } from "./adapter-http-CCmYxOrN.mjs";
|
|
2
|
+
import { a as SandboxCustomToolsRunOptions, i as SandboxCustomToolsLimits, n as SandboxCustomToolEvidenceEvent, o as sandboxCustomTools, r as SandboxCustomToolsConfig, t as SandboxCustomToolEvidenceContext } from "./custom-tools-CbaRJ1ei.mjs";
|
|
3
3
|
export { HttpSandboxAdapter, type HttpSandboxAdapterOptions, type SandboxCustomToolEvidenceContext, type SandboxCustomToolEvidenceEvent, type SandboxCustomToolsConfig, type SandboxCustomToolsLimits, type SandboxCustomToolsRunOptions, type SandboxWorkloadAuditContext, type SandboxWorkloadAuditEvent, type SandboxWorkloadAuthorizer, type SandboxWorkloadPolicy, type SandboxWorkloadRunOptions, type WorkloadHttpSandboxOptions, httpSandboxAdapter, sandboxCustomTools };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as SandboxWorkloadAdmissionVerification, C as SandboxCapabilities, D as SandboxWorkloadAdmissionClaims, E as WORKLOAD_ADMISSION_HEADER, O as SandboxWorkloadAdmissionDenialReason, S as SandboxBindings, T as SandboxRunResult, _ as GuestResultMessage, a as SANDBOX_WORKLOAD_DENIAL_MESSAGE, b as HostRpcResultMessage, c as SandboxWorkloadAuthorizationContext, d as SandboxWorkloadDeniedError, f as SandboxWorkloadPolicy, g as GuestMessage, h as FRAME_MARKER, i as httpSandboxAdapter, k as SandboxWorkloadAdmissionKey, l as SandboxWorkloadAuthorizationPhase, m as BINDINGS_TOKEN_HEADER, n as HttpSandboxAdapterOptions, o as SandboxWorkloadAuditContext, p as SandboxWorkloadRunOptions, r as WorkloadHttpSandboxOptions, s as SandboxWorkloadAuditEvent, t as HttpSandboxAdapter, u as SandboxWorkloadAuthorizer, v as GuestRpcMessage, w as SandboxRunRequest, x as SandboxBindingError, y as HOST_ADMISSION_HEADER } from "./adapter-http-
|
|
2
|
-
import { a as SandboxCustomToolsRunOptions, i as SandboxCustomToolsLimits, n as SandboxCustomToolEvidenceEvent, o as sandboxCustomTools, r as SandboxCustomToolsConfig, t as SandboxCustomToolEvidenceContext } from "./custom-tools-
|
|
1
|
+
import { A as SandboxWorkloadAdmissionVerification, C as SandboxCapabilities, D as SandboxWorkloadAdmissionClaims, E as WORKLOAD_ADMISSION_HEADER, O as SandboxWorkloadAdmissionDenialReason, S as SandboxBindings, T as SandboxRunResult, _ as GuestResultMessage, a as SANDBOX_WORKLOAD_DENIAL_MESSAGE, b as HostRpcResultMessage, c as SandboxWorkloadAuthorizationContext, d as SandboxWorkloadDeniedError, f as SandboxWorkloadPolicy, g as GuestMessage, h as FRAME_MARKER, i as httpSandboxAdapter, k as SandboxWorkloadAdmissionKey, l as SandboxWorkloadAuthorizationPhase, m as BINDINGS_TOKEN_HEADER, n as HttpSandboxAdapterOptions, o as SandboxWorkloadAuditContext, p as SandboxWorkloadRunOptions, r as WorkloadHttpSandboxOptions, s as SandboxWorkloadAuditEvent, t as HttpSandboxAdapter, u as SandboxWorkloadAuthorizer, v as GuestRpcMessage, w as SandboxRunRequest, x as SandboxBindingError, y as HOST_ADMISSION_HEADER } from "./adapter-http-CCmYxOrN.mjs";
|
|
2
|
+
import { a as SandboxCustomToolsRunOptions, i as SandboxCustomToolsLimits, n as SandboxCustomToolEvidenceEvent, o as sandboxCustomTools, r as SandboxCustomToolsConfig, t as SandboxCustomToolEvidenceContext } from "./custom-tools-CbaRJ1ei.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/net-validation.d.ts
|
|
5
5
|
|
|
@@ -17,10 +17,25 @@ import { a as SandboxCustomToolsRunOptions, i as SandboxCustomToolsLimits, n as
|
|
|
17
17
|
* Bun/Node (manifest validation in the adapter) and Deno (the sandbox server).
|
|
18
18
|
* It defaults to `node:dns/promises`, which both Bun and Deno implement.
|
|
19
19
|
*
|
|
20
|
-
* SCOPE
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* is NOT
|
|
20
|
+
* SCOPE: this module is the MANIFEST-TIME check — it rejects a host whose
|
|
21
|
+
* records already point somewhere private before the run is admitted.
|
|
22
|
+
*
|
|
23
|
+
* It is NOT the rebinding defense, and does not need to be. Connect-time
|
|
24
|
+
* pinning lives on the trusted host in the core executor's brokered fetch
|
|
25
|
+
* (`questpie/src/server/modules/core/integrated/executor/bindings/host-fetch.ts`):
|
|
26
|
+
* the guest runs with `--allow-net=[]` and cannot open a socket at all, so every
|
|
27
|
+
* request is relayed to the broker, which resolves the host itself, validates
|
|
28
|
+
* every A and AAAA record, pins the socket to a validated IP literal while
|
|
29
|
+
* keeping the hostname for SNI and the Host header, and re-resolves and
|
|
30
|
+
* re-validates each redirect hop with auto-follow disabled.
|
|
31
|
+
*
|
|
32
|
+
* On Linux there is additionally a kernel-level egress drop
|
|
33
|
+
* (`egress-firewall.ts`) as a second, independent boundary.
|
|
34
|
+
*
|
|
35
|
+
* An earlier version of this comment said pinning was unimplemented and pointed
|
|
36
|
+
* at a `TODO(security)` in `sandbox-server.ts`. Both the TODO and the gap are
|
|
37
|
+
* gone; `test/unit/services/host-fetch-ssrf.test.ts` covers redirect re-pinning,
|
|
38
|
+
* open-redirect egress, metadata addresses and non-decimal IPv4 encodings.
|
|
24
39
|
*/
|
|
25
40
|
/** A single parsed `host[:port]` allowlist entry. */
|
|
26
41
|
interface ParsedHost {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "../custom-tools-
|
|
1
|
+
import "../custom-tools-CbaRJ1ei.mjs";
|
|
2
2
|
import * as questpie0 from "questpie";
|
|
3
3
|
import { routeApp } from "questpie";
|
|
4
|
-
import "questpie/executor";
|
|
5
4
|
import { RouteDefinition, RouteParamsFromKey } from "questpie/types";
|
|
6
5
|
|
|
7
6
|
//#region src/server/modules/sandbox/routes/sandbox/rpc.d.ts
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@questpie/sandbox",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.19.0",
|
|
4
4
|
"private": false,
|
|
5
|
+
"description": "Hardened isolated-script execution for QUESTPIE",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
7
8
|
"url": "https://github.com/questpie/questpie.git",
|
|
@@ -68,12 +69,12 @@
|
|
|
68
69
|
"scripts": {
|
|
69
70
|
"build": "tsdown",
|
|
70
71
|
"check-types": "tsc --noEmit",
|
|
71
|
-
"questpie:generate": "bun questpie generate --verbose",
|
|
72
|
+
"questpie:generate": "bun run ../questpie/src/exports/cli.ts generate --verbose",
|
|
72
73
|
"test": "bun test"
|
|
73
74
|
},
|
|
74
75
|
"dependencies": {
|
|
75
|
-
"@questpie/mcp": "^3.
|
|
76
|
-
"questpie": "^3.
|
|
76
|
+
"@questpie/mcp": "^3.19.0",
|
|
77
|
+
"questpie": "^3.19.0"
|
|
77
78
|
},
|
|
78
79
|
"devDependencies": {
|
|
79
80
|
"bun-types": "latest",
|
|
@@ -81,6 +82,6 @@
|
|
|
81
82
|
"zod": "^4.2.1"
|
|
82
83
|
},
|
|
83
84
|
"peerDependencies": {
|
|
84
|
-
"questpie": "^3.
|
|
85
|
+
"questpie": "^3.19.0"
|
|
85
86
|
}
|
|
86
87
|
}
|
package/src/net-validation.ts
CHANGED
|
@@ -12,10 +12,25 @@
|
|
|
12
12
|
* Bun/Node (manifest validation in the adapter) and Deno (the sandbox server).
|
|
13
13
|
* It defaults to `node:dns/promises`, which both Bun and Deno implement.
|
|
14
14
|
*
|
|
15
|
-
* SCOPE
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* is NOT
|
|
15
|
+
* SCOPE: this module is the MANIFEST-TIME check — it rejects a host whose
|
|
16
|
+
* records already point somewhere private before the run is admitted.
|
|
17
|
+
*
|
|
18
|
+
* It is NOT the rebinding defense, and does not need to be. Connect-time
|
|
19
|
+
* pinning lives on the trusted host in the core executor's brokered fetch
|
|
20
|
+
* (`questpie/src/server/modules/core/integrated/executor/bindings/host-fetch.ts`):
|
|
21
|
+
* the guest runs with `--allow-net=[]` and cannot open a socket at all, so every
|
|
22
|
+
* request is relayed to the broker, which resolves the host itself, validates
|
|
23
|
+
* every A and AAAA record, pins the socket to a validated IP literal while
|
|
24
|
+
* keeping the hostname for SNI and the Host header, and re-resolves and
|
|
25
|
+
* re-validates each redirect hop with auto-follow disabled.
|
|
26
|
+
*
|
|
27
|
+
* On Linux there is additionally a kernel-level egress drop
|
|
28
|
+
* (`egress-firewall.ts`) as a second, independent boundary.
|
|
29
|
+
*
|
|
30
|
+
* An earlier version of this comment said pinning was unimplemented and pointed
|
|
31
|
+
* at a `TODO(security)` in `sandbox-server.ts`. Both the TODO and the gap are
|
|
32
|
+
* gone; `test/unit/services/host-fetch-ssrf.test.ts` covers redirect re-pinning,
|
|
33
|
+
* open-redirect egress, metadata addresses and non-decimal IPv4 encodings.
|
|
19
34
|
*/
|
|
20
35
|
|
|
21
36
|
/** A single parsed `host[:port]` allowlist entry. */
|