🔒 [보안] CLI 무제한 파일 읽기 취약점 수정 - #811
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
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: trueNote Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughCLI의 stdin, 인라인 작업, 작업 파일 입력에 UTF-8 바이트 기준 10MB 제한을 추가했습니다. 잘못된 인자와 권한 없는 작업 파일을 거부합니다. 직접적인 ChangesCLI 입력 및 작업 파일 검증
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: 🟡 Moderate · up to The CLI still misclassifies CONOUT$: as an alternate stream before applying console-handle validation, causing the required regression test to fail at the current head. Merge should wait for the classification-order fix and passing regression; documentation and test-coverage follow-up also remain. Sequence Diagram(s)sequenceDiagram
participant InputSource
participant cli_main
participant JobFile
participant JSONParser
InputSource->>cli_main: stdin, inline --job, or job file argument
cli_main->>cli_main: validate explicit arguments
cli_main->>JobFile: bounded regular-file read with identity checks
JobFile-->>cli_main: bounded UTF-8 bytes
cli_main->>JSONParser: decode and parse JSON
JSONParser-->>cli_main: parsed job or structured error
Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks 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 |
There was a problem hiding this comment.
Pull request overview
OpenCode cannot approve yet because required coverage evidence did not pass.
Review outcome
1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
-
Problem: The required coverage-evidence job result was
failure, so OpenCode cannot establish approval sufficiency for this head. -
Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.
-
Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present. -
Result: REQUEST_CHANGES
-
Reason: coverage-evidence result was
failure, so required test/docstring evidence was not proven for current headec183bf199e0e82b6c29d6c2a01b795e31746e97. -
Head SHA:
ec183bf199e0e82b6c29d6c2a01b795e31746e97 -
Workflow run: 31338219474
-
Workflow attempt: 1
Coverage evidence
Coverage evidence job did not run or did not publish coverage evidence.
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (3 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (3 files)"]
R1 --> V1["required checks"]
Evidence --> S2["Test (2 files)"]
S2 --> I2["regression suite"]
I2 --> R2["Review risk: Test (2 files)"]
R2 --> V2["targeted test run"]
OpenCode Review Overview
Coverage evidence did not pass, so approval is blocked. The formal pull-request review is the source-backed diff review, not this status comment. |
|
@opencode-agent Please rerun the coverage/review contract on exact current head |
8bab6d6 to
071ba74
Compare
…ks with O(1) dictionary key deduplication in chart export
…tifiers Preserve the CLI security delta while integrating the protected workflow and dependency baseline through ordinary two-parent history. The new naming and retired-hook contracts are intentionally RED until the production repair follows.
Replace ambiguous private CLI input/file-authority names, remove the retired TemporalAnalyzer test seam, and make tests observe the orchestration API boundary. Integrate #1176's exact formatting delta as a parent instead of duplicating its change. Document the coverage working-directory RCA and product-technical gap baseline.
Security and availability boundary
The CLI treats stdin, inline
--job, and file-backed--jobas bounded, fail-closed input authorities. This branch preserves the existing JSON wire contract while preventing caller-selected network, device, stream, symlink, non-regular-file, and unbounded-read authority.Current exact lineage
develop@314ddeae7b775a4957594b599358c8255617eb2e375873551da4e06387aaf486e2dfa040280d19f5bd32c2135e5dd94822f3df93c31f71e3f0d638548fe6b6d99c009527ef0bcba419e6f6debdb23c23d2b4c0bffd21c86bd278a17f1bd56c93e32a3b9adevelop; no force push or destructive rebase.Direct repairs
O_NONBLOCK/no-follow/close-on-exec handling, and Win32 UNC/device/alternate-stream classification before filesystem lookup.job_path,job_file_path,path_authority,preflight_status,open_flags,file_descriptor,job_request_payload, andanalysis_request.cli.TemporalAnalyzercompatibility hook. Temporal analysis belongs to the orchestration API; CLI tests now observe that owner boundary rather than monkeypatching dead state.module-not-imported/no-data-collected.AGENTS.md,CLAUDE.md, and the harness guide now run the coverage target fromservices/analysis-engine.ARCHITECTURE.md,CHANGELOG.md, doctoring evidence, anddocs/product-technical-gap-baseline.md.Local exact-tree evidence
git diff --checkpassed.Compatibility and persistence
Public JSON keys, CLI flags, exit behavior, file-size limit, accepted local-file semantics, analysis result shape, database/persistence schema, migrations, indexes, locks, transactions, and model/provider contracts are unchanged. External JSON names remain at the adapter boundary and translate immediately to semantic internal identifiers.
Merge gate
This PR remains Draft. Fresh checks must complete on exact head
d2b4c0bffd21c86bd278a17f1bd56c93e32a3b9a, every valid current-head review finding must be resolved, and a qualifying independent non-author approval must satisfy ordinary branch protection. Queued, skipped, predecessor-head, self/author, model-only, or administrative-bypass evidence is not success.