github / github/copilot-cli

Security Risk: Agent requests and logs sensitive credentials (SSH passphrases)

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

説明

## Summary
The Copilot CLI agent can request sensitive credentials (passwords, passphrases) via the `ask_user` tool and then transmit them through `write_bash`, which logs them in the conversation history.

## Steps to Reproduce
1. Run a git command that requires SSH passphrase authentication (e.g., `git pull`)
2. The command prompts for passphrase
3. Agent uses `ask_user` to request the passphrase from the user
4. Agent transmits the passphrase via `write_bash`
5. Passphrase is visible in the agent's output logs

## Expected Behavior
- Agent should never request passwords, passphrases, or credentials
- Agent should detect when commands require sensitive input and instruct the user to run them manually
- Agent should refuse to handle credentials per its own security policy

## Security Impact
- Credentials are exposed in conversation logs
- Credentials may be transmitted/stored by backend systems
- Violates the agent's stated security guidelines in the prohibited_actions section

## Suggested Fix
- Add explicit safeguards in the agent's credential-handling logic
- Detect password/passphrase prompts and halt with user guidance instead of requesting input
- Add validation to prevent `ask_user` from requesting credential-type information
- Consider adding a warning when commands may require sensitive input

## Context
This issue was discovered during a real usage scenario where `git pull` required SSH passphrase authentication.

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

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

評価

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

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

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