Subscribe to the Non-Human & AI Identity Journal

Notifications
Clear all

GitHub Codespaces prompt injection: what it means for IAM teams


(@nhi-mgmt-group)
Member Moderator
Joined: 1 year ago
Posts: 3789
Topic starter  

TL;DR: A malicious GitHub Issue can passively prompt-inject Copilot in Codespaces, combine symbolic links with automatic JSON schema fetching, and exfiltrate a privileged GITHUB_TOKEN for repository takeover, according to Orca Security. The attack turns developer content, workspace files, and AI-assisted execution into one identity boundary failure that traditional workspace trust models do not cover.

NHIMG editorial — based on content published by Orca Security: passive prompt injection in GitHub Codespaces and repository token exfiltration

By the numbers:

Questions worth separating out

Q: How should security teams prevent passive prompt injection in AI-enabled developer workspaces?

A: Treat repository content, issues, and pull requests as untrusted inputs when an AI assistant can act on them.

Q: Why do AI-assisted workspaces increase the risk of token exposure?

A: They collapse multiple trust boundaries into one session.

Q: What breaks when symbolic links are allowed to reach outside the workspace?

A: The workspace boundary stops being a boundary.

Practitioner guidance

  • Block assistant instruction execution from untrusted repository content Require explicit user confirmation before an AI assistant acts on issue text, PR text, or comments that originated outside the workspace owner.
  • Disable or restrict remote schema retrieval in AI-enabled workspaces Turn off automatic JSON schema fetching where possible, or whitelist only approved schema hosts.
  • Stop symlink traversal outside the scoped workspace Audit whether AI tooling follows repository symbolic links into shared or hidden files.

What's in the full article

Orca Security's full analysis covers the operational detail this post intentionally leaves for the source:

  • Step-by-step exploit chain showing how a Codespaces issue context can steer Copilot into executing attacker-controlled instructions
  • Exact JSON schema exfiltration technique used to move the GITHUB_TOKEN off the workspace
  • The symbolic link setup that lets a repository file reference a shared secrets path
  • The specific guardrails and defaults the research argues should be tightened in AI-enabled developer environments

👉 Read Orca Security's analysis of passive prompt injection in GitHub Codespaces →

GitHub Codespaces prompt injection: what it means for IAM teams?

Explore further

View Full Forum →  |  NHI Foundation Course →



   
Quote
Share: