The Questions Every Engineering Manager Must Answer
Before approving an AI coding tool for team-wide use on a proprietary codebase, you need clear answers to a specific set of questions:
1. What code is transmitted to the provider's servers? 2. Is code retained after the request completes? 3. Is code used to train future models? 4. What are the data processing agreements? 5. What enterprise controls are available?
Marketing pages often use language that implies strong privacy protections without being legally precise. This guide helps you evaluate the substance behind the claims.
---
What Code Gets Transmitted
All AI coding tools that use cloud-based inference transmit code to the provider's servers to generate completions and responses. The question is not whether code is transmitted, but what scope of code is included in each request.
**Inline Autocomplete:** When you pause typing, the tool typically transmits a window of code surrounding your cursor—often a few hundred to a few thousand tokens from the current file, plus potentially snippets from recently opened or semantically related files.
**Chat / Composer Requests:** Larger context windows are transmitted. This may include the full content of multiple open files and relevant files surfaced by RAG retrieval.
**Agentic Tasks:** When an agent executes multi-step tasks, it may transmit file contents from across your workspace as it reads files to understand the codebase structure.
**Critical implication:** If your codebase contains secrets, credentials, private keys, or proprietary algorithms in source files, these can appear in transmitted context. Keeping secrets out of source files is essential security hygiene regardless of which AI tool you use.
---
Data Retention Policies: What to Look For
Provider data retention policies vary significantly. The key distinctions to evaluate:
**Transient (Not Retained):** Code transmitted in the request is used to generate the response and then discarded. No logs of request content are retained beyond immediate session needs.
**Session Retained:** Requests are retained for a short window (often 30 days) for abuse detection and debugging purposes, then deleted.
**Used for Training:** Code submitted in prompts may be used to fine-tune or train future model versions. This is the highest-risk category for proprietary code and is increasingly opt-in rather than default for developer-focused tools.
> Policies change. Always verify current data retention terms in the provider's official documentation and Data Processing Agreement (DPA), not marketing pages.
---
Enterprise Controls Available Across Major Tools
**GitHub Copilot Business / Enterprise:** - Zero data retention by default on Business and Enterprise tiers - Code snippet policy enforcement at the organization level - Intellectual property indemnification (Enterprise tier) - SAML SSO and SCIM provisioning - SOC 2 Type 2 compliance - Options to exclude specific files or repositories from AI context
**Cursor:** - Privacy mode available — disables code storage - Options to configure which files are excluded from indexing - Business agreements available; verify current compliance certifications with their team
**Claude Code (Anthropic):** - Anthropic's API terms apply — enterprise agreements with custom DPAs available - Zero data retention available in enterprise tiers
> For all tools: request the current DPA from the provider's sales or legal team before deployment in regulated environments. The DPA is the legally binding document, not the marketing page.
---
Practical Risk Mitigation
Regardless of which tool you choose, these practices reduce data exposure risk:
**1. Use exclusion files** Many AI tools support exclusion files that prevent specific files from being indexed or included in context. Configure these to exclude .env files, private key files, and any files containing customer data.
**2. Audit your codebase for embedded secrets** Run a tool like gitleaks or truffleHog to identify any secrets committed to your repository. Rotate any secrets found before enabling AI context access.
**3. Evaluate network-level controls** Some enterprise deployments route AI tool traffic through a proxy for logging and content inspection.
**4. On-Premise and Private Deployment Options** For the most sensitive codebases, some providers offer private deployment options where the inference model runs within your infrastructure, eliminating external data transmission entirely.
---
The Bottom Line
For most commercial codebases using modern AI coding tools on Business or Enterprise tiers with zero-retention policies, the data risk is manageable and comparable to other SaaS development tools your team already uses.
For codebases involving national security, patient health records, payment card data (PCI DSS scope), or proprietary algorithms with significant competitive value, conduct a formal vendor security assessment and involve your legal and compliance teams before deployment.
The goal is not to avoid AI tools—it is to deploy them with eyes open to the data flows and with appropriate controls in place.