<?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>Forem: cepunkt</title>
    <description>The latest articles on Forem by cepunkt (@cepunkt_1d9c6e96d0ed47998).</description>
    <link>https://forem.com/cepunkt_1d9c6e96d0ed47998</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3784420%2Fda42a6e2-bb00-404a-9fe5-9d318e5534a1.png</url>
      <title>Forem: cepunkt</title>
      <link>https://forem.com/cepunkt_1d9c6e96d0ed47998</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/cepunkt_1d9c6e96d0ed47998"/>
    <language>en</language>
    <item>
      <title>Auditing Claude Code: what I found and how I contained it</title>
      <dc:creator>cepunkt</dc:creator>
      <pubDate>Sun, 12 Apr 2026 20:13:53 +0000</pubDate>
      <link>https://forem.com/cepunkt_1d9c6e96d0ed47998/auditing-claude-code-what-i-found-and-how-i-contained-it-5djo</link>
      <guid>https://forem.com/cepunkt_1d9c6e96d0ed47998/auditing-claude-code-what-i-found-and-how-i-contained-it-5djo</guid>
      <description>&lt;h2&gt;
  
  
  What Claude Code captures from your system (and how to contain it)
&lt;/h2&gt;

&lt;p&gt;In early March 2026, I noticed Claude Code behaving oddly with my shell environment. Sandbox settings weren't working as documented. I needed to understand what was actually being captured so I could prioritize containment.&lt;/p&gt;

&lt;p&gt;So I ran a systematic audit. Shell environment capture, behavioral profiling, telemetry infrastructure, controls that don't function as advertised.&lt;/p&gt;

&lt;p&gt;I contained what I could and kept using the tool. The audit stayed private — useful for my own triage, not worth the drama of publishing.&lt;/p&gt;

&lt;p&gt;Then Anthropic leaked their own source code. The Register ran the story. The information is public now anyway.&lt;/p&gt;

&lt;p&gt;So here's the audit. Hopefully useful for others doing similar evaluation.&lt;/p&gt;




&lt;h3&gt;
  
  
  Shell Environment Capture
&lt;/h3&gt;

&lt;p&gt;Claude Code captures your shell environment at startup — aliases, SSH configs, environment variables, paths. This gets bundled and transmitted.&lt;/p&gt;

&lt;p&gt;If you have aliases pointing to internal hostnames, SSH configs with jump hosts, or environment variables with credentials paths... Claude Code sees them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Finding 001&lt;/strong&gt; in the audit documents the mechanism. It's not subtle.&lt;/p&gt;




&lt;h3&gt;
  
  
  Behavioral Profiling
&lt;/h3&gt;

&lt;p&gt;Beyond telemetry, Claude Code generates AI-classified behavioral profiles of your sessions. What you're trying to accomplish, your working patterns, satisfaction levels — all inferred and stored.&lt;/p&gt;

&lt;p&gt;Your first prompt to each session? Captured verbatim.&lt;/p&gt;




&lt;h3&gt;
  
  
  Controls That Don't Work
&lt;/h3&gt;

&lt;p&gt;The environment variable &lt;code&gt;CLAUDE_CODE_DONT_INHERIT_ENV&lt;/code&gt; exists. Reading the name, you'd expect it to prevent environment inheritance.&lt;/p&gt;

&lt;p&gt;It doesn't work. The source shows it affects one code path but not the execution path. The control is decorative.&lt;/p&gt;




&lt;h3&gt;
  
  
  The Irony
&lt;/h3&gt;

&lt;p&gt;Yes, I used Claude (the model) to audit Claude Code (the application). It helped deobfuscate the binary, analyze the findings, and write the containment strategies.&lt;/p&gt;

&lt;p&gt;Make of that what you will.&lt;/p&gt;




&lt;h3&gt;
  
  
  Mitigations
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Lazy but effective:&lt;/strong&gt; Block telemetry domains via &lt;code&gt;/etc/hosts&lt;/code&gt;. Statsig, Sentry, GrowthBook, the Anthropic beacon endpoints. Doesn't stop everything, but reduces exposure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Proper containment:&lt;/strong&gt; Run Claude Code in a Docker container with a minimal user environment. The shell capture still happens, but it captures the container's empty shell, not your host system with decades of configs.&lt;/p&gt;

&lt;p&gt;The audit repo includes both approaches with copy-paste configs.&lt;/p&gt;




&lt;h3&gt;
  
  
  The Full Audit
&lt;/h3&gt;

&lt;p&gt;11 findings, documented with evidence and reproduction steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/cepunkt/ccaudit-public" rel="noopener noreferrer"&gt;github.com/cepunkt/ccaudit-public&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Shell snapshot exfiltration mechanism&lt;/li&gt;
&lt;li&gt;Behavioral profiling with AI classification&lt;/li&gt;
&lt;li&gt;Statsig/GrowthBook telemetry infrastructure&lt;/li&gt;
&lt;li&gt;Broken control documentation&lt;/li&gt;
&lt;li&gt;Binary analysis methodology (no leaked source needed)&lt;/li&gt;
&lt;li&gt;Practical mitigations&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Why Anthropic
&lt;/h3&gt;

&lt;p&gt;Not drama. Not "Anthropic bad."&lt;/p&gt;

&lt;p&gt;Anthropic was unlucky that I use their tool as a daily driver. My stack includes other coding assistants — they'd likely show similar patterns under audit.&lt;/p&gt;

&lt;p&gt;This is standard Silicon Valley practice. The user's data is the product. It's normalized across the industry.&lt;/p&gt;

&lt;p&gt;Claude Code just happened to be the one I needed to contain for my own use. So it's the one I documented.&lt;/p&gt;

&lt;p&gt;If you're evaluating &lt;em&gt;any&lt;/em&gt; AI coding tool for sensitive environments, assume the defaults are hostile until proven otherwise. The audit shows what to look for and how to contain it.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>privacy</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
