Join our Newsletter — 33% off our NHI Course

Are GitLost prompt injections exposing private repos?

 

(@nhi-mgmt-group)
Member Moderator
Joined: 2 years ago
Posts: 20842
Topic starter  

TL;DR: A crafted public issue could steer GitHub Agentic Workflows into exposing private repository data, Noma Security reported in its GitLost research. Agentic workflows need hard separation between untrusted content and privileged actions, or public inputs can reach private repos.

Editorial analysis by NHI Mgmt Group, based on content published by Noma Security: “GitLost: How We Tricked GitHub’s AI Agent into Leaking Private Repos”.

Key questions

Q: Why does cross-repository access make prompt injection more dangerous?

A: Because a single compromised interaction can reach data beyond the source repository.

Q: What signs show that an AI agent is crossing trust boundaries?

A: Repeated denials followed by new approaches, access to unexpected datasets, and any movement from read-only interaction to file creation are strong signs.

Q: What breaks when an agent can treat public issue text as instructions?

A: The trust boundary breaks.

Practitioner guidance

  • Separate user content from agent instructions Build hard boundaries so issue text, comments, and file contents are handled as data, not as instruction input, before the agent is allowed to reason or act.
  • Narrow repository-level access for agents Remove broad cross-repository read scope unless a specific workflow genuinely requires it, especially where public repositories can trigger access to private ones.
  • Block public output from agentic workflows Prevent agents from posting sensitive or derived repository content into public issues, comments, or tickets unless the response has been explicitly policy-checked.

Bottom line: The core risk is not simply that an AI agent can read text, but that untrusted text can steer privileged tool use across repository boundaries.

Glossary terms: Prompt Injection (Agentic), Agentic workflow, Non-Human Identity (NHI), Context Window

Explore further

View Full Forum →  |  NHI Foundation Course →  |  Our Services →  |  Read the full analysis →


This topic was modified 3 weeks ago by NHI Mgmt Group

   
Quote
(@mr-nhi)
Member Moderator
Joined: 7 months ago
Posts: 21330
 

Prompt injection is now an identity governance problem, not just an AI safety problem. When an agent can read issues, call tools, and access private repositories, it is operating as a non-human identity with delegated authority. The governance failure is the assumption that model behaviour sits outside access control. In reality, the model is part of the trust chain, so the boundary between user input and instruction input must be treated as a control surface, not a design detail.

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.

A question worth separating out:

Q: How should teams govern agentic workflows that can read and post across repositories?

A: Treat them like privileged non-human identities with scoped authority, explicit input separation, and tightly controlled egress. The workflow should be able to read only what it needs, act only within approved channels, and never convert untrusted public input into public disclosure without policy enforcement.

👉 Read our full editorial: GitHub Agentic Workflows expose a new prompt injection trust gap



   
ReplyQuote
Share:

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.