<?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: Dankerbadge Tools</title>
    <description>The latest articles on DEV Community by Dankerbadge Tools (@dankerbadge).</description>
    <link>https://dev.to/dankerbadge</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%2F3938895%2Fbbc71610-0564-4f1f-a415-aca2d4c192ed.jpg</url>
      <title>DEV Community: Dankerbadge Tools</title>
      <link>https://dev.to/dankerbadge</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dankerbadge"/>
    <language>en</language>
    <item>
      <title>I built a local prompt scanner to catch secrets before they reach AI chats</title>
      <dc:creator>Dankerbadge Tools</dc:creator>
      <pubDate>Mon, 18 May 2026 20:29:58 +0000</pubDate>
      <link>https://dev.to/dankerbadge/i-built-a-local-prompt-scanner-to-catch-secrets-before-they-reach-ai-chats-4gcf</link>
      <guid>https://dev.to/dankerbadge/i-built-a-local-prompt-scanner-to-catch-secrets-before-they-reach-ai-chats-4gcf</guid>
      <description>&lt;p&gt;I kept seeing the same uncomfortable workflow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Copy an error log, &lt;code&gt;.env&lt;/code&gt; fragment, config file, webhook payload, or database URL.&lt;/li&gt;
&lt;li&gt;Paste it into an AI chat to debug something faster.&lt;/li&gt;
&lt;li&gt;Realize there might have been a key, token, signed URL, phone number, email, or credential-bearing connection string hiding in the paste.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So I built &lt;strong&gt;Prompt Leak Guard&lt;/strong&gt;, a small browser extension and free web demo that tries to catch that mistake before the prompt leaves the browser.&lt;/p&gt;

&lt;p&gt;The scanner is intentionally boring: no backend, no analytics SDK, no remote model call, and no account connection. It uses local JavaScript pattern matching in the browser.&lt;/p&gt;

&lt;p&gt;Free demo:&lt;br&gt;
&lt;a href="https://site-mocha-three-50.vercel.app/prompt-leak-guard-demo" rel="noopener noreferrer"&gt;https://site-mocha-three-50.vercel.app/prompt-leak-guard-demo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Field notes:&lt;br&gt;
&lt;a href="https://site-mocha-three-50.vercel.app/prompt-leak-guard-field-notes" rel="noopener noreferrer"&gt;https://site-mocha-three-50.vercel.app/prompt-leak-guard-field-notes&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What it checks for
&lt;/h2&gt;

&lt;p&gt;The current QA build has 87 local detector rules. The important categories are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;common AI provider keys and API tokens&lt;/li&gt;
&lt;li&gt;AWS, Azure, and GCP credential patterns&lt;/li&gt;
&lt;li&gt;signed URLs and SAS-token-style URLs&lt;/li&gt;
&lt;li&gt;private key blocks&lt;/li&gt;
&lt;li&gt;Slack, Discord, Telegram, and webhook URLs&lt;/li&gt;
&lt;li&gt;GitHub, GitLab, Hugging Face, npm, PyPI, Docker Hub, CI/CD, and deployment tokens&lt;/li&gt;
&lt;li&gt;Stripe, Twilio, Resend, Postmark, Sentry, Datadog, New Relic, and similar service keys&lt;/li&gt;
&lt;li&gt;credential-bearing database, cache, and broker URLs&lt;/li&gt;
&lt;li&gt;authorization headers, cookie/session patterns, and URL secret parameters&lt;/li&gt;
&lt;li&gt;optional private-data patterns like emails, phones, card-like numbers, and dashed US SSNs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The extension can also generate a redacted version of the text locally.&lt;/p&gt;

&lt;h2&gt;
  
  
  The false-positive problem was the real work
&lt;/h2&gt;

&lt;p&gt;The first version was easy to make noisy.&lt;/p&gt;

&lt;p&gt;The annoying cases were not the obvious secrets. They were things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;UUID-shaped trace IDs&lt;/li&gt;
&lt;li&gt;placeholder values like &lt;code&gt;your_api_key_here&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;masked values like &lt;code&gt;********&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;official documentation examples&lt;/li&gt;
&lt;li&gt;Stripe test cards&lt;/li&gt;
&lt;li&gt;invalid JWT-looking strings&lt;/li&gt;
&lt;li&gt;bare database URLs without embedded credentials&lt;/li&gt;
&lt;li&gt;public query IDs that only look scary out of context&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the work turned into making the scanner conservative enough that a warning actually means something.&lt;/p&gt;

&lt;p&gt;Some examples from the QA pass:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;UUID-only trace IDs stay clear.&lt;/li&gt;
&lt;li&gt;Bearer headers containing UUID-shaped request IDs stay clear.&lt;/li&gt;
&lt;li&gt;Placeholder config values stay clear.&lt;/li&gt;
&lt;li&gt;Bare database URLs stay clear unless credentials are embedded.&lt;/li&gt;
&lt;li&gt;Dashed US SSNs without nearby sensitive context are downgraded instead of treated as a guaranteed high-risk secret.&lt;/li&gt;
&lt;li&gt;The private-data toggle excludes emails, phones, and SSN-like patterns when a user only wants credential scanning.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What it is not
&lt;/h2&gt;

&lt;p&gt;This is not DLP.&lt;/p&gt;

&lt;p&gt;It cannot guarantee that every possible secret format will be detected. Some providers have ambiguous raw tokens with no stable prefix. Some values only become sensitive because of surrounding context. If a real key, token, password, private key, or credential URL may already have been exposed, the answer is still to rotate it.&lt;/p&gt;

&lt;p&gt;The goal is narrower: catch common and high-signal leaks before they get pasted into an AI chat.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why local-only matters here
&lt;/h2&gt;

&lt;p&gt;For this specific tool, a remote scanner felt backwards.&lt;/p&gt;

&lt;p&gt;If the point is “do not send this suspicious text somewhere else,” then the scanner should not upload the suspicious text to inspect it.&lt;/p&gt;

&lt;p&gt;The browser demo and extension scan locally. The installable extension stores only settings and an offline license code. It does not send prompt text, scan results, or browsing history to a backend.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would love feedback on
&lt;/h2&gt;

&lt;p&gt;I am looking for practical detector feedback, especially from people who paste logs/configs into AI tools a lot:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Are there common token formats I am missing?&lt;/li&gt;
&lt;li&gt;Are there noisy false positives you would hate seeing in a real workflow?&lt;/li&gt;
&lt;li&gt;Should private-data warnings stay separate from credential warnings?&lt;/li&gt;
&lt;li&gt;What prompt surfaces besides ChatGPT, Claude, Gemini, and Perplexity would be worth supporting?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Again, the demo is here:&lt;br&gt;
&lt;a href="https://site-mocha-three-50.vercel.app/prompt-leak-guard-demo" rel="noopener noreferrer"&gt;https://site-mocha-three-50.vercel.app/prompt-leak-guard-demo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Disclosure: I used AI coding assistance while building and editing this project, and then manually/automatically tested the product against the cases above. The scanner itself is pattern-based local JavaScript, not an AI model.&lt;/p&gt;

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