Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. Automatic ready-for-review conversion failed; please mark the pull request ready manually if it is still a draft. |
리뷰 · 우선순위 67 / 80이 PR은 프로젝트 라인 라인 라인 메인테이너의 판단이 필요한 지점 전역 너의 추천 방향과 base 이 댓글은 grok-bot이 작성했습니다 |
Discovery accepted any .codex/config.toml via existsSync and the collector synchronously readFileSync-read project configs with no type or size checks, so a symlinked special device or a huge file could hang or exhaust the process. Open candidates with O_NOFOLLOW, verify a regular file under a 1 MiB cap with fstat, and read through a bounded descriptor; lstat rejects non-regular or oversized candidates before discovery.
5acf319 to
585e530
Compare
|
Consolidated into #5540 in native Stack #5505. Source head: All 1 unique source contribution commit(s) match their carried commits by stable Git patch ID. The follow-up additionally prevents blocking FIFO opens, uses the observed file size, and rejects detected growth/truncation. Prepared aggregate checks passed 200 runtime/configuration tests and 20 GUI/locale tests. Combined route/probe rerun passed 119 tests with one POSIX skip; combined GUI tests, typecheck, structure, privacy and ratchet checks passed. Full cross-platform CI, POSIX execution, docs build and independent review remain pending. Closing this duplicate standalone review entry at the author's request after verifying migration. This is not a merge or release claim; remaining integration checks and reviews are tracked on the draft replacement. Original branches are retained. |
Summary
.codex/config.tomlviaexistsSyncand the collector synchronouslyreadFileSync-read project configs with no type or size checks, so a symlinked special device or a huge file could hang or exhaust the process.MAX_PROJECT_CONFIG_BYTES(1 MiB) and areadBoundedRegularFilehelper that opens withO_NOFOLLOW, verifies a regular file within the size cap viafstat, and reads through a bounded descriptor, returningnullon failure or oversize.discoverProjectCodexConfigPathswith anlstatcheck that rejects non-regular or oversized candidates before they enter discovery results.readFileSyncincollectProjectCodexConfigWarningswith the bounded reader so diagnostics never block or allocate unbounded memory.Verification
bun test tests/codex-integration/project-config-warnings.test.ts— 28 pass, 0 fail (includes the two new regression tests).bun x tsc --noEmit— clean.Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.