The Threat Model for Coding Agents: What Leaves Your Environment

← Back to Blog & Articles

Before adopting an agent, map what data could leave your environment and where. That map drives every other decision.

What a coding agent sees

To be useful, an agent reads source files, configuration, tests, documentation, and terminal output. It may also see environment variables, credentials in config files, and customer data in test fixtures.

Where data can go

With a hosted model, prompts containing that material travel to the provider. Logs, telemetry, and retention policies determine what is stored and for how long. Even with a local model, tools may make outbound calls for updates, extensions, or web searches.

Questions to ask

  1. What does the tool send, and to whom?
  2. Is anything retained, and is it used for training?
  3. Can telemetry be disabled or monitored?
  4. What credentials can the agent reach?

Reduce the exposure

Exclude secrets and sensitive data from the agent's reach. Restrict outbound network access. Keep an allowlist of destinations and monitor traffic.

Consider intellectual property

Check license terms for the tool and the model, and consider how generated code is treated under your policies.

Takeaway

Know what the agent can see and where it can send it. Then decide whether the benefits justify the exposure, and use technical limits to shrink it.

Continue with the book

Explore the full treatment, worked examples, and exercises in Local AI Agents for Angular Teams.


Adapted from Local AI Agents for Angular Teams, published by Choral Software. Article text and original examples © 2026 Choral Software. All rights reserved.

Scroll to Top