-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Security Risk: Agent requests and logs sensitive credentials (SSH passphrases) #1351
Copy link
Copy link
Open
Labels
area:agentsSub-agents, fleet, autopilot, plan mode, background agents, and custom agentsSub-agents, fleet, autopilot, plan mode, background agents, and custom agentsarea:toolsBuilt-in tools: file editing, shell, search, LSP, git, and tool call behaviorBuilt-in tools: file editing, shell, search, LSP, git, and tool call behavior
Description
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
- Run a git command that requires SSH passphrase authentication (e.g.,
git pull) - The command prompts for passphrase
- Agent uses
ask_userto request the passphrase from the user - Agent transmits the passphrase via
write_bash - 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_userfrom 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:agentsSub-agents, fleet, autopilot, plan mode, background agents, and custom agentsSub-agents, fleet, autopilot, plan mode, background agents, and custom agentsarea:toolsBuilt-in tools: file editing, shell, search, LSP, git, and tool call behaviorBuilt-in tools: file editing, shell, search, LSP, git, and tool call behavior
Type
Fields
Give feedbackNo fields configured for issues without a type.