AI coding tools change what leaves your machine, who can read a prompt, and what ends up in a pull request. This checklist gives a dev team a repeatable answer to “is this safe to paste” and “is this safe to merge,” without reading every vendor’s terms page from scratch. Every data-policy claim below is backed by an official source; anything we couldn’t verify is marked that way instead of guessed.

Data privacy: what leaves the machine

Every AI assistant sends prompts and context to a provider’s servers. The real question is what happens next, and which setting controls that.

Check Why How to verify
Cursor’s Privacy Mode is on, or enforced team-wide Cursor states code is not used for training by Cursor or its model providers, under zero-data-retention (ZDR) agreements Settings → General → Privacy Mode; admins enforce it from the team dashboard
You know which Cursor models sit outside ZDR A few models need provider-side retention for safety review and admin approval even with Privacy Mode on See “Models with data retention” in Cursor’s enterprise privacy docs
Copilot content exclusion covers secret-heavy paths Excluded paths stay out of inline suggestions and Copilot Chat in the IDE Repo Settings → Copilot → Content exclusion, or an org-level "*": ["/.env"] rule
You know content exclusion’s gap Copilot CLI and Agent mode in Copilot Chat do not support content exclusion, per GitHub’s docs Treat CLI and agent sessions as unprotected by that setting
ChatGPT workspace is Business/Enterprise/Edu for client work OpenAI’s default is no training on inputs/outputs from these workspaces or the API; personal accounts differ Check the workspace type before pasting client material
Feedback-button exception on personal accounts is known On Free/Plus/Pro, a thumbs-up/down can let OpenAI use that whole conversation even after a general opt-out Don’t rate a conversation holding anything sensitive on a personal account
Claude usage for client work is Team/Enterprise/API Anthropic states no training by default on these plans; consumer Free/Pro/Max (including Claude Code from them) can opt in code.claude.com/docs/en/data-usage
Claude Code transcript location is reviewed Transcripts live in plaintext under ~/.claude/projects/ for 30 days by default, adjustable via cleanupPeriodDays Shorten retention on a shared or client machine
PII is stripped before pasting anywhere above A training-policy promise isn’t an access-control promise; safety classifiers can still see flagged content Redact names, emails, account IDs from logs before pasting

That’s a setting problem, not a reason to avoid these tools. The Cursor cheat sheet covers where these controls live day to day.

Secrets: never in prompts, caught before they leave

A training policy is irrelevant if a secret already left your machine in a commit or a pasted log.

Check Why How to verify
No secret is typed or pasted into a prompt Any chat tool can retain flagged text regardless of training settings Grep prompt exports for AKIA, -----BEGIN, Bearer, password=
.env* and credential files are in .gitignore Stops the most common accidental commit before a scanner is needed git check-ignore -v .env prints a match
gitleaks runs pre-commit Catches a hardcoded secret before it leaves your machine, independent of any AI tool pre-commit run gitleaks --all-files fails on a planted test secret
gitleaks also scans git history A secret removed later is still readable in history unless rewritten gitleaks git -v --redact scans patches via git log -p
A Claude Code/Cursor hook blocks reads of .env Stops an agent pulling secret-file contents into its own context, not just blocking edits Ask the agent to open .env; the call should be denied. Full setup: Claude Code hooks guide
CI runs its own secret scan as a backstop Catches --no-verify, a web-UI commit, or a missing local hook A gitleaks (or equivalent) job on pull_request and push

Generated-code validation

AI code sounds just as confident wrong as right. Gate it like any other diff, plus one check this source needs.

Check Why How to verify
Every generated function ships with a passing test Confidence in tone has no correlation with correctness CI blocks merge without a test; see AI-assisted TDD
The same linter/SAST runs on AI-authored diffs No AI exemption makes a diff safer; review speed is the real risk No path exclusion for AI-flagged commits in CI
New dependency names are checked against the real registry A model can name a package that doesn’t exist — a hallucinated or “slopsquatted” dependency an attacker can register npm view <package> or pip index versions <package> before install
Verified dependencies are pinned, not ranged An unpinned range can resolve to a later release nobody reviewed Pin in package.json/requirements.txt, commit the lockfile
Distinctive generated blocks get a license check A snippet can closely reproduce a licensed source and carry its license Search for a close match before shipping a long, stylistically specific block

Hallucination controls

A hallucination is a wrong fact delivered as confidently as a right one. These controls are about where a human re-enters the loop.

Check Why How to verify
Agent cites a source for API/flag/limit claims Reduces, doesn’t remove, confident wrong answers about version details Ask “which doc page says that” before acting on it
A human reviews the actual diff, not a summary Summaries omit the detail that matters git diff on the commit, not the agent’s description
Auto-merge/auto-apply is off for agent changes Removes the checkpoint most likely to catch a hallucination Branch protection requires human-approved review
Agent is told to say “unknown,” not guess A missing fact disguised as a confident answer is the costly kind Prompt: “If a required fact is missing, list it under Unknown.” See agentic validation workflow

Supply chain: MCP servers as third-party code

An MCP server is a program the host launches and trusts with tool access. The protocol doesn’t sandbox it — you do.

Check Why How to verify
Every MCP server is treated as third-party code A stdio server shares the host’s trust domain; the protocol’s own security notes say there’s no sandbox Review source/publisher before approving; see MCP servers explained
Server is pinned to a version, not latest An unpinned server can change behavior or permissions after approval Pin command/args to a tagged version in mcp.json
Permissions and reachable tools are reviewed first A careless server can steer how the agent uses every other tool in the session /mcp in Claude Code, or Output → MCP Logs in Cursor
Secrets live in the server’s own env block A shared shell profile is readable by every process the host launches Check the server’s env entry, not .bashrc/.zshrc
Remote servers use short-lived tokens over HTTPS A long-lived token in a config file is a standing leak, the same class of risk as over-broad host access (see docker-sock-permission-denied) Config references ${env:NAME}, never a raw token

Regulations to be aware of

Informational only, not legal advice — check with counsel before making a compliance claim to a client or regulator.

Check Why How to verify
You know if you’re a “general-purpose AI model” provider under the EU AI Act Fine-tuning, hosting, or redistributing a GPAI model can trigger Article 53 duties — technical docs, a copyright policy, a public training-content summary EU Digital Strategy’s GPAI obligations page; AI Act Service Desk Article 53
The “systemic risk” tier is known as separate and heavier Only Commission-classified systemic-risk models owe evaluation, incident reporting, and cybersecurity duties under Article 55 AI Act Service Desk FAQ on systemic risk
A prompt field that can identify a person is GDPR personal data Article 4(1) defines this broadly: a name, email, device ID, or identifying note all qualify EUR-Lex Article 4(1)
A vendor’s “no training” line is read as a training policy, not a compliance guarantee It covers the vendor’s processing only; your org is usually still the controller for how data got there Check who is named “controller” in the vendor’s DPA, not just the marketing page

Team policy template

Paste into AI_POLICY.md; adjust tool names and plan tiers to your org’s licenses.

# AI Tool Usage Policy

## Scope
Claude Code, Cursor, GitHub Copilot, ChatGPT — anyone working in this
repo or on client deliverables.

## Approved accounts
- Commercial/Team/Enterprise accounts only for client or production
  work. Personal accounts are for learning and open source only.
- Confirm Privacy Mode / content exclusion / workspace type before
  touching a new client's code or data.

## Never paste
- Credentials, API keys, tokens, kubeconfigs, private keys.
- Client PII: names, emails, account IDs, identifying notes.
- Anything under a .gitignore or Copilot content-exclusion path.

## Generated code
- Ships with a test, passes the existing lint/SAST gate.
- New dependencies verified on the real registry, then pinned.
- A human reviews the diff before merge. No auto-merge.

## MCP servers
- Reviewed for source, permissions, and pinned version before any
  team member connects them.
- Secrets live in the server's own env config, never a shared shell.

## Incidents
- A pasted secret is a leaked credential: rotate it immediately.
- Report a suspected hallucinated dependency, or a merged AI diff
  that broke something, to #eng-incidents the same day.

## Review
Reviewed quarterly as vendor terms change.

Patterns you’ll reuse

  • Pre-commit secret scan: pre-commit install && pre-commit run gitleaks --all-files
  • Scan full git history: gitleaks git -v --redact
  • Skip the hook on purpose: SKIP=gitleaks git commit -m "..."
  • Block .env reads in a Claude Code PreToolUse hook (matcher ^Read$): jq -r '.tool_input.file_path' | grep -qE '\.env(\.|$)' && exit 2 || exit 0
  • Verify a package exists before installing: npm view <package> or pip index versions <package>
  • Pin an MCP server instead of latest: use an exact tag in command/args
  • Force “unknown” over a guess: “If a required fact is missing, list it under Unknown. Do not fill it in.”

FAQ

Does Cursor’s Privacy Mode stop my code from being used for training?

With Privacy Mode on, Cursor says your code is not used for training by Cursor or by the AI providers it calls, under zero-data-retention agreements. A few models fall outside that agreement and need separate admin approval. Privacy Mode is off by default for individuals and on by default for Enterprise teams.

Does GitHub Copilot see files I’ve excluded, including in Agent mode?

Repository and organization content exclusion stops excluded paths from reaching inline suggestions and Copilot Chat in the IDE. GitHub’s docs say Copilot CLI and Agent mode in Copilot Chat do not support content exclusion, so treat agent and CLI sessions as unprotected by that control.

Is ChatGPT Team or Enterprise data used to train OpenAI’s models?

By default, OpenAI does not use inputs or outputs from ChatGPT Business, Enterprise, Edu, or the API to train models. An organization can opt in. On personal Free, Plus, or Pro accounts, submitting thumbs-up or thumbs-down feedback can still let OpenAI use that conversation even after a general opt-out.

How does Claude Code’s data policy differ between a personal plan and a Team or Enterprise plan?

On a personal Free, Pro, or Max account, you choose whether chats and coding sessions improve future models. On Team, Enterprise, API, and Claude Gov accounts, Anthropic does not train on your code or prompts unless the organization explicitly opts in, for example through the Development Partner Program.

How do I catch an AI-generated dependency that doesn’t actually exist?

Look the package up on the real registry before installing it. For npm, run npm view <package>; for pip, run pip index versions <package>. A failed lookup means don’t install — a non-existent name is also a slot an attacker can register and ship malware under.

How this guide was verified

Written by hand from the official documentation, every command re-checked, and reviewed a second time before publishing. Last reviewed on .

Official sources read for this article

Share.

Haythem Rehouma builds and teaches DevOps and AI tooling: Kubernetes, Docker, Terraform, Claude Code, ChatGPT and n8n. Every KubPoint guide is written from the official docs and re-tested before it goes live.

Comments are closed.