keepcalculator

06 Numbers and Powers

AI Coding Assistant Privacy: Where Your Code Goes

Card No. 06·25624 · Updated · Standard formula, shown below

When you use an AI coding assistant, the code and prompts it processes may be sent to the provider’s servers, handled under its retention and training policies, and sometimes shared with connected services. The exact outcome depends on the product, account type, settings, and organization policy, so check the current privacy terms before submitting confidential code.

What happens when you send code

An assistant needs context to generate a completion or answer. Depending on how it works, that context can include the text you typed, nearby code, selected files, repository information, error messages, and instructions you gave in chat. An editor extension may collect additional operational data, such as feature use or diagnostic logs. The product’s documentation should explain what it collects; do not assume that only the visible prompt leaves your computer.

For a cloud-based assistant, relevant data is transmitted to the service for processing. The provider may return a suggestion without storing the submitted content permanently, or may retain some data for a limited period for service delivery, abuse prevention, debugging, or other stated purposes. A local model can keep inference on your device, but the surrounding app may still send telemetry, update checks, or other information online. “Local” is therefore not automatically the same as “nothing is transmitted.”

Consider a prompt such as “Fix this login bug” accompanied by a file containing a hard-coded test password. Even if the password is not part of the question, it could be included if the tool reads that file or surrounding context. Review what the assistant can access and what it actually sends, where the product provides that information.

Retention, training, and human review

Three separate questions matter: whether the provider retains submitted data, whether it uses that data to improve or train models, and whether people may review it. These are not interchangeable. A provider might retain data briefly for operational reasons while excluding it from model training; another service may have different terms for individual and business accounts. Human review may be limited to particular cases or settings, but readers should rely on the provider’s current policy rather than assume it never occurs.

Some services offer controls to disable model-improvement use, reduce history retention, or choose a business plan with different data protections. Such controls may apply only to certain data, products, or account types. Turning off chat history, for example, does not necessarily mean that all processing logs disappear immediately or that no data is retained for security purposes. Check the scope, effective date, and exceptions stated in the applicable documentation.

Privacy policies and product settings change. If a decision depends on a specific promise—such as a retention period or exclusion from training—confirm it in the terms for the exact product and subscription you use, and revisit it after significant updates.

What counts as sensitive source code

Source code can expose more than implementation details. It may contain credentials, internal hostnames, customer information in test fixtures, unreleased features, proprietary algorithms, or comments describing architecture. Prompts can disclose the same kinds of information in plain language, and pasted logs may contain email addresses, access tokens, or file paths.

Before sharing, treat these as sensitive unless your organization has approved the tool and workflow:

  • Passwords, API keys, private keys, session tokens, and connection strings.
  • Customer records, personal information, or production data embedded in examples and logs.
  • Unreleased product code, confidential designs, and code covered by contractual restrictions.
  • Security findings, incident details, and infrastructure configuration.

Remove secrets and replace real data with representative placeholders. A placeholder should preserve the structure needed to explain the problem—for example, replace an actual token with EXAMPLE_TOKEN—without leaving a working credential behind. If a secret was already submitted, follow your organization’s incident process; deleting a prompt may not revoke a credential, so rotate or invalidate exposed secrets as appropriate.

How to check an assistant’s privacy settings

Start with the exact product name and account type. A browser-based chat feature, an editor extension, and an organization-managed coding service may have separate terms and controls. Read the privacy notice, product-specific data-use documentation, and administrator settings rather than relying on a general marketing statement.

Look for clear answers to these questions:

  • What information is collected, including repository context, telemetry, and diagnostics?
  • Is submitted content used for training or service improvement, and can that use be disabled?
  • How long are prompts, code, logs, and feedback retained?
  • Can authorized staff or subcontractors review content, and under what conditions?
  • Does the service send data to other processors, and where are the relevant terms described?
  • Can an administrator manage access, retention, or data-use settings for a team?

When using a work account, ask the administrator which product configuration is approved and whether personal accounts are prohibited for company repositories. A company subscription may offer different controls, but the label “enterprise” alone does not tell you which protections are enabled.

Practical ways to reduce exposure

Use the least context necessary. Ask about a small, sanitized function instead of allowing broad access to an entire repository when the smaller example is enough. Check extension permissions and repository indexing options, and exclude folders containing secrets or personal data where the product supports exclusions. Avoid pasting complete production logs when a short, redacted excerpt will explain the error.

Also keep ordinary development safeguards in place. Store credentials in a secrets manager or environment configuration rather than source files, scan repositories for accidental secrets, and review generated changes before committing them. Privacy and correctness are separate: an assistant can handle data under an acceptable policy and still produce insecure or incorrect code. Do not treat generated output as a security review.

Common misconceptions and trade-offs

“The assistant only sees what I type” may be false if it receives selected code, surrounding lines, indexed files, or repository context. “It is not used for training” also does not necessarily mean “it is not stored”; service operation, abuse monitoring, and training are distinct purposes. Conversely, processing a prompt on a provider’s server does not by itself prove the provider trains on it. The applicable product terms determine the answer.

There is a practical trade-off: richer context can make suggestions more relevant, while sending less information can reduce exposure. Local processing may offer more control but can require suitable hardware and may provide different capabilities. Choose based on the sensitivity of the code, the tool’s documented controls, and your organization’s rules—not solely on convenience or a broad privacy slogan.

Frequently Asked Questions

Do AI coding assistants store my source code?
Some may retain prompts or related data for a stated period; others describe different handling. Check the precise product’s current retention terms and account settings.

Will my code be used to train an AI model?
That depends on the provider, product, account type, and enabled settings. Look for an explicit data-use policy; do not infer training use—or its absence—from the fact that the assistant processes code.

Can an assistant see files I did not paste into chat?
Some coding tools can use selected files, nearby code, or indexed repository context. Review the extension’s access permissions and context controls to see what applies.

Is a local coding model completely private?
Not necessarily. Model inference may happen on-device, while the application can still transmit telemetry or other data. Verify the app’s network behavior and privacy documentation.

What should I do if I pasted an API key?
Treat it as potentially exposed: revoke or rotate it promptly, remove it from the relevant code or logs, and follow your organization’s incident procedure. Deleting the conversation alone may not make the credential safe.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →