<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mason Wyatt</title>
    <description>The latest articles on DEV Community by Mason Wyatt (@masonwyatt23).</description>
    <link>https://dev.to/masonwyatt23</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3852915%2F3088df0d-11e4-4bc3-991e-470767ddacb7.png</url>
      <title>DEV Community: Mason Wyatt</title>
      <link>https://dev.to/masonwyatt23</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/masonwyatt23"/>
    <language>en</language>
    <item>
      <title>How AI Coding Tools Leak Your API Keys, And What I Built to Stop It</title>
      <dc:creator>Mason Wyatt</dc:creator>
      <pubDate>Fri, 16 Oct 2026 04:38:58 +0000</pubDate>
      <link>https://dev.to/masonwyatt23/how-ai-coding-tools-leak-your-api-keys-and-what-i-built-to-stop-it-15hj</link>
      <guid>https://dev.to/masonwyatt23/how-ai-coding-tools-leak-your-api-keys-and-what-i-built-to-stop-it-15hj</guid>
      <description>&lt;p&gt;Last week I watched Claude Code read my &lt;code&gt;.env&lt;/code&gt; file, extract my OpenAI API key, and paste it into a curl command in a shell script it was writing for me. The key worked. The script worked. And my &lt;code&gt;sk-proj-&lt;/code&gt; key was now sitting in a file on disk, in Claude's session history, and in Anthropic's API logs.&lt;/p&gt;

&lt;p&gt;I didn't ask Claude to use the key. It just... did what a helpful agent does. It saw the environment, understood the task, and wired things up. That's the whole point of AI coding tools. It's also the problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  The threat is not hypothetical
&lt;/h2&gt;

&lt;p&gt;GitGuardian's &lt;a href="https://blog.gitguardian.com/the-state-of-secrets-sprawl-2026/" rel="noopener noreferrer"&gt;State of Secrets Sprawl 2026&lt;/a&gt;&lt;br&gt;
reports 28.65 million new hardcoded secrets in public GitHub commits in 2025, a&lt;br&gt;
34% year-over-year increase. AI-service secrets separately increased 81% year&lt;br&gt;
over year; that category-specific figure does not apply to all secrets.&lt;/p&gt;

&lt;p&gt;Here is one common high-risk pattern when an AI coding tool has dotenv access:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You have a &lt;code&gt;.env&lt;/code&gt; file with &lt;code&gt;OPENAI_API_KEY=sk-proj-abc123...&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The AI agent reads that file to understand your project&lt;/li&gt;
&lt;li&gt;Your real API key is now inside the LLM's context window&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once a secret enters the context window, several downstream systems can become exposure paths:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Session logs.&lt;/strong&gt; Most AI tools persist conversation history. Your key is sitting in a JSON file in &lt;code&gt;~/.claude/&lt;/code&gt; or &lt;code&gt;~/.cursor/&lt;/code&gt;, probably unencrypted.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompt injection.&lt;/strong&gt; A malicious README, dependency, or code comment can instruct the LLM to exfiltrate environment variables. This isn't theoretical — Check Point Research demonstrated it with CVEs against both Cursor and Claude Code: crafted prompts that trick the agent into sending secrets to attacker-controlled servers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Malicious MCP servers.&lt;/strong&gt; The Model Context Protocol lets AI tools call external services. A compromised MCP server can request environment context and receive your real keys.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accidental commits.&lt;/strong&gt; The AI writes code that hardcodes a key, or generates a test fixture with real credentials. You review it quickly, approve, and push.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The standard advice — "just don't put secrets in &lt;code&gt;.env&lt;/code&gt;" — ignores reality. Developers need secrets in their environment to build software. The question isn't whether AI will read your &lt;code&gt;.env&lt;/code&gt;. It's what it finds when it does.&lt;/p&gt;
&lt;h2&gt;
  
  
  Phantom tokens: keep real credentials out of the AI boundary
&lt;/h2&gt;

&lt;p&gt;I built &lt;a href="https://phm.dev" rel="noopener noreferrer"&gt;Phantom&lt;/a&gt; to reduce that exposure at the architecture&lt;br&gt;
level. The core idea: replace heuristically detected, Phantom-managed dotenv&lt;br&gt;
secrets with &lt;strong&gt;phantom tokens&lt;/strong&gt; — cryptographically random placeholders that&lt;br&gt;
are not accepted as credentials by the upstream provider.&lt;/p&gt;

&lt;p&gt;Here's what your &lt;code&gt;.env&lt;/code&gt; looks like before and after running &lt;code&gt;phantom init&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Before&lt;/span&gt;
&lt;span class="nv"&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;sk-proj-abc123def456ghi789...
&lt;span class="nv"&gt;STRIPE_SECRET_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;sk_live_51HG7a9s8d7f6g5h4j3k2l1...
&lt;span class="nv"&gt;ANTHROPIC_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;sk-ant-api03-example...
&lt;span class="nv"&gt;NODE_ENV&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;development
&lt;span class="nv"&gt;PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3000

&lt;span class="c"&gt;# After&lt;/span&gt;
&lt;span class="nv"&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;phm_a7f3b9e2d1c4f8a6b3e7d2c5f9a1b4e8...
&lt;span class="nv"&gt;STRIPE_SECRET_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;phm_c3d7f2a9e1b5d8c4a7f3b6e2d9c1a5f8...
&lt;span class="nv"&gt;ANTHROPIC_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;phm_e8b2d5a9c3f7e1b4d8a2c6f3e7b1d5a9...
&lt;span class="nv"&gt;NODE_ENV&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;development
&lt;span class="nv"&gt;PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Those &lt;code&gt;phm_&lt;/code&gt; tokens use 256 bits of CSPRNG output. They are not provider&lt;br&gt;
credentials and cannot be redeemed directly against OpenAI, Anthropic, or&lt;br&gt;
Stripe. They are still mappings worth protecting. Client headers and bodies&lt;br&gt;
never resolve them, but a stolen live proxy bearer can authorize exact routes&lt;br&gt;
that inject their own credentials. Rotate an exposed project token. Non-secret config values such as &lt;code&gt;NODE_ENV&lt;/code&gt; and &lt;code&gt;PORT&lt;/code&gt;&lt;br&gt;
are normally left untouched by the detection heuristics.&lt;/p&gt;

&lt;p&gt;Your real secrets are stored through the platform credential backend (macOS&lt;br&gt;
Keychain, the Linux kernel keyring, or Windows Credential Manager), with an&lt;br&gt;
encrypted-file fallback when its passphrase can be persisted and verified.&lt;br&gt;
Linux kernel-keyring entries do not survive a reboot.&lt;/p&gt;
&lt;h2&gt;
  
  
  The reverse proxy: route-owned authentication
&lt;/h2&gt;

&lt;p&gt;When you run &lt;code&gt;phantom exec -- claude&lt;/code&gt;, Phantom starts a local HTTP reverse proxy on &lt;code&gt;127.0.0.1&lt;/code&gt; and rewrites the base URLs in your environment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;OPENAI_BASE_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://127.0.0.1:PORT/openai
&lt;span class="nv"&gt;ANTHROPIC_BASE_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://127.0.0.1:PORT/anthropic
&lt;span class="nv"&gt;STRIPE_API_BASE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://127.0.0.1:PORT/stripe
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here's the full request lifecycle:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Your code / AI agent
     |
     |  POST http://127.0.0.1:PORT/openai/v1/chat/completions
     |  Client request (no credential substitution)
     v
Phantom Proxy (localhost)
     |
     |  1. Authenticate session and match exact route
     |  2. Inject route-owned key into fixed auth header
     |  3. Forward client headers/body without token resolution
     |  4. Forward over TLS to api.openai.com
     |  5. Drop request buffers; the session lookup copy remains until proxy exit
     v
OpenAI API (real endpoint, HTTPS)
     |
     |  Response returns through content-aware scrubbing
     v
Your code / AI agent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is &lt;strong&gt;not&lt;/strong&gt; a MITM proxy. It does not inject CA certificates or break TLS. Your code sends plaintext HTTP to localhost; the proxy initiates a fresh TLS connection to the upstream API. This is a standard reverse proxy pattern — the same architecture as nginx sitting in front of an application server.&lt;/p&gt;

&lt;p&gt;Key design decisions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reviewed routes.&lt;/strong&gt; Agentic proxy sessions accept Phantom's exact built-in service definitions and reject repository-authored proxy destinations. This constrains injection, but endpoint integrity, DNS/TLS, the local account, and the configured provider remain in the threat model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Localhost only.&lt;/strong&gt; The proxy binds to &lt;code&gt;127.0.0.1&lt;/code&gt;, never &lt;code&gt;0.0.0.0&lt;/code&gt;. It is not reachable from the network.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ephemeral ports.&lt;/strong&gt; Each session gets a random high port, reducing the window for local process abuse.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Session-scoped proxy authentication.&lt;/strong&gt; &lt;code&gt;phantom exec&lt;/code&gt; gives the child process fresh &lt;code&gt;phm_&lt;/code&gt; placeholders and a fresh proxy bearer. Client placeholders never resolve; the bearer becomes invalid when that proxy exits. Project tokens stored in dotenv are different values and persist until &lt;code&gt;phantom rotate&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Supported SDKs that honor Phantom's implemented base-URL overrides can work&lt;br&gt;
without source changes. This is not a claim for every HTTP client or protocol.&lt;br&gt;
Protected database connection strings currently make &lt;code&gt;phantom exec&lt;/code&gt; fail&lt;br&gt;
closed; Phantom does not inject them into the child environment.&lt;/p&gt;
&lt;h2&gt;
  
  
  Real usage: three commands
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. After installing the reviewed v0.7.9 GitHub release, initialize the project&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;phantom init
-&amp;gt; Found .env with 5 entries
-&amp;gt; Detected 3 secret&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt;: OPENAI_API_KEY, STRIPE_SECRET_KEY, ANTHROPIC_API_KEY
-&amp;gt; Skipped 2 non-secret&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt;: NODE_ENV, PORT
-&amp;gt; Stored real values &lt;span class="k"&gt;in &lt;/span&gt;OS keychain
-&amp;gt; Rewrote .env with phantom tokens
ok Project initialized. Run &lt;span class="sb"&gt;`&lt;/span&gt;phantom &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="nt"&gt;--&lt;/span&gt; &amp;lt;cmd&amp;gt;&lt;span class="sb"&gt;`&lt;/span&gt; to start coding.

&lt;span class="c"&gt;# 2. Work with AI — supported SDK routes use the proxy&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;phantom &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="nt"&gt;--&lt;/span&gt; claude
-&amp;gt; Proxy listening on an ephemeral 127.0.0.1 port
-&amp;gt; Proxying: OPENAI_API_KEY, STRIPE_SECRET_KEY, ANTHROPIC_API_KEY
-&amp;gt; Starting: claude

&lt;span class="c"&gt;# The app loads phm_ tokens; Claude uses value-blind MCP metadata.&lt;/span&gt;
&lt;span class="c"&gt;# The SDK hits localhost; the matched route injects its fixed auth header and forwards to the real API.&lt;/span&gt;
&lt;span class="c"&gt;# Supported SDK calls use the reviewed local proxy route; MCP stays value-blind.&lt;/span&gt;

&lt;span class="c"&gt;# 3. Deploy — push real secrets to your platform&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;phantom &lt;span class="nb"&gt;sync&lt;/span&gt; &lt;span class="nt"&gt;--platform&lt;/span&gt; vercel
-&amp;gt; Synced 3 secrets to Vercel &lt;span class="o"&gt;(&lt;/span&gt;real values, not phantom tokens&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  MCP server for AI-native secret management
&lt;/h2&gt;

&lt;p&gt;Phantom also ships an MCP server so Claude Code, Cursor, Windsurf, and Codex can manage secrets natively — listing, adding, rotating — without ever seeing a real value:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;phantom setup &lt;span class="nt"&gt;--client&lt;/span&gt; claude
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The release-schema-verified catalog currently contains 54 unique tools covering&lt;br&gt;
vault status, init, safe interactive secret entry, checks, diagnostics, cloud&lt;br&gt;
sync, audit, validation, rotation, expiry, compliance, and team vaults. The&lt;br&gt;
deprecated plaintext add tool refuses secret values through MCP, so real&lt;br&gt;
credentials stay out of the agent context. Runtime &lt;code&gt;tools/list&lt;/code&gt; is canonical.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture: modular Rust workspace
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;phantom-core     Config, .env parsing, token generation (256-bit CSPRNG, phm_ prefix)
phantom-vault    VaultBackend trait: OS keychain + encrypted file fallback
phantom-proxy    HTTP reverse proxy (hyper), token replacement, TLS forwarding (reqwest)
phantom-cli      clap-based CLI with agent readiness, proxy, sync, audit, teams
phantom-mcp      MCP server (rmcp SDK), stdio transport, schema-verified catalog
workspace/kernel Value-blind setup plus fail-closed governed-execution foundations
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The vault uses ChaCha20-Poly1305 for encryption with Argon2id key derivation&lt;br&gt;
(for the encrypted file fallback). Major vault retrieval, serialization, and&lt;br&gt;
decrypted-file buffers use targeted zeroization, while some proxy lookup copies&lt;br&gt;
remain ordinary strings. Zeroization is defense in depth, not a complete&lt;br&gt;
memory-erasure guarantee. CI runs the Rust test suite and clippy before release.&lt;/p&gt;

&lt;p&gt;The cloud client can encrypt a vault payload before upload so the vault API&lt;br&gt;
stores ciphertext rather than decrypted secret values. That property does not&lt;br&gt;
remove the client, account, endpoint, or deployed-service trust boundaries.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why not existing tools?
&lt;/h2&gt;

&lt;p&gt;I looked at the landscape before building this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1Password / HashiCorp Vault&lt;/strong&gt; — Enterprise secret-management systems with&lt;br&gt;
different runtime models. Environment-injection workflows such as &lt;code&gt;op run&lt;/code&gt; can&lt;br&gt;
still expose a value to an agent that can inspect that process environment;&lt;br&gt;
their current product capabilities should be evaluated independently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Doppler / Infisical&lt;/strong&gt; — Centralized secret-management systems that can inject&lt;br&gt;
real values at runtime. If an agent can inspect the target environment, that&lt;br&gt;
specific integration pattern may cross the agent context boundary.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;dotenvx&lt;/strong&gt; — Encrypts &lt;code&gt;.env&lt;/code&gt; files at rest, which is useful. But at runtime, secrets are decrypted into real environment variables. The AI sees them.&lt;/p&gt;

&lt;p&gt;The design gap Phantom targets is narrower: agent workflows where readable&lt;br&gt;
dotenv values or real process-environment credentials can enter model context,&lt;br&gt;
transcripts, generated files, or tool calls.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get started
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;phantom init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install the checksum-verified &lt;code&gt;v0.7.9&lt;/code&gt; GitHub release binaries using the&lt;br&gt;
&lt;a href="https://phm.dev/docs/getting-started#install" rel="noopener noreferrer"&gt;current platform instructions&lt;/a&gt; before running&lt;br&gt;
this command. Three commands establish the local boundary for supported API routes. Keep&lt;br&gt;
dotenv reads denied, review the generated config, and use the documented&lt;br&gt;
recovery and CI controls for the rest of the system.&lt;/p&gt;

&lt;p&gt;Phantom's local CLI and proxy are MIT-licensed Rust software and do not require&lt;br&gt;
the hosted service for local protection. Hosted packaging and future pricing&lt;br&gt;
are separate from the open-source license.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Website&lt;/strong&gt;: &lt;a href="https://phm.dev" rel="noopener noreferrer"&gt;phm.dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub&lt;/strong&gt;: &lt;a href="https://github.com/ashlrai/phantom-secrets" rel="noopener noreferrer"&gt;github.com/ashlrai/phantom-secrets&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docs&lt;/strong&gt;: &lt;a href="https://phm.dev/docs/getting-started" rel="noopener noreferrer"&gt;phm.dev/docs/getting-started&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you've ever pasted an API key into an AI coding tool and felt a twinge of guilt — you were right to. But you don't have to stop using AI to fix it.&lt;/p&gt;

</description>
      <category>security</category>
      <category>ai</category>
      <category>rust</category>
      <category>mcp</category>
    </item>
    <item>
      <title>How to let AI code with your real API keys (without leaking them)</title>
      <dc:creator>Mason Wyatt</dc:creator>
      <pubDate>Tue, 31 Mar 2026 07:03:37 +0000</pubDate>
      <link>https://dev.to/masonwyatt23/how-to-let-ai-code-with-your-real-api-keys-without-leaking-them-fno</link>
      <guid>https://dev.to/masonwyatt23/how-to-let-ai-code-with-your-real-api-keys-without-leaking-them-fno</guid>
      <description>&lt;p&gt;You want Claude to integrate Stripe. You want Cursor to build your OpenAI pipeline. But your API keys are in .env, and AI can read them.&lt;/p&gt;

&lt;p&gt;GitGuardian found 39.6 million secrets leaked on GitHub in 2025. AI-assisted commits leak at 2x the baseline rate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Phantom fixes this in one command.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;When you use AI coding tools, your .env secrets enter the LLM context window:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Claude Code reads .env to understand your project&lt;/li&gt;
&lt;li&gt;Cursor indexes your workspace files&lt;/li&gt;
&lt;li&gt;Copilot suggests code containing your keys&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those keys can leak via session logs, prompt injection, or training data.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution: Phantom Tokens
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;npx phantom-secrets init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One command:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Reads your .env and detects real secrets&lt;/li&gt;
&lt;li&gt;Stores them in your OS keychain (encrypted)&lt;/li&gt;
&lt;li&gt;Rewrites .env with worthless phantom tokens&lt;/li&gt;
&lt;li&gt;Auto-configures Claude Code MCP server&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Your .env now looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight conf"&gt;&lt;code&gt;&lt;span class="n"&gt;OPENAI_API_KEY&lt;/span&gt;=&lt;span class="n"&gt;phm_a7f3b9e2c1d4f6a8&lt;/span&gt;...
&lt;span class="n"&gt;STRIPE_SECRET_KEY&lt;/span&gt;=&lt;span class="n"&gt;phm_2ccb5a1e9f8d7b3c&lt;/span&gt;...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These tokens are worthless. Safe to leak. Safe for AI to read.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;When your code makes an API call, Phantom's local proxy intercepts it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;AI writes code using phantom tokens&lt;/li&gt;
&lt;li&gt;Code calls &lt;code&gt;http://127.0.0.1:PORT/openai/v1/chat/completions&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Proxy replaces &lt;code&gt;phm_...&lt;/code&gt; with your real API key&lt;/li&gt;
&lt;li&gt;Forwards the request over TLS to the real API&lt;/li&gt;
&lt;li&gt;Your code works perfectly. AI never knew.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;phantom &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="nt"&gt;--&lt;/span&gt; node app.js
&lt;span class="c"&gt;# Proxy running on 127.0.0.1:54321&lt;/span&gt;
&lt;span class="c"&gt;# Real keys injected at network layer&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Works With Every AI Tool
&lt;/h2&gt;

&lt;p&gt;Phantom ships an MCP server with 9 tools. Works with Claude Code, Cursor, Windsurf, and Codex.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Claude Code:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;claude mcp add phantom-secrets-mcp &lt;span class="nt"&gt;--&lt;/span&gt; npx phantom-secrets-mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Cursor / Windsurf / Codex:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"phantom"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"phantom-secrets-mcp"&lt;/span&gt;&lt;span class="p"&gt;]}}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once configured, just tell your AI: "protect my API keys" — it handles everything.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cloud Sync
&lt;/h2&gt;

&lt;p&gt;Sync your vault across machines with end-to-end encryption:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;phantom login        &lt;span class="c"&gt;# GitHub OAuth&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;phantom cloud push   &lt;span class="c"&gt;# Encrypted upload&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;phantom cloud pull   &lt;span class="c"&gt;# On another machine&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The server never sees your plaintext secrets. ChaCha20-Poly1305 encryption with keys that never leave your device.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;npx phantom-secrets init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Website: &lt;a href="https://phm.dev" rel="noopener noreferrer"&gt;phm.dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/ashlrai/phantom-secrets" rel="noopener noreferrer"&gt;ashlrai/phantom-secrets&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;MIT licensed, open source, free forever&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;New since launch: cloud sync, export/import, streaming proxy support, team vaults, and MCP tools for Claude Code, Cursor, Windsurf, and Codex.&lt;/p&gt;

</description>
      <category>security</category>
      <category>ai</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
