<?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: Kall sand</title>
    <description>The latest articles on DEV Community by Kall sand (@bastakillen).</description>
    <link>https://dev.to/bastakillen</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%2F4275036%2Feb7a2c76-1bdb-4df6-999d-3ac8ce17e874.png</url>
      <title>DEV Community: Kall sand</title>
      <link>https://dev.to/bastakillen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bastakillen"/>
    <language>en</language>
    <item>
      <title>What my AI secret scanner still misses (and why regex isn't enough)</title>
      <dc:creator>Kall sand</dc:creator>
      <pubDate>Tue, 01 Dec 2026 07:20:18 +0000</pubDate>
      <link>https://dev.to/bastakillen/what-my-ai-secret-scanner-still-misses-and-why-regex-isnt-enough-2mcb</link>
      <guid>https://dev.to/bastakillen/what-my-ai-secret-scanner-still-misses-and-why-regex-isnt-enough-2mcb</guid>
      <description>&lt;p&gt;In my last post I tested whether hiding secrets from Claude makes its code worse. It didn't, in my small tests. But hiding secrets only works if you find them first. So I tested that too, and the results are less flattering.&lt;/p&gt;

&lt;h2&gt;
  
  
  The blind test
&lt;/h2&gt;

&lt;p&gt;I asked a separate AI agent to write a fake company codebase: settings files, API clients, test data, a .env file, YAML configs, a shell script. It planted 40 sensitive values and gave me the list only for scoring. I never saw the files before running the scanner once.&lt;/p&gt;

&lt;h2&gt;
  
  
  What got caught: 32 of 40 (80%)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;API keys and tokens in most common formats&lt;/li&gt;
&lt;li&gt;Passwords in code, .env files and YAML&lt;/li&gt;
&lt;li&gt;Connection strings with passwords in them&lt;/li&gt;
&lt;li&gt;Emails, IP addresses, Swedish personal ID numbers and phone numbers&lt;/li&gt;
&lt;li&gt;The company's own name, via a short "always hide" list&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What slipped through
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A Slack webhook URL&lt;/li&gt;
&lt;li&gt;A password split into two strings (&lt;code&gt;"Tr0ub" + "4dor!"&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;A Norwegian ID number (my pattern only knew the Swedish format)&lt;/li&gt;
&lt;li&gt;A street address&lt;/li&gt;
&lt;li&gt;A person's name and a company name with "&amp;amp;" in it in test data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The pattern is clear. Regex is good at things that look like keys. It's bad at things that look like normal words: names, addresses, companies.&lt;/p&gt;

&lt;h2&gt;
  
  
  How other open-source tools did on the same test
&lt;/h2&gt;

&lt;p&gt;Same 40 secrets, default settings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CLOAK:&lt;/strong&gt; 34/40. It scores higher partly by replacing whole function bodies and config blocks with "...", so the AI can't edit that code anymore.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privyx:&lt;/strong&gt; 28/40&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;secretgate:&lt;/strong&gt; 12/40 (it's a scanner for known key formats, not a full redactor)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;llm-anon&lt;/strong&gt; with a small local model (llama3.2): 5/40&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CloakMCP:&lt;/strong&gt; I couldn't get it running correctly, so it's not scored.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Caveats: one small test set, default settings for the other tools, and my scanner had the "always hide" list. Treat this as a rough comparison, not a ranking.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;No scanner catches everything, so a tool like this must show you exactly what gets sent before it's sent.&lt;/li&gt;
&lt;li&gt;Names and addresses need something smarter than regex. A small local AI model is the obvious next step, but on its own (llm-anon above) a small model did worse than regex.&lt;/li&gt;
&lt;li&gt;The best setup is probably layers: patterns first, a company "always hide" list, then a local model as a second check.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;I'm still deciding whether to build this as a real tool, called Swapline. If you'd use it, the waitlist is here: &lt;a href="https://swapline-ai.pages.dev" rel="noopener noreferrer"&gt;https://swapline-ai.pages.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If not enough people sign up, I'll drop the idea.&lt;/p&gt;

&lt;p&gt;Previous post: &lt;a href="https://dev.to/bastakillen"&gt;https://dev.to/bastakillen&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>privacy</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Can you hide secrets from Claude without making its code worse? I tested it.</title>
      <dc:creator>Kall sand</dc:creator>
      <pubDate>Mon, 30 Nov 2026 20:19:24 +0000</pubDate>
      <link>https://dev.to/bastakillen/can-you-hide-secrets-from-claude-without-making-its-code-worse-i-tested-it-2fcg</link>
      <guid>https://dev.to/bastakillen/can-you-hide-secrets-from-claude-without-making-its-code-worse-i-tested-it-2fcg</guid>
      <description>&lt;p&gt;Many companies ban AI coding tools on internal code. Developers paste files into chats anyway, config files and test data included. One leaked API key or customer list is enough to cause real damage.&lt;/p&gt;

&lt;p&gt;I wanted to know: if you replace secrets and rename the code's names before sending it to Claude, then swap everything back afterwards, does the answer get worse?&lt;/p&gt;

&lt;p&gt;What I tested&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Two small test codebases (an invoicing system and a clinic booking system) with fake secrets planted in configs, docstrings, comments and test data.&lt;/li&gt;
&lt;li&gt;11 coding tasks with hidden tests: partial payments, credit notes, VAT rules, booking limits and more.&lt;/li&gt;
&lt;li&gt;Fresh Claude agents that had never seen the real code solved each task twice: once with the real code, once with a cleaned-up copy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Results&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Real code: 11/11 tasks passed, but secrets were sent in 8 of the 11 tasks.&lt;/li&gt;
&lt;li&gt;Cleaned copy: 28/28 task runs passed across 5 separate agents, and 0 planted secrets were sent.&lt;/li&gt;
&lt;li&gt;On a harder secret set written blind by another agent, the scanner caught 80%, not 100%. Names, addresses and some odd password formats still slip through.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What I learned&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Renaming did not hurt answer quality on these tasks, which was my biggest worry.&lt;/li&gt;
&lt;li&gt;Regex alone is not enough. You also need a list of your own company terms, and probably a small local AI for names.&lt;/li&gt;
&lt;li&gt;No tool like this should promise "zero leaks". You need a preview of exactly what gets sent.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What's next&lt;br&gt;
This is a prototype, and these are small internal tests, not an audit. Before building a real tool, I want to know if anyone would use it. I'm calling it Swapline.&lt;/p&gt;

&lt;p&gt;If you'd want this, the waitlist is here: &lt;a href="https://swapline-ai.pages.dev" rel="noopener noreferrer"&gt;https://swapline-ai.pages.dev&lt;/a&gt;&lt;br&gt;
If not enough people sign up, I'll drop the idea and delete the list.&lt;/p&gt;

&lt;p&gt;Questions and criticism are very welcome.&lt;/p&gt;

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