@questpie/sandbox 3.18.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/index.d.mts CHANGED
@@ -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 (M2): manifest-time rejection of private-IP hosts is implemented and
21
- * enforced here. Full connect-time DNS-rebind PINNING (re-resolving and
22
- * re-checking the exact IP the socket connects to, including across redirects)
23
- * is NOT yet implemented — see `TODO(security)` in `sandbox-server.ts`.
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 {
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@questpie/sandbox",
3
- "version": "3.18.0",
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.18.0",
76
- "questpie": "^3.18.0"
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.18.0"
85
+ "questpie": "^3.19.0"
85
86
  }
86
87
  }
@@ -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 (M2): manifest-time rejection of private-IP hosts is implemented and
16
- * enforced here. Full connect-time DNS-rebind PINNING (re-resolving and
17
- * re-checking the exact IP the socket connects to, including across redirects)
18
- * is NOT yet implemented — see `TODO(security)` in `sandbox-server.ts`.
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. */