01Chapter 1: What can go wrong when AI tools see your workAI coding assistants and chat tools are useful because they see your work. They read your prompts, your open files, your terminal output, and sometimes your whole repository. That access is also the risk. This chapter builds a threat model: a short, structured list of what you want to protect, who o7 min read
02Chapter 2: What counts as a secret or sensitive codeThis chapter assumes you can use Git and a command line, have used an AI coding assistant, and know what an API key is. It defines which things you should keep away from AI tools. Later chapters cover the controls that keep them away.6 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 or chat tool, and know what an environment variable is. It builds a working model of how information leaves your machine when you use an AI tool. Later chapters cover the controls. Here the goal is to see every6 min read
04Chapter 4: Reading provider retention and training policiesThis chapter assumes you know how data reaches an AI tool, which the previous chapter covered. It also assumes you can use Git and a command line, and that you know what an API key is. Here you learn to read a provider's data policy and compare plans before you decide what you may send to a tool.6 min read
05Chapter 5: Keeping files out of AI contextThis chapter assumes you can use Git and a terminal and have used an AI coding assistant. It also assumes you know what .gitignore does. The earlier chapters on secret types and data flow explain which files are sensitive and how they reach a provider. This chapter covers the first control: tellin6 min read
06Chapter 6: Redacting what you paste and what tools echo backThis chapter assumes you can use Git and a command line, have used an AI coding assistant or chat tool, and know what an environment variable is. Earlier chapters covered what counts as a secret and how to keep files out of AI context. Ignore files only protect files. They do nothing for text you co6 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 or password is used for, and how environment variables work. It covers how to keep credentials out of source files, which is the most reliable way to keep them out of an AI assistant's context.6 min read
08Chapter 8: Limiting the damage with scoped, short-lived credentialsThis chapter assumes you can use Git and a command line, and that you know what an API key is. It also assumes you can set environment variables. The previous chapter moved secrets out of source code. This chapter covers the next question: if a credential still leaks, how much can an attacker do wit6 min read
09Chapter 9: Controlling what an agent can read, run, and reachAn AI coding agent is more than a chat window. It can read files, run shell commands, edit code, and call other services. Each of those abilities is a way for a secret to leave your machine. This chapter covers how to limit those abilities so a mistake, or a malicious instruction, does less damage.6 min read
10Chapter 10: Prompt injection and data exfiltrationThis chapter assumes you have used an AI coding assistant, can read short Python and shell snippets, and understand environment variables and API keys. It also assumes you have read the earlier chapters on data flow and agent permissions. Here you will learn how text that an assistant reads can stee6 min read
11Chapter 11: Vetting extensions and tool serversThis chapter assumes you know how an AI assistant's agent mode works (see the chapters on data flow and agent permissions), you can read a JSON config file, and you can use Git and a command line.7 min read
12Chapter 12: Catching secrets before they are committedThis chapter covers secret scanning: tools that look for credentials in your code and history before they reach a shared repository. It assumes you can use Git and a command line, know what an API key is, and have used an AI coding assistant. Earlier chapters showed how to keep secrets out of source7 min read
13Chapter 13: When a secret leaks: revoke, rotate, reviewThis chapter assumes you can use Git and a command line, know what an API key or password does, and have a basic grasp of environment variables. It also assumes you have read the earlier chapters on where data flows to AI tools and how to keep secrets out of source code. Here you learn what to do af6 min read
14Chapter 14: When to use a self-hosted or local modelThis chapter assumes you have read the earlier chapters on data flow and provider data policies. You should know what a prompt, context, and telemetry are. You should be comfortable with a command line, HTTP APIs, and environment variables.6 min read
15Chapter 15: Writing a team policy for AI tool useThis chapter assumes you have read the earlier chapters on secret types, data flow, provider policies, scanning, and incident response. It also assumes you can use Git and a command line. The earlier chapters covered personal habits. This one turns them into a written policy that a whole team can fo6 min read