展示 HN: Agent Vault – 代理和存储Agent凭证的开源工具
Show HN: Agent Vault – Open-source credential proxy and vault for agents

原始链接: https://github.com/Infisical/agent-vault

## 代理金库:AI 代理的安全凭证管理 代理金库是一个开源的凭证代理,旨在保护 AI 代理访问 API 的安全。与传统的密钥管理不同,它**绝不会直接向代理泄露凭证**,从而降低了提示注入等漏洞带来的风险。 代理金库充当本地 HTTP 代理。代理会通过此代理路由请求,并在**网络层注入必要的凭证**——确保代理在运行过程中从未拥有敏感信息。 主要功能包括: * **通用兼容性:** 适用于使用 HTTP 的任何代理,包括自定义代码和 Claude、Cursor 和 Codex 等流行工具。 * **强大的安全性:** 凭证在静态时使用 AES-256-GCM 加密,并可选择由主密码保护。 * **详细日志记录:** 记录代理请求以进行审计(不包括敏感数据)。 * **灵活部署:** 支持 macOS、Linux 和 Docker,并提供无密码设置选项。 * **SDK 集成:** 提供 TypeScript SDK,可与容器中的沙盒代理无缝集成。 代理金库正在积极开发中,并在 GitHub 上提供,附带全面的文档和社区 Slack 频道。它被设计为在不断发展的 AI 代理领域中管理凭证的强大解决方案。

## Agent Vault:开源凭证代理 Infisical(github.com/infisical)发布了一个新的开源项目,**Agent Vault**,旨在解决使用AI代理时凭证泄露的问题。它充当代理和保险库,在不直接暴露它们的情况下向代理提供密钥。 开发者承认,虽然Agent Vault可以防止*凭证*外泄,但如果代理的认证密钥被攻破,它并不能消除*数据*外泄——强调了网络锁定的必要性。然而,它*确实*可以防止最初对密钥的直接访问。他们计划与Infisical的云保险库进行更紧密的集成,允许用户在利用Agent Vault的安全交付机制的同时,使用Infisical的UI和集中式密钥管理。 该项目旨在成为分层防御策略的一个组成部分,利用“凭证代理”来实现代理安全。
相关文章

原文

Agent Vault

HTTP credential proxy and vault

An open-source credential broker by Infisical that sits between your agents and the APIs they call.
Agents should not possess credentials. Agent Vault eliminates credential exfiltration risk with brokered access.

New here? The launch blog post has the full story behind Agent Vault.

Documentation | Installation | CLI Reference | Slack

Agent Vault demo

Traditional secrets management relies on returning credentials directly to the caller. This breaks down with AI agents, which are non-deterministic systems vulnerable to prompt injection that can be fooled into leaking its secrets.

Agent Vault takes a different approach: Agent Vault never reveals vault-stored credentials to agents. Instead, agents route HTTP requests through a local proxy that injects the right credentials at the network layer.

  • Brokered access, not retrieval - Your agent gets a scoped session and a local HTTPS_PROXY. It calls target APIs normally, and Agent Vault injects the right credential at the network layer. Credentials are never returned to the agent.
  • Works with any agent - Custom Python/TypeScript agents, sandboxed processes, and coding agents like Claude Code, Cursor, and Codex. Anything that speaks HTTP.
  • Encrypted at rest - Credentials are encrypted with AES-256-GCM using a random data encryption key (DEK). An optional master password wraps the DEK via Argon2id, so rotating the password does not re-encrypt credentials. A passwordless mode is available for PaaS deploys.
  • Request logs - Every proxied request is persisted per vault with method, host, path, status, latency, and the credential key names involved. Bodies, headers, and query strings are not recorded. Retention is configurable per vault.

See the installation guide for full details.

curl -fsSL https://get.agent-vault.dev | sh
agent-vault server -d

Supports macOS (Intel + Apple Silicon) and Linux (x86_64 + ARM64).

docker run -it -p 14321:14321 -p 14322:14322 -v agent-vault-data:/data infisical/agent-vault

For non-interactive environments (Docker Compose, CI, detached mode), pass the master password as an env var:

docker run -d -p 14321:14321 -p 14322:14322 \
  -e AGENT_VAULT_MASTER_PASSWORD=your-password \
  -v agent-vault-data:/data infisical/agent-vault

Requires Go 1.25+ and Node.js 22+.

git clone https://github.com/Infisical/agent-vault.git
cd agent-vault
make build
sudo mv agent-vault /usr/local/bin/
agent-vault server -d

The server starts the HTTP API on port 14321 and a TLS-encrypted transparent HTTPS proxy on port 14322. A web UI is available at http://localhost:14321.

CLI — local agents (Claude Code, Cursor, Codex, OpenClaw, Hermes, OpenCode)

Wrap any local agent process with agent-vault run (long form: agent-vault vault run). Agent Vault creates a scoped session, sets HTTPS_PROXY and CA-trust env vars, and launches the agent — all HTTPS traffic is transparently proxied and authenticated:

agent-vault run -- claude
agent-vault vault run -- agent
agent-vault vault run -- codex
agent-vault vault run -- opencode

The agent calls APIs normally (e.g. fetch("https://api.github.com/...")). Agent Vault intercepts the request, injects the credential, and forwards it upstream. The agent never sees secrets.

For non-cooperative sandboxing — where the child physically cannot reach anything except the Agent Vault proxy, regardless of what it tries — launch it in a Docker container with egress locked down by iptables:

agent-vault run --sandbox=container --share-agent-dir -- claude

--share-agent-dir bind-mounts your host's ~/.claude into the container so the sandboxed agent reuses your existing login. Currently Claude-only; support for other agents is coming soon.

See Container sandbox for the threat model and flags.

SDK — sandboxed agents (Docker, Daytona, E2B)

For agents running inside containers, use the SDK from your orchestrator to mint a session and pass proxy config into the sandbox:

npm install @infisical/agent-vault-sdk
import { AgentVault, buildProxyEnv } from "@infisical/agent-vault-sdk";

const av = new AgentVault({
  token: "YOUR_TOKEN",
  address: "http://localhost:14321",
});
const session = await av
  .vault("default")
  .sessions.create({ vaultRole: "proxy" });

// certPath is where you'll mount the CA certificate inside the sandbox.
const certPath = "/etc/ssl/agent-vault-ca.pem";

// env: { HTTPS_PROXY, NO_PROXY, NODE_USE_ENV_PROXY, SSL_CERT_FILE,
//         NODE_EXTRA_CA_CERTS, REQUESTS_CA_BUNDLE, CURL_CA_BUNDLE,
//         GIT_SSL_CAINFO, DENO_CERT }
const env = buildProxyEnv(session.containerConfig!, certPath);
const caCert = session.containerConfig!.caCertificate;

// Pass `env` as environment variables and mount `caCert` at `certPath`
// in your sandbox — Docker, Daytona, E2B, Firecracker, or any other runtime.
// Once configured, the agent inside just calls APIs normally:
//   fetch("https://api.github.com/...") — no SDK, no credentials needed.

See the TypeScript SDK README for full documentation.

make build      # Build frontend + Go binary
make test       # Run tests
make web-dev    # Vite dev server with hot reload (port 5173)
make dev        # Go + Vite dev servers with hot reload
make docker     # Build Docker image

This repo available under the MIT expat license, with the exception of the ee directory which will contain premium enterprise features requiring a Infisical license.

If you are interested in Infisical or exploring a more commercial path for Agent Vault, take a look at our website or book a meeting with us.

Whether it's big or small, we love contributions. Agent Vault follows the same contribution guidelines as Infisical.

Check out our guide to see how to get started.

Not sure where to get started? You can:

  • Join our Slack, and ask us any questions there.

If you're reading this, there is a strong chance you like the products we created.

You might also make a great addition to our team. We're growing fast and would love for you to join us.


Preview. Agent Vault is in active development and the API is subject to change. Please review the security documentation before deploying.

联系我们 contact @ memedata.com