You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scripts/ralph/prd.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2124,7 +2124,7 @@
2124
2124
"Tests pass"
2125
2125
],
2126
2126
"priority": 126,
2127
-
"passes": false,
2127
+
"passes": true,
2128
2128
"notes": "Audit M2 — MEDIUM. apply-timing-mitigation-freeze.ts:13-17. Date.now is set with writable: true, configurable: true. Sandbox code can restore it trivially."
- Source policy tests (isolate-runtime-injection-policy, bridge-registry-policy) read specific source files by path — update them when moving code between files
108
108
- esmModuleCache has a sibling esmModuleReverseCache (Map<ivm.Module, string>) for O(1) module→path lookup — both must be updated together and cleared together in execution.ts
109
109
- Network adapter SSRF: isPrivateIp() + assertNotPrivateHost() in driver.ts; fetch uses redirect:'manual' with per-hop re-validation; httpRequest has pre-flight check only (no auto-redirect); data:/blob: URLs skip SSRF check
110
+
- V8 isolate native `performance` object has non-configurable `now` — must replace entire global with frozen proxy; after build:isolate-runtime, also run core tsc to update dist .js
- Testing handle cap directly via _registerHandle/_unregisterHandle globals from sandbox code is simpler and more reliable than testing through child_process.spawn (which has async lifecycle)
1614
1615
- The 5 failures in tests/runtime-driver/node/index.test.ts (ECONNREFUSED + upgrade) are pre-existing and unrelated
1615
1616
---
1617
+
1618
+
## 2026-03-18 - US-111
1619
+
- What was implemented: Hardened timing mitigation — Date.now frozen as non-configurable/non-writable, Date constructor patched to return frozen time for no-arg `new Date()`, performance global replaced with frozen proxy object
1620
+
- Files changed:
1621
+
- packages/secure-exec-core/isolate-runtime/src/inject/apply-timing-mitigation-freeze.ts — Date.now: configurable/writable→false; new Date constructor wrapper with frozen no-arg time; performance: replaced native with Object.create(null) + Object.freeze + non-configurable global property
1622
+
- packages/secure-exec-core/src/generated/isolate-runtime.ts — auto-regenerated by build:isolate-runtime
- V8 isolate's native `performance` object has non-configurable `now` property — Object.defineProperty in-place fails silently to catch block; must replace the entire global with a frozen proxy
1626
+
- `Object.defineProperty(globalThis, "performance", { configurable: false })` works in isolated-vm — the global proxy supports non-configurable data properties
1627
+
- Assignment to non-writable property silently fails in sloppy mode, throws TypeError only in strict mode — security tests must use `'use strict'` to verify TypeError
1628
+
- `build:isolate-runtime` generates the `.ts` source, but `@secure-exec/core` tsc must run to compile to dist `.js` — tests resolve through compiled dist, not raw .ts
1629
+
- Date constructor replacement: must use Object.defineProperty for prototype (direct assignment fails with TS2540), forward parse/UTC, lock Date.now on replacement too
0 commit comments