TL;DR: A critical GitHub Copilot Chat flaw let a researcher silently exfiltrate secrets and source code from private repositories, and steer responses toward malicious output, using remote prompt injection plus a CSP bypass built on GitHub infrastructure, according to LEGIT Security. The issue shows that AI assistants embedded in developer workflows can inherit repository access and become identity-sensitive attack surfaces, not just productivity features.
Editorial analysis by NHI Mgmt Group, based on content published by LEGIT Security: “CamoLeak: Critical GitHub Copilot Vulnerability Leaks Private Source Code”.
Key questions
Q: What breaks when a code assistant can read private repository context?
A: The main failure is that repository context becomes part of the assistant’s effective privilege set.
Q: Why do prompt injection attacks create access-control risk in developer tools?
A: Because the assistant often acts with the permissions of the authenticated user, so a successful injection can turn ordinary collaboration content into privileged instruction.
Q: What are the signs that an AI assistant is too deeply integrated into trusted content flows?
A: Warning signs include assistants that can consume unreviewed comments, process hidden markdown, render external media, or access broad repository history without a clear need.
Practitioner guidance
- Constrain assistant-visible repository context Limit which pull request fields, comments, issue text, and file types can be passed into AI assistants, especially in private repositories and high-trust projects.
- Block hidden instruction surfaces Review features such as hidden comments, rendered markdown, and other collaboration artifacts that can carry instructions without obvious user visibility.
- Test trusted rendering and proxy paths Validate whether image proxies, markdown renderers, or other sanctioned delivery services can be abused to encode and exfiltrate sensitive data.
Bottom line: The core failure is not just prompt injection, but the collapse of trust boundaries between collaboration content, repository context, and assistant output.
Explore further
View Full Forum → | NHI Foundation Course → | Our Services → | Read the full analysis →
AI assistants inside development platforms need identity-grade governance, not just content filters. The article shows that assistant behaviour is shaped by repository permissions, session context, and trusted rendering paths, which means the security boundary extends well beyond the model prompt. Once an assistant can read private code and generate outbound content, access control becomes part of the AI safety problem. Practitioners should treat assistant context as governed access, not convenience text processing.
A few things that frame the scale:
- Internal repositories are 6x more likely to contain secrets than public ones (32.2% vs 5.6%), contradicting the assumption that private repos are safe, according to the State of Secrets Sprawl 2026.
- Only 5.7% of organisations have full visibility into their service accounts, according to the Ultimate Guide to NHIs.
A question worth separating out:
Q: How should security teams govern personal AI assistants that act on behalf of employees?
A: Treat each assistant as a distinct non-human actor with its own identity, policy scope, and audit trail. Human delegation alone is not enough when the assistant can move across email, documents, calendars, and internal systems. Governance should bind the sponsor, the executor, and the target resource so access reviews and investigations can separate request from action.
👉 Read our full editorial: GitHub Copilot Chat vulnerability exposes a new AI agent attack path