Skip to content

Is it safe to send your code to an AI tool?

What happens to code you send to AI tools: retention, training, subprocessors and access. Questions to ask any vendor, and how public and private code differ.

October 13, 2026 · 2 min read · RepoGrasp team

Every AI tool for code sends code to a model somewhere. For open-source code, that's rarely a concern. For proprietary code, it's a real question for your security team, and the answer depends on the tool, the model provider and the agreements between them.

What actually happens to the code

When you ask a question, the tool sends some or all of your code, plus your question, to a model, which runs either on the vendor's infrastructure or a model provider's. Four things matter:

  1. Retention: how long the code and question are stored, by whom, and why (logging, abuse monitoring, debugging).
  2. Training: whether your code can be used to train or improve models.
  3. Access: who at the vendor or provider can see it, and under what controls.
  4. Location: which countries the data is processed and stored in.

Questions to ask any vendor

  • Which model providers receive our code? (Look for a subprocessors list.)
  • Is our code used to train any models, theirs or the provider's?
  • How long are prompts and outputs retained, by the vendor and by the provider?
  • Is zero-retention or a no-logging mode available?
  • Where is data processed?
  • Is code encrypted in transit and at rest? Who can access it?
  • What happens to indexed code when we disconnect a repository?
  • Do they hold security certifications or reports your organisation requires?

Consumer versus business terms

Many AI products have different data terms for free consumer use and for business or API use. Business and API terms more often exclude training on your data and offer shorter retention. Read the terms for the plan you'll actually use, not the marketing page.

Public versus private code

Sending public, open-source code to an AI tool exposes nothing that isn't already public, though your questions themselves may reveal what you're working on. Private code needs the full review above.

How RepoGrasp handles it today

RepoGrasp's preview only reads public GitHub repositories. It downloads the repository, skips files that look like secrets, keeps the source files in server memory for up to 10 minutes, and sends them with your question to an AI model provider. It doesn't store questions or answers. Our privacy policy and subprocessors page list exactly what goes where. Private repository support will come with published retention and deletion terms before it launches.

Reducing risk whatever tool you use

  • Keep secrets out of repositories in the first place. See keeping secrets out of AI tools.
  • Start with public or non-sensitive code when evaluating a tool.
  • Prefer tools that let you scope what's sent: a folder, not the whole organisation.
  • For code that must never leave your network, use self-hosted or local models.

The bottom line

"Is it safe?" depends on whose code, which tool and which terms. For public code, the risk is low. For private code, get clear written answers to the questions above before connecting anything.