Skip to content

Commit 84d0869

Browse files
committed
chore: update progress for US-114
1 parent 4a7d105 commit 84d0869

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

scripts/ralph/prd.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2008,7 +2008,7 @@
20082008
"Tests pass"
20092009
],
20102010
"priority": 119,
2011-
"passes": false,
2011+
"passes": true,
20122012
"notes": "Audit M8 — MEDIUM. process.ts:519-520, child-process.ts:447-448. process.env mutations are unrestricted and combined with H5, process.env.LD_PRELOAD then execSync('cmd') passes the injected variable. Related to US-109."
20132013
},
20142014
{

scripts/ralph/progress.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,3 +1514,16 @@ PRD: ralph/kernel-hardening (46 stories)
15141514
- DNS rebinding is documented as a known limitation — would require pinning resolved IPs to the connection, not possible with native fetch
15151515
- 5 pre-existing test failures in index.test.ts (http.Agent, upgrade, server termination) are NOT caused by SSRF changes — they fail identically on the pre-SSRF commit
15161516
---
1517+
1518+
## 2026-03-18 - US-114
1519+
- Implemented process.env isolation: child processes spawned without explicit env now receive the init-time filtered env instead of inheriting undefined (which could allow host env leakage)
1520+
- Modified both streaming spawn (spawnStartRef) and synchronous spawn (spawnSyncRef) in bridge-setup.ts to fall back to `deps.processConfig.env` when `options.env` is undefined
1521+
- Combined with existing `stripDangerousEnv()`, this provides defense-in-depth: sandbox env mutations never reach children, and dangerous keys are always stripped
1522+
- Files changed:
1523+
- packages/secure-exec-node/src/bridge-setup.ts (init-time env fallback for both spawn paths)
1524+
- packages/secure-exec/tests/runtime-driver/node/env-leakage.test.ts (2 new tests)
1525+
- **Learnings for future iterations:**
1526+
- Two-layer env defense: permission-based filterEnv() at init + stripDangerousEnv() per-spawn — both layers needed
1527+
- `deps.processConfig.env` is the init-time filtered env (already filtered by `filterEnv()` in execution-driver.ts) — safe to use as fallback
1528+
- When `options.env` is undefined, `stripDangerousEnv(undefined)` returns undefined — the fallback must happen BEFORE the strip call
1529+
---

0 commit comments

Comments
 (0)