[bug] 路径穿越(绝对路径绕过 workspace 边界)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- typescript
Research direction
Start by locating resolveWorkspacePath and the shell-tools glob/grep operations, then compare their path handling with the existing cross-platform boundary check in file-tools. Verify that absolute paths outside workspaceRoot are rejected or confined to the workspace, while valid workspace paths still work.
Written by the indexing model from the issue text.
Description
step-realtime-cli 版本
1.0.0
Node 版本 & OS
Node 24.16.0 / Linux (Fedora 44)
复现步骤
- 在 step CLI 中对助手说"读取 /etc/passwd"
- 模型调用 glob/grep 工具时传入绝对路径参数
resolveWorkspacePath直接返回/etc/passwd- 文件内容被读取并返回给模型
期望行为
绝对路径应验证前缀为 workspaceRoot,否则拒绝或 resolve 到 workspace root。file-tools 已有类似的跨平台边界检查,shell-tools 的 glob/grep 操作缺了这层
实际行为
绝对路径被直接使用,可读取 workspace 外任意文件
日志 / 堆栈
截图(可选)
No response
自检
- 我已搜索 existing issues,确认这不是重复问题
- 我已阅读 CONTRIBUTING.md
- Dominant language
- TypeScript
- Stars
- 54
- Forks
- 20
- Avg merge
- 2h 58m
- Merged PRs (30d)
- 1
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 stepfun-ai/Step-Code
-
status/needs-triage type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
stepfun-ai/Step-Code#85 · 1 comment ·
-
status/needs-triage type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
stepfun-ai/Step-Code#84 ·
-
status/needs-triage type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
stepfun-ai/Step-Code#83 ·
-
status/needs-triage type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
stepfun-ai/Step-Code#81 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
stepfun-ai/Step-Code#80 ·
All issues in stepfun-ai/Step-Code
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
area:tools bug good first issue help wanted priority:P2
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
TaewoooPark/Motifcode#14 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
newrelic-experimental/preflight#793 · 1 comment ·
-
bug 🐞
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BasedHardware/omi#15320 ·