A sourced file can change the cwd the gate reviews against (#121 gate round 5)
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ó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- shell, typescript
Hướng nghiên cứu
Start in shell-cwd.ts around line 550 and review the cwd handling from PR #121, then trace how sourced shell files are represented. Add coverage for the direct source, benign activation, and transitive-source examples in the issue. Done means the gate reads the executed target or refuses with the sourced filename, while preserving the stated benign case.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
This was generated by AI during triage.
The review gate's round 5 on PR #121 ([P1] A conditional source can move cwd past the directory check):
: && source ./hop.sh; python3 payload.py # hop.sh runs: cd child
From /repo, bash sources hop.sh in the current shell, so the cd child moves it and the interpreter runs /repo/child/payload.py. The gate's cwd walk does not treat source/. as a directory-changing builtin (shell-cwd.ts:550 in that round), so it keeps /repo, opens /repo/payload.py, and reviews a different file than the one that runs: a benign parent plus a harmful child flips the verdict.
Same class as the other cwd shapes already closed in that PR (cd A || cd B, and a leading cd applied twice to provenance) — an unmodeled way for the shell's directory to change — and the same fix direction: either read the sourced file the way a script operand is read, or fail closed and ask when the target cannot be resolved from the text. A separate, narrower issue lives in the same area: a --config=./relative CLI path resolved against the invocation's directory rather than the command's start directory, which is a path-resolution question, not a cwd mutation.
Scope, which is why this is filed rather than fixed
A sourced file is arbitrary shell: it may itself source another file, call a function defined elsewhere, or change the directory conditionally. Closing the class honestly means either resolving the transitive source graph (a resolver the PR deliberately did not build) or refusing every command that sources a file whose text cannot be read. The second is a behaviour change worth deciding deliberately, since source ./venv/bin/activate && … is a common, benign shape.
Acceptance
: && source ./hop.sh; python3 payload.pywherehop.shcontainscd childdoes not review/repo/payload.py: either/repo/child/payload.pyis read, or the command is refused with the reason naming the sourced file.- A
sourceof a file that provably does not change the directory (nocd, no function call that could) still resolves to the start directory, so the benignactivateshape does not become a prompt. - A sourced file that itself sources another is either followed or refused; the test pins whichever rule is chosen.
- Ngôn ngữ chính
- TypeScript
- Star
- 0
- Fork
- 1
- Merge trung bình
- 2 giờ 5 phút
- Pull request đã merge (30 ngày)
- 61
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 STRML/omp-classifier
-
Decide whether a coordinator may lift a headless worker's refusal (the trust boundary #68 defers)Đang mởenhancement ready-for-human
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
STRML/omp-classifier#142 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement ready-for-human
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
STRML/omp-classifier#116 · 6 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement ready-for-agent
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
STRML/omp-classifier#106 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement ready-for-agent
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
STRML/omp-classifier#73 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement ready-for-agent
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
STRML/omp-classifier#72 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của STRML/omp-classifier
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/vscode-livepreview#876 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
JustJarethB/invoicer#54 ·
-
ICP 1.2.0 shows a scheduled task's interval in milliseconds under the label "Interval (In seconds)"Đang mởNeeds Triage Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
wso2/product-integrator#2585 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: Telemundo West sdĐang mởcheck:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
design
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
MTES-MCT/monitor-field#119 ·
Maintainer thường phản hồi trong vòng 1 ngày