Title: id(object-plane): verifyReadCapability treats unparseable now as unexpired (fail-open) · Issue #14587 · developing-today/code · GitHub
Open Graph Title: id(object-plane): verifyReadCapability treats unparseable now as unexpired (fail-open) · Issue #14587 · developing-today/code
X Title: id(object-plane): verifyReadCapability treats unparseable now as unexpired (fail-open) · Issue #14587 · developing-today/code
Description: Evidence pkgs/id/hosted-worker/src/object-plane.ts:248-277 (verifyReadCapability): expiry is checked at :269 as if (Date.parse(now) >= expiresMs) { When now is unparseable, Date.parse(now) is NaN, and NaN >= expiresMs is always false — s...
Open Graph Description: Evidence pkgs/id/hosted-worker/src/object-plane.ts:248-277 (verifyReadCapability): expiry is checked at :269 as if (Date.parse(now) >= expiresMs) { When now is unparseable, Date.parse(now) is NaN, ...
X Description: Evidence pkgs/id/hosted-worker/src/object-plane.ts:248-277 (verifyReadCapability): expiry is checked at :269 as if (Date.parse(now) >= expiresMs) { When now is unparseable, Date.parse(now) is Na...
Opengraph URL: https://github.com/developing-today/code/issues/14587
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"id(object-plane): verifyReadCapability treats unparseable now as unexpired (fail-open)","articleBody":"## Evidence\n\n`pkgs/id/hosted-worker/src/object-plane.ts:248-277` (`verifyReadCapability`): expiry is checked at `:269` as\n\n```ts\nif (Date.parse(now) >= expiresMs) {\n```\n\nWhen `now` is unparseable, `Date.parse(now)` is `NaN`, and `NaN >= expiresMs` is always `false` — so the check passes and an expired-but-MAC-valid capability is served. The sibling timestamp checks in the same plane are explicitly fail-closed: `mintReadCapability` rejects an unparseable `expiresAt` (`object-plane.ts:217-219`), `verifyReadCapability` itself rejects an unparseable capability `expiresAt` (`:265-268`), `deleteReplica` rejects an unparseable `fence.reverifiedAt` (`object-plane-r2.ts:259-262`), and `reapStaging` rejects an unparseable cutoff (`object-plane-r2.ts:287-290`). Only the `now` side of the expiry comparison is unchecked.\n\nRepro (throwaway `repro-now-check.mts` in `pkgs/id/hosted-worker`, since removed, tree left clean — run with `node --experimental-strip-types`): mint an expired cap, verify twice:\n\n- control `verifyReadCapability(key, id, part, expired, \"2026-11-24T12:00:00.000Z\")` → rejected `capability_expired` (correct);\n- `verifyReadCapability(key, id, part, expired, \"garbage\")` → **accepted** (fail-open).\n\n`read()` threads `opts.now` straight into `verifyReadCapability` (`object-plane-r2.ts:235-237`), so `adapter.read(id, expiredCap, { now: \"garbage\" })` inherits the bypass. The existing conformance case (`object-plane-conformance.ts:387-389`) covers expired-with-valid-now only, so nothing pins the unparseable-`now` path.\n\n## Why it matters\n\nThe adapter contract says every failure is a FailClosed, never a silent fallback (`object-plane.ts:137-139`). An unparseable clock value silently disabling expiry breaks that promise on the read path — the one path the design relies on for revocation lag bounding (capabilities \"expire on their own\", `object-plane.ts:37-39`).\n\n## Acceptance criteria / suggested fix shape\n\n- `verifyReadCapability` parses `now` once and throws `FailClosed` (e.g. `capability_bad_now` / reuse `capability_expired`) when it is `NaN`, before the `>=` comparison — mirroring the existing `:265-268` expiry-shape check.\n- Regression test in the shared conformance suite: expired cap + unparseable `now` is rejected (FailClosed), alongside the existing expired-with-valid-now case; valid cap + unparseable `now` is likewise rejected rather than served.\n- Related but distinct: #12804 (slice 2, R2 adapter — merged) and #12808 (slice 6 GC/revocation conformance) — neither pins the `now`-parsing path. `verifyReadCapability` / `capability_expired` open-issue searches surface only #12808.\n\n\u003c!-- pm-metadata:start -->\n```json\n{\n \"direct_parent\": null,\n \"links\": [],\n \"lineage\": {\n \"design\": null,\n \"roadmap_item\": null,\n \"priority\": null\n },\n \"pm_meta\": 1,\n \"provenance\": {\n \"queue_id\": null,\n \"scheduled_start\": null,\n \"picked_up_at\": null,\n \"work_started_at\": null,\n \"created_at\": \"2026-11-24T20:18:34Z\",\n \"session_id\": \"ses_e5df0db143affeAXAiwWFwgffe\",\n \"lane\": null,\n \"host\": \"amd\",\n \"worktree\": \"/home/user/git/code\",\n \"model\": null,\n \"lane_start_issues\": [],\n \"workspace_ref\": {\n \"kind\": \"worktree\",\n \"id\": \"/home/user/git/code\",\n \"repo\": \"developing-today/code\",\n \"branch\": \"oc-code-07/23641-consolidate-14415-into-14492\",\n \"sha\": \"831716d093fedb512a0e631a5b7bff8a7b6534f5\"\n },\n \"auth_subject\": \"oc-code-05\",\n \"stamped_by\": \"fleet 0.1.0 (native)\"\n }\n}\n```\n\u003c!-- pm-metadata:end -->\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-11-24T20:18:38Z","url":"https://github.com/developing-today/code/issues/14587"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:05462468-321a-2582-1397-35a23338be9d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E364:30F58B:1000:14F0:6B060AA6 |
| html-safe-nonce | b0e3933b1c0d6a74fe14b5dc5452c3bb07b9162fda57ace3a25694fcd530275a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzY0OjMwRjU4QjoxMDAwOjE0RjA6NkIwNjBBQTYiLCJ2aXNpdG9yX2lkIjoiMzA4MzI4MTQ5MjI5OTA5MDU5OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7caf93ed8fe441b0965be44fa461ff71a273b6f3063d470592471ef6d3c3e811 |
| hovercard-subject-tag | issue:6590606913 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/14587/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2ec5a9a809aa84d8c938f560acd200f7fb2a896e9b7fa9f141003e61b3162ed8/developing-today/code/issues/14587 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2ec5a9a809aa84d8c938f560acd200f7fb2a896e9b7fa9f141003e61b3162ed8/developing-today/code/issues/14587 |
| og:image:alt | Evidence pkgs/id/hosted-worker/src/object-plane.ts:248-277 (verifyReadCapability): expiry is checked at :269 as if (Date.parse(now) >= expiresMs) { When now is unparseable, Date.parse(now) is NaN, ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 47127d2f2009e000f3401193f8b4163109ac669adad0804de1ee0e6333ca7b9e |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0760ea46a027ba5099cdef7abd54f27865eb4f44 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width