---
title: "Keep production credentials away from · Agent Wranglers"
url: https://agentwranglers.se/playbook/ai-assisted-development/isolation-and-credentials/no-production-credentials
id: AID-25
level: Required
risk: data
updated: 2026-10-27
build: a2a6bdfed830
tokens: 725
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Keep production credentials away from agents

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Isolation and credentials](https://agentwranglers.se/playbook/ai-assisted-development/isolation-and-credentials.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: AID-25
- Level: Required
- Chapter: [Isolation and credentials](https://agentwranglers.se/playbook/ai-assisted-development/isolation-and-credentials.md)
- Rule: Never give a coding agent production keys, database passwords or customer data.
- Check: Search the agent's environment variables and readable files for production key prefixes, such as `sk_live_`, and production host names. None are found.
- Risk: Data leaked or lost
- How: Give agents a development or staging environment with its own keys and made-up data. Keep `.env` files with values out of the project folder the agent can read. Never connect an agent's database or cloud tool, such as an MCP server, to production. Deploy through a pipeline that holds the keys, not through the agent. Give agents test copies built as [Keep personal data out of test copies](https://agentwranglers.se/playbook/data/personal-data/masked-copies.md) says, with keys scoped by [Give each key the least power](https://agentwranglers.se/playbook/application-security/secrets-and-configuration/least-privilege-keys.md).

## Sources

- [OWASP Secrets Management Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html)
- [Claude Code, development containers](https://code.claude.com/docs/en/devcontainer)

## Related rules

- DAT-32 [Keep personal data out of test copies](https://agentwranglers.se/playbook/data/personal-data/masked-copies.md) in Data and databases
- APS-62 [Give each key the least power](https://agentwranglers.se/playbook/application-security/secrets-and-configuration/least-privilege-keys.md) in Application security

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/ai-assisted-development/isolation-and-credentials/no-production-credentials">Agent Wranglers AI-assisted development playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Skip approvals only in a throwaway sandbox](https://agentwranglers.se/playbook/ai-assisted-development/isolation-and-credentials/unattended-only-in-sandbox.md)
- Next: [Give agents the fewest rights they need](https://agentwranglers.se/playbook/ai-assisted-development/isolation-and-credentials/least-privilege-agents.md)
- [Isolation and credentials](https://agentwranglers.se/playbook/ai-assisted-development/isolation-and-credentials.md)
