Can agents reach production systems, credentials or secrets?
Clients also ask it like this:
- Do your AI agents have access to production?
- Can an AI tool read .env files or cloud credentials on a developer machine?
- How do you keep secrets away from AI tools?
What the client is checking
The client wants to know if an agent can reach the systems and keys that matter most. They look for a design that does not depend on every developer being careful.
Three draft answers
Pick the level that is true for you today. Every statement marked [VERIFY]
must be true for your organisation before you send it. Delete a statement that is not true. Fill each
{{placeholder}}.
Not yet in place
Agents run as the developer. They can reach what the developer's machine can reach, and that can include credentials stored on it. [VERIFY] We have not separated agent access from developer access. [VERIFY] We will review this by {{date}}. [VERIFY]
Policy only
Our policy says that agents must not use production credentials and must not read secret files. [VERIFY] Production access works like this: {{mechanism}}. [VERIFY] We rely on developers to follow the policy. We do not yet block it by technical means. [VERIFY]
Enforced, with evidence
Developer machines do not hold standing production credentials. [VERIFY] Production access needs {{mechanism}} and is logged. [VERIFY] Reads of secret files and credential stores by agents are stopped by {{control}}. [VERIFY] Secret scanning runs on {{where}} and we review the findings every {{interval}}. [VERIFY] We know the limits of these controls: {{limits}}. [VERIFY]
Evidence to attach for the strongest answer
- An inventory of where credentials live (vault, machine, CI).
- The access-control settings for production.
- The list of secret locations that agents may not read.
- A redacted example of a stopped secret read.
- The secret-scan configuration and the last results.
How to move up one level
From not yet in place to policy only
List every credential an agent could reach today. Remove standing production credentials from developer machines. Write the rule that agents never use production credentials.
From policy only to enforced, with evidence
Stop agent reads of secret files and credential stores with a technical control. Scan for secrets on every change. Test the control on a schedule, and write down what it does not cover.
Where KYA fits
The local hook denies reads of common credential locations: SSH keys, ~/.aws/credentials, gcloud, Azure, kubeconfig, Docker, GitHub CLI, npm, PyPI, netrc and git credentials, .env files (not .env.example), *.pem and *.key. It denies writes of secret-shaped text (AWS key ids, private key headers, GitHub, Slack and Stripe live tokens) into files. It denies sending environment variables or credential files to a non-loopback host with tools such as curl, wget or scp. It also denies commands such as terraform destroy and the cloud delete commands that the KYA README lists. The record never holds the secret text.
The local hook is advisory and fails open. It does not see a script that an agent writes and then runs, commands built at run time, or the built-in shell of a tool that has no hook. Cursor, for example, is MCP only.
KYA does not store or rotate credentials. It does not scan repositories for secrets. It does not limit what a machine can reach on the network. It cannot show that an agent never had access to production.
Get all 13 answers in one document
Choose the level that is true for each group. You get a preview at once and the full pack by email.
Previous question Next question
These are drafts. Send only what is true for your organisation. This is not legal advice.