github / github/copilot-cli

Add sandbox mode to restrict Copilot CLI file access to a specified working directory

オープン
#892 コメント 12 件 リアクション 49 件 担当者 0 名 GitHub で見る
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

### Describe the feature or problem you'd like to solve

Please add a sandbox capability to copilot-cli that constrains the code agent’s filesystem permissions so it can only read/write within a specified working directory (workspace root), and is prevented from accessing or modifying any paths outside that directory. This should be similar in spirit to the sandbox/workspace isolation provided by tools like Codex and Claude Code.

### Proposed solution

- Add an opt-in flag and/or config, e.g. --sandbox, --workspace , or sandbox=true
- When enabled:
- All file reads/writes are allowed only under the workspace root (including subdirectories)
- Block path traversal (..), absolute paths, and symlink escapes that would resolve outside the workspace, with a clear error message
- (Optional) Support an allowlist for explicitly permitted additional directories (e.g., temp/cache)

### Example prompts or workflows

_No response_

### Additional context

https://github.com/anthropic-experimental/sandbox-runtime

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。