01Chapter 1: What can go wrong when AI tools see your workAI coding assistants and chat tools read what you give them: prompts, open files, command output, and sometimes whole repositories. Some can also run commands or call other services. This chapter builds a threat model, a short list of what you protect, from whom, and how it can be lost. Later chapte3 min read
02Chapter 2: What counts as a secret or sensitive codeThis chapter assumes you can use Git and a command line, know what an API key is for, and have used an AI coding assistant. It defines what you need to protect, so later chapters can show how to protect it.2 min read
03Chapter 3: Where your data goes: prompts, context, tools, and telemetryThis chapter assumes you can use Git and a command line, have used an AI coding assistant, and know what an environment variable is. It maps the paths your data takes when you use an AI tool. You need that map before you can decide which controls to apply.3 min read
04Chapter 4: Reading provider retention and training policiesThis chapter assumes you know how data flows from your machine to an AI tool (prompts, file context, command output, telemetry). It also assumes you can read a short legal-style document. You will learn which questions to ask of a provider's terms and how to compare plans before you paste in private3 min read
05Chapter 5: Keeping files out of AI contextThis chapter assumes you know basic Git, can use a command line, and understand that environment variables hold configuration. It covers how to stop an AI assistant from reading files that contain secrets.3 min read
06Chapter 6: Redacting what you paste and what tools echo backThis chapter assumes you know Git basics, have used an AI assistant, understand what an API key is, and can work with environment variables. Earlier chapters covered which files count as secrets and how to exclude them from AI context. Ignore files do not help here. This chapter covers text you copy3 min read
07Chapter 7: Moving secrets out of code and into the environmentThis chapter assumes you know basic Git and the command line, what an API key is for, and how environment variables work. It also assumes you have used an AI coding assistant. The goal is to keep credentials out of source files. An assistant that reads your repository then has nothing to leak.2 min read
08Chapter 8: Limiting the damage with scoped, short-lived credentialsThis chapter assumes you can use Git and a shell, know what an API key is, and can set environment variables. The previous chapter moved secrets out of source code. Here you assume that one will still leak, and you shrink what it can do.2 min read
09Chapter 9: Controlling what an agent can read, run, and reachThis chapter assumes you know basic Git and the command line, have used an AI coding assistant, and understand environment variables. An agent is an assistant that does more than answer. It can read files, run shell commands, and call network services on your behalf. Each of those abilities is a way2 min read
10Chapter 10: Prompt injection and data exfiltrationThis chapter assumes you know basic Git and the command line, have used an AI coding assistant, and understand environment variables and what an API key does. It builds on the chapter about agent permissions.3 min read
11Chapter 11: Vetting extensions and tool serversThis chapter assumes you know how agent permissions work and what prompt injection is. It also assumes you have used an AI assistant that can call tools. An MCP server (Model Context Protocol server) is a program that gives an assistant extra tools, such as reading a database, searching tickets, or 3 min read
12Chapter 12: Catching secrets before they are committedThis chapter assumes you know basic Git, can use a command line, and understand what an API key is. It covers the secret scanning step of the plan: stopping credentials from entering your repository, whether you typed them or an AI assistant did.3 min read
13Chapter 13: When a secret leaks: revoke, rotate, reviewThis chapter assumes you can use Git and a shell, know what an API key is for, and can set environment variables. It covers what to do after a credential has been exposed to an AI tool, a prompt, a log, or a commit.3 min read
14Chapter 14: When to use a self-hosted or local modelThis chapter assumes you know how data moves from your machine to an AI provider, and you have read the chapter on provider retention and training policies. It helps you decide when running a model on your own hardware is worth the cost.3 min read
15Chapter 15: Writing a team policy for AI tool useThis chapter assumes you know basic Git and the command line, have used an AI coding assistant, and understand environment variables. It also assumes you have read the earlier chapters on data flow, secret scanning, and incident response. A team policy joins those controls into rules that everyone f3 min read