Security & privacy

Agentic coding has a real attack surface. Prompt injection landed in production code three times in April 2026. This page is your minimum survival kit: secrets handling, prompt-injection awareness, and the IP/NDA decision tree for what's safe to paste.

Secrets handling

The rule is simple and absolute: never paste secrets into prompts. Not API keys, not OAuth tokens, not database passwords, not signing keys. Once it's in a prompt, you can't fully control where the model provider stores it, logs it, or reuses it for evaluation.

Use these instead:

If you accidentally pasted a secret: rotate it. Right now. Don't wait to verify whether it leaked. The cost of rotation is minutes; the cost of a leak is unbounded.

Prompt injection: real, frequent, and not your fault

Prompt injection is when external content (a webpage, a doc, a downloaded README) contains instructions that hijack the agent. April 2026 saw three production incidents of coding agents leaking secrets through indirect injection — they read a malicious doc, the doc told them to exfiltrate the env file, and they did.

You can't fully prevent it. You can make it much less damaging:

Permission scoping

Most coding agents have a permission system — what they're allowed to do without asking. Default settings are usually too permissive for new users.

The principle: read-only by default, escalate per task.

The IP / NDA decision tree

You will be tempted to paste things into agents that aren't yours to share. This is the part of security people skip. Don't.

Probably safe to paste

Probably NOT safe to paste

Check first

If something does go wrong

  1. Stop using the agent for the affected task.
  2. Rotate any credentials that might have been exposed — proactively, not reactively.
  3. If it's NDA'd content: notify the owner before they find out from elsewhere. Disclosure is survivable; cover-ups aren't.
  4. Document what happened — what was pasted, when, in which provider. You'll need this if anyone asks.
  5. Update your habits. Think about what would have caught this earlier.

← Subagents & orchestration · Learning vs leveraging →