Skip to content

Commit 4cc2c8f

Browse files
committed
chore: update progress for US-115
1 parent 1ad7324 commit 4cc2c8f

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

scripts/ralph/prd.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2038,7 +2038,7 @@
20382038
"Tests pass"
20392039
],
20402040
"priority": 121,
2041-
"passes": false,
2041+
"passes": true,
20422042
"notes": "Audit L2 — LOW. apply-timing-mitigation-freeze.ts:42-44. Current deletion is a simple delete which may not work if SAB was already captured by sandbox code."
20432043
},
20442044
{

scripts/ralph/progress.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,3 +1539,19 @@ PRD: ralph/kernel-hardening (46 stories)
15391539
- assertTextPayloadSize is the convenience wrapper for text (handles UTF-8 byte length calculation)
15401540
- readFileRef returns string from readTextFile; readFileBinaryRef returns base64-encoded Buffer — different limits and guards needed
15411541
---
1542+
1543+
## 2026-03-18 - US-115
1544+
- What was implemented: Hardened SharedArrayBuffer deletion in timing mitigation freeze
1545+
- Replaced simple `delete` with `Object.defineProperty` using `configurable: false, writable: false` to lock the global
1546+
- Added prototype neutering: byteLength, slice, grow, maxByteLength, growable properties redefined as throwing getters
1547+
- Fallback path preserved for edge cases where defineProperty fails
1548+
- Files changed:
1549+
- packages/secure-exec-core/isolate-runtime/src/inject/apply-timing-mitigation-freeze.ts — replaced 3-line delete with robust hardening (prototype neutering + non-configurable defineProperty)
1550+
- packages/secure-exec-core/src/generated/isolate-runtime.ts — auto-regenerated by build:isolate-runtime
1551+
- packages/secure-exec/tests/runtime-driver/node/index.test.ts — added 2 tests: cannot restore SAB via defineProperty/assignment, property descriptor is non-configurable/non-writable
1552+
- **Learnings for future iterations:**
1553+
- Object.defineProperty with configurable: false prevents sandbox code from redefining globals — use this for all security-critical global removals
1554+
- Prototype neutering must happen BEFORE the global is deleted/replaced, since after deletion you lose the reference
1555+
- isolate-runtime sources must be regenerated via `pnpm --filter @secure-exec/core run build:isolate-runtime` after any change
1556+
- 5 HTTP/network tests in index.test.ts are pre-existing ECONNREFUSED flakes (serves requests, coerces 0.0.0.0, terminate server, maxSockets, upgrade)
1557+
---

0 commit comments

Comments
 (0)