Skip to content

[Chore] Patch reachable cron-parser and Hono security dependencies - #3744

Merged
daniel-lxs merged 1 commit into
developfrom
fix/reachable-security-deps-2oaj06psb0rni
Nov 26, 2026
Merged

daniel-lxs merged 1 commit into
developfrom
fix/reachable-security-deps-2oaj06psb0rni

Conversation

@roomote-roomote

Copy link
Copy Markdown
Contributor

​Opened on behalf of @daniel-lxs. View the session or mention @roomote-roomote for follow-up asks.

Related issue

Requested security dependency investigation; no linked issue.

Why this PR exists

  • A maintainer explicitly invited this PR in the linked issue or discussion
  • I am a maintainer / this is internal Roomote work

Patch source-reachable resource-exhaustion code after verifying current develop and all four maintainer advisories. The supplied scan was stale for Hono and Better Auth. Keep this PR in draft; no merge or auto-merge is requested.

What changed

  • Pin direct cron-parser 5.6.1 → 5.10.6 in web, SDK and cloud-agents. Scheduling helpers execute the affected sequence parser on user/agent-influenced expressions. Existing 160/200-character entry-point limits constrain exploitability; no deployed OOM is claimed. 5.10.6 covers GHSA-r9w7-75q6-r884, including subsequent parser hardening in the same patch line.
  • Align Hono 4.13.16 → 4.13.18 across API, worker, BullMQ and the existing global override. Actual API and worker bodyLimit() use reaches GHSA-39q9-qp46-w8xg. In particular, credential-egress proxy buffering runs before substitute authentication; its 8 MiB byte limit did not bound per-chunk object overhead. The update consolidates chunks into bounded buffering.
  • Regenerate only the root lockfile's affected resolutions and peer identities. Parsed graph comparison confirms no unrelated package version changes. Preserve the seven-day minimum release age, exclusions and build-script policy: cron-parser 5.10.6 was published November 14; Hono 4.13.18 on November 11.

Exclusions and residuals:

  • Better Auth remains 1.7.25, already above the 1.7.16 fix for GHSA-2f9c-7xj7-gh55. apps/web/src/lib/server/auth.ts:1234–1248 does not configure emailOTP(); the advisory's OTP flows are not reached.
  • Hono validator: no direct or reviewed transitive validator('json'|'form') path was found. Roomote uses explicit reads and Zod/MCP/tRPC validation. GHSA-92p4-j3wq-jmqx is incidentally covered by the body-limit-driven Hono update, not a separately proven exploit.
  • cron-parser 4.9.0 remains under BullMQ 5.78.0. Its affected sequence algorithm is present and its parser executes, but the only repository BullMQ cron pattern is the trusted constant '0 7 * * *' (apps/bullmq/src/scheduler.ts:246–250); other schedulers use numeric every. User automation/wakeup cron is evaluated by direct v5 helpers. This is a trusted-input residual, not a claim that v4 is patched. A v5 override would break BullMQ's removed parseExpression API. No cross-major override, fork or unrelated BullMQ 6 migration is introduced. Reassess if user-controlled patterns or externally modified scheduler data are admitted.
  • The independent .docker/app/runtime-deps/api manifest/lock graph contains none of these target packages; no standalone lockfile edit is needed. API bundles and Next standalone originate from the root workspace graph.

No intended feature or UI change. Pathological cron fields now fail with a normal parser error, and Hono buffers tiny chunks without retaining one object per chunk.

How it was tested

  • Frozen workspace install; pnpm lint:fast, pnpm check-types:fast (27 packages), pnpm knip, manifest formatting and git diff --check pass. Commit and push hooks also pass.
  • 456 focused tests across 15 files pass: wakeup parsing/scheduling, custom automation and Manager Stats scheduling, browser cron previews, worker Jevgrep proxy/Judgement hook, BullMQ scheduler, API sessions/attachments, credential control/proxy, HTTP integrations, inference and GitLab MCP.
  • Bounded library probe: old cron-parser expands a 40,001-byte field into 1,200,060 elements; 5.10.6 rejects it. Patched Hono coalesces 1,000 one-byte chunks into one replay buffer and preserves 413 above the configured limit. BullMQ's actual repeat strategy retains v4 API compatibility and computes the next trusted daily run.
  • Root/standalone graph and release-age assertions pass. pnpm audit --prod --json reports zero findings both before and after; this does not supersede source reachability or maintainer advisories.
  • Initial API run encountered a database cleanup deadlock during concurrent test-schema setup; isolated sequential rerun passes all 133 tests. A temporary graph-check script initially made an overbroad version-string substitution; corrected package-specific assertions pass. Both failed outputs are retained.
  • Not run: full test suite, production container/Next standalone builds, live production/Redis inspection, real upstream integration calls or destructive OOM attacks. No visual proof: screenshots cannot establish these dependency-security claims.

Reachability report, including source paths/lines and all four advisory analyses

Validation commands, exit codes and output

Artifacts belong to task 2oaj06psb0rni; stored paths: tmp/opencode/reachability-report.md, tmp/opencode/validation-sanitized.log, tmp/opencode/security-probes.mjs, tmp/opencode/graph-validation.cjs.

Checklist

  • The PR title follows the repo convention: [Fix], [Feat], [Improve], [Refactor], [Docs], or [Chore] followed by a user-facing description
  • This PR is small and scoped to one change
  • pnpm lint and pnpm check-types pass locally
  • I added tests or included a clear manual validation note above
  • I removed secrets, tokens, private keys, and customer data from code, logs, and screenshots
  • If this change should appear in the changelog, I ran pnpm changeset

The exact formatting-inclusive commands in the checklist were not run; the repository's normal fast lint/typecheck gates and targeted manifest formatting were run instead. No changeset was added for this dependency-only remediation.

@roomote-community

roomote-community Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

No code issues found. See session

Reviewed all eight changed files, dependency/peer-resolution consistency, cron scheduling callers, and Hono body-limit compatibility. No unrelated lockfile changes found. Current-head CI lint, typecheck, Knip, upgrade compatibility, and both Docker builds pass; tests and JavaScript/TypeScript CodeQL analysis are still running.

Reviewed 24f8f00

@daniel-lxs
daniel-lxs marked this pull request as ready for review November 26, 2026 17:52
@daniel-lxs
daniel-lxs merged commit f704fbd into develop Nov 26, 2026
26 checks passed
@daniel-lxs
daniel-lxs deleted the fix/reachable-security-deps-2oaj06psb0rni branch November 26, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant