🔒 Missing workspace boundary validation allows arbitrary file read
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 78/100
Hướng nghiên cứu
Start in rust/crates/runtime/src/file_ops.rs at read_file, then inspect normalize_path and validate_workspace_boundary. Verify that the resolved path is checked against workspace_root before reading, including traversal and symlink escape cases; the issue is done when out-of-workspace reads are rejected while valid workspace reads still work.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
🔒 Security · 🟡 Medium · Confidence: 96%
File: rust/crates/runtime/src/file_ops.rs
Location: read_file
What's wrong
The function reads a file path supplied by the caller without checking that it stays inside the intended workspace. The line let absolute_path = normalize_path(path)?; resolves the user‑provided path to an absolute path, but no subsequent call to validate_workspace_boundary is made, so a malicious caller can traverse out of the workspace (e.g., using ../ or symlinks) and read any file the process can access.
Suggested fix
Validate the resolved path against the workspace root before reading the file. For example:
pub fn read_file(
path: &str,
offset: Option<usize>,
limit: Option<usize>,
workspace_root: &Path,
) -> io::Result<ReadFileOutput> {
let absolute_path = normalize_path(path)?;
// Ensure the path stays within the workspace
validate_workspace_boundary(&absolute_path, workspace_root)?;
// ... rest of the function unchanged ...
}
About this report
This finding was generated by an automated audit tool using Llama 3.3 70B + verification passes.
Only findings with ≥92% confidence that passed both LLM self-verification and line reference
verification are reported. False positives are still possible — please verify before acting.
- Ngôn ngữ chính
- Rust
- Star
- 195k
- Fork
- 108k
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 39
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ultraworkers/claw-code
-
GJC compatibility campaign: Rust fork-in-spirit of gajae-codeCó thể đã có người làm @Yeachan-Heo đã nhận 1 ngày trước. Đang mở
ultraworkers/claw-code#3319 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của ultraworkers/claw-code
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
text as float loses precisionĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
loongarch64: `unsupported linker arg: --no-rosegment` with rustc 1.100Có thể đã có người làm @monosans đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
rust-cross/cargo-zigbuild#503 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
rust-lang/a-mir-formality#472 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent:iq3-xxs area: cli duplication enhancement priority: P3 ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày