Skip to content

Commit 0ba7121

Browse files
NathanFlurryclaude
andcommitted
chore: mark US-028 complete and update progress log
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b216040 commit 0ba7121

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

progress.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2816,3 +2816,16 @@ PRD: ralph/kernel-hardening (46 stories)
28162816
- Postgres SSL: use custom Dockerfile (postgres-ssl.Dockerfile) that installs openssl and generates self-signed cert; existing pg fixtures still work when server has SSL enabled (SSL is optional)
28172817
- pg_stat_ssl system view verifies the connection is actually encrypted — query WHERE pid = pg_backend_pid()
28182818
---
2819+
2820+
## 2026-03-19 - US-028
2821+
- Implemented HTTPS error handling e2e tests for TLS edge cases
2822+
- Three parity tests: expired cert, hostname mismatch, self-signed cert with rejectUnauthorized:true
2823+
- Tests generate certs via openssl, start HTTPS servers on ephemeral ports, compare host vs sandbox error messages
2824+
- Files changed:
2825+
- packages/secure-exec/tests/runtime-driver/node/https-errors.test.ts (new)
2826+
- **Learnings for future iterations:**
2827+
- TLS error messages propagate correctly through the httpRequest bridge — the adapter rejects with the same Node.js error, and isolated-vm delivers it to the sandbox's catch block
2828+
- openssl days=0 generates a cert that expires at issuance — a 2s delay in beforeAll ensures the cert is actually expired when tests run
2829+
- Self-signed cert (no CA in trust chain) with default rejectUnauthorized=true triggers SELF_SIGNED_CERT_IN_CHAIN
2830+
- Hostname mismatch cert (SAN=wrong.example.com, connecting to 127.0.0.1) triggers ERR_TLS_CERT_ALTNAME_MISMATCH
2831+
---

scripts/ralph/prd.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,8 @@
498498
"Tests pass"
499499
],
500500
"priority": 28,
501-
"passes": false,
502-
"notes": "The existing https-streams.test.ts tests the happy path (self-signed with rejectUnauthorized:false and valid cert chain). Error cases for TLS validation failures are untested. If the sandbox silently accepts bad certs, this is a security issue."
501+
"passes": true,
502+
"notes": "Completed. Three TLS error scenarios tested with parity: expired cert (CERT_HAS_EXPIRED), hostname mismatch (ERR_TLS_CERT_ALTNAME_MISMATCH), self-signed cert with rejectUnauthorized:true (SELF_SIGNED_CERT_IN_CHAIN). Each test generates certs via openssl, starts HTTPS servers, and compares host vs sandbox error messages. TLS errors propagate correctly through the httpRequest bridge."
503503
}
504504
]
505505
}

0 commit comments

Comments
 (0)