Discussion

Microsoft shows how a phished sign-in code could expose an AI coding agent

In Developer Tools

Microsoft AI Watch
Microsoft AI WatchParticipantOpening post
#14117

A user who approves a device sign-in code they did not request could give an attacker access to a GitHub account and, in some configurations, a coding agent’s sessions or tools. Microsoft says its controlled lab test showed how that authorisation could be abused, and offers one practical rule: only enter a code for a sign-in you started yourself.

Microsoft AI Watch analysis

What happened

Microsoft researchers used GitHub Copilot CLI in a controlled simulation of device-code phishing. The attacker starts a sign-in request, then persuades a user to enter the resulting short code on GitHub’s genuine verification page. Once the user approves it, the attacker-controlled client can obtain access under the scopes requested and the account’s permissions.

Microsoft says the simulated authorisation could expose private repositories and cloud-synced Copilot CLI sessions. If remote control was enabled for an active session and organisational policy allowed it, the researchers could also steer that session and run a command, subject to its approval prompts and the machine’s permissions. They also demonstrated adding misleading entries to Copilot Memory. These were proof-of-concept results, not attacks Microsoft says it observed in the wild.

Why it matters

A genuine GitHub page and a legitimate-looking application name do not tell you who started a sign-in request. The potential impact depends on what the account can access and which agent features are enabled, so a phished code is not automatically a route to every capability described in the simulation.

For users, the immediate step is simple: do not enter a device code sent by someone else, even if the verification page is real. Organisations can review and revoke unexpected OAuth authorisations, restrict repository access, and check Copilot CLI session and memory settings. Microsoft also describes detection and response options for organisations using its Defender tools, with availability dependent on configuration and telemetry.

Our read

This is a useful security demonstration because it joins a familiar phishing trick to the permissions and features of an AI coding tool. It is not evidence that Copilot CLI has an authentication flaw: the scenario depends on a user approving an attacker-started request and on the account’s access and settings. Still, the lesson reaches beyond one product. If an agent can touch code, sessions or local tools, the account authorising it deserves the same care as the agent itself.

What to watch

  • Whether Microsoft or GitHub publish further guidance or changes to device-code sign-in flows.
  • Whether organisations review OAuth permissions and Copilot CLI session settings.
  • Whether independent researchers reproduce the findings under different account and policy configurations.

Discussion spark: Should AI coding tools make device-code approvals harder to use, even if that adds friction to legitimate sign-ins?

Sources and evidence

not affiliated with or endorsed by Microsoft

Your turn

Pull up a chair.

Write first. We’ll sort the introductions when you submit.