🔒 Missing workspace boundary validation allows arbitrary file read
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 78/100
Research direction
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.
Written by the indexing model from the issue text.
Description
🔒 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.
- Dominant language
- Rust
- Stars
- 195k
- Forks
- 108k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ultraworkers/claw-code
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ultraworkers/claw-code#3259 · 7 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ultraworkers/claw-code#3258 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ultraworkers/claw-code#3257 · 2 comments ·
-
[CRITICAL][SECURITY] Untrusted project hooks bypass read-only mode for arbitrary command execution Open
Difficulty 4/5 3-5 days Newbie friendliness 68/100
ultraworkers/claw-code#3301 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
ultraworkers/claw-code#3300 · 2 comments ·
All issues in ultraworkers/claw-code
Similar issues
-
risk:low runtime status:in-progress type:test
Difficulty 1/5 Under an hour Newbie friendliness 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
EricSpencer00/Resilient#4835 · 1 comment ·
-
agent:ready documentation
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
cesarferreira/stax#890 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100