Don't Give AI Agents Your .env: Access Without Credentials
Blog post from Infisical
Coding agents often require access to services such as GitHub, cloud platforms, and Slack, but supplying credentials through environment variables exposes them to scripts, dependencies, logs, and prompt-injection attacks that can cause agents to exfiltrate secrets using otherwise permitted actions. The account describes incidents including the 2025 Nx supply-chain attack and several prompt-injection examples involving repository files, issues, pull requests, and connected documents, arguing that model safeguards, sandboxes, and confirmation prompts reduce but cannot eliminate risk when agents can read credentials. Infisical’s preview-stage Agent Vault is presented as an alternative in which a proxy stores the real credential, authenticates outbound requests on an agent’s behalf, and gives the agent only a short-lived, revocable session token and a placeholder value. Access bundles can restrict allowed services, hosts, methods, and paths, while session logs record brokered requests. A walkthrough demonstrates that an agent can read issues in a private GitHub repository through the proxy without receiving the GitHub token, and that both GitHub token permissions and proxy-level restrictions can limit unauthorized operations. The central security argument is that brokering credentials narrows trust from the agent and all code it executes to the proxy and credential-management system.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| Secrets Management | 41 | 3,098 | 623 | 155 | +51% |
| MCP | 4 | 11,940 | 1,236 | 235 | +13% |
| AI Agents | 2 | 7,036 | 1,672 | 272 | +25% |
| AI Coding Assistant | 2 | 1,966 | 547 | 149 | +23% |
| Kubernetes | 1 | 5,167 | 507 | 114 | +18% |
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.