A sourced file can change the cwd the gate reviews against (#121 gate round 5)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- shell, typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 0
- フォーク
- 1
- 平均マージ
- 2時間 10分
- マージ済み PR(30日)
- 64
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
STRML/omp-classifier のほかの issue
-
Decide whether a coordinator may lift a headless worker's refusal (the trust boundary #68 defers)オープンenhancement ready-for-human
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
STRML/omp-classifier#142 ·
メンテナーはふだん 1 日以内に返信
-
enhancement ready-for-human
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
STRML/omp-classifier#116 · コメント 7 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement ready-for-human
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
STRML/omp-classifier#13 · コメント 6 件 ·
メンテナーはふだん 1 日以内に返信
STRML/omp-classifier の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
supabase/agent-skills#611 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
polka-codes/test#345 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 92/100
GoogleChromeLabs/project-sesame#217 ·
メンテナーはふだん 12 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
solana-foundation/solana-com#2202 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100