<?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: Aditya Tiwari</title>
    <description>The latest articles on DEV Community by Aditya Tiwari (@aditya_tiwari_techo).</description>
    <link>https://dev.to/aditya_tiwari_techo</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%2F3601026%2F8a63575a-4bae-4944-9da2-af6eec711a5e.jpg</url>
      <title>DEV Community: Aditya Tiwari</title>
      <link>https://dev.to/aditya_tiwari_techo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aditya_tiwari_techo"/>
    <language>en</language>
    <item>
      <title>I built Klarion, a secret scanner that asks an LLM before it alerts. Here's how it did against 4 others on 61k files</title>
      <dc:creator>Aditya Tiwari</dc:creator>
      <pubDate>Sun, 04 Oct 2026 17:46:30 +0000</pubDate>
      <link>https://dev.to/aditya_tiwari_techo/i-built-klarion-a-secret-scanner-that-asks-an-llm-before-it-alerts-heres-how-it-did-against-4-3m0c</link>
      <guid>https://dev.to/aditya_tiwari_techo/i-built-klarion-a-secret-scanner-that-asks-an-llm-before-it-alerts-heres-how-it-did-against-4-3m0c</guid>
      <description>&lt;p&gt;Secret scanners have a noise problem. Point one at a big, healthy codebase and you get hundreds of alerts: test fixtures, docs examples, long identifiers that happen to look random. People stop reading them, and then the real leak slips through.&lt;/p&gt;

&lt;p&gt;That gets worse with AI coding agents, which write files faster than anyone reviews them. So I built Klarion, a scanner that asks an LLM before it raises an alert, and then benchmarked it against the usual tools to see whether that actually helps.&lt;/p&gt;

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

&lt;p&gt;Five scanners, four large open-source repos in four languages, all pinned to a commit:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;spring-boot (Java), terraform (Go/HCL), next.js (TypeScript), symfony (PHP)&lt;/li&gt;
&lt;li&gt;61,514 files in total&lt;/li&gt;
&lt;li&gt;Control set: flask and rails (5,054 files)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Versions: klarion 0.4.3 (with Claude Haiku), gitleaks 8.30.1, trufflehog 3.97.5, detect-secrets 1.5.0, ripsecrets 0.1.11.&lt;/p&gt;

&lt;p&gt;These repos have no live credentials, so every alert is something a human would have to check and throw away.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feyq0frxzthfm6jz9xexb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feyq0frxzthfm6jz9xexb.png" alt="Same code. Five secret scanners." width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Alerts on the 4 repos&lt;/th&gt;
&lt;th&gt;Per 1k files&lt;/th&gt;
&lt;th&gt;Control (flask + rails)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Klarion + model&lt;/td&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;0.18&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ripsecrets&lt;/td&gt;
&lt;td&gt;299&lt;/td&gt;
&lt;td&gt;4.86&lt;/td&gt;
&lt;td&gt;61&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;trufflehog&lt;/td&gt;
&lt;td&gt;344&lt;/td&gt;
&lt;td&gt;5.59&lt;/td&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;gitleaks&lt;/td&gt;
&lt;td&gt;361&lt;/td&gt;
&lt;td&gt;5.87&lt;/td&gt;
&lt;td&gt;33&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;detect-secrets&lt;/td&gt;
&lt;td&gt;12,073&lt;/td&gt;
&lt;td&gt;196.26&lt;/td&gt;
&lt;td&gt;247&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That's 33x fewer alerts than gitleaks and over 1,000x fewer than detect-secrets on the same code. Each of Klarion's 11 comes with the model's verdict and a one-line reason, so checking them takes minutes, not an afternoon.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why entropy scanners blow up on typed languages
&lt;/h2&gt;

&lt;p&gt;Entropy-based detection, including Klarion's own first stage, raises 3–4x more alerts per file on Java, Go, TypeScript and PHP than on Python and Ruby: trufflehog jumps 3.1x and detect-secrets 4.0x. gitleaks and ripsecrets, which lean on rules, stayed flat.&lt;/p&gt;

&lt;p&gt;The reason: Java, Go, TypeScript and PHP are full of long identifiers like &lt;code&gt;SseCustomerKeySHA256AttrName&lt;/code&gt; that look high-entropy. Entropy alone can't tell them apart from a credential. Reading the surrounding code can, and that's what the LLM step does. After it, Klarion's rate is 0.18 per 1k files on the typed repos and 0.20 on the control, so the language effect is gone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does it miss real secrets?
&lt;/h2&gt;

&lt;p&gt;Fewer alerts are useless if real leaks go missing, so I also used Samsung's CredData: labelled lines from 337 real repositories.&lt;/p&gt;

&lt;p&gt;On code outside test folders:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Recall&lt;/th&gt;
&lt;th&gt;Precision&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Klarion + model&lt;/td&gt;
&lt;td&gt;0.35&lt;/td&gt;
&lt;td&gt;0.89&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;gitleaks 8.30&lt;/td&gt;
&lt;td&gt;0.21&lt;/td&gt;
&lt;td&gt;0.91&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;detect-secrets 1.5&lt;/td&gt;
&lt;td&gt;0.35&lt;/td&gt;
&lt;td&gt;0.34&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That's about 1.7x the real secrets gitleaks finds, at similar precision.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Detect:&lt;/strong&gt; keyword gate, 81 regex rules, normalized Rényi entropy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Judge:&lt;/strong&gt; an LLM reads each candidate with its surrounding code and returns secret / false positive / uncertain, with a reason.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It needs a model: Anthropic, OpenAI-compatible, a local Ollama model (nothing leaves your machine), or your Claude Code login.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it runs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Claude Code:&lt;/strong&gt; a plugin hook blocks the write before the file exists (file edits and Bash)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cursor, Cline or any MCP agent:&lt;/strong&gt; through its MCP server&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CI:&lt;/strong&gt; a GitHub Action that scans only what a PR adds; GitLab CI works too&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Git hooks:&lt;/strong&gt; &lt;code&gt;klarion protect&lt;/code&gt; or the pre-commit framework&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Locally:&lt;/strong&gt; &lt;code&gt;klarion scan .&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it, and tell me where it's wrong
&lt;/h2&gt;

&lt;p&gt;Free and open source (MIT): &lt;a href="https://github.com/0x1Adi/Klarion" rel="noopener noreferrer"&gt;https://github.com/0x1Adi/Klarion&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The full method, pinned commits and every finding are in &lt;a href="https://github.com/0x1Adi/Klarion/blob/main/benchmark/REPORT.md" rel="noopener noreferrer"&gt;&lt;code&gt;benchmark/REPORT.md&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>security</category>
      <category>opensource</category>
      <category>ai</category>
      <category>devops</category>
    </item>
    <item>
      <title>Chatlectify: turn your chat history into a writing style your LLM can reuse</title>
      <dc:creator>Aditya Tiwari</dc:creator>
      <pubDate>Mon, 20 Apr 2026 06:21:56 +0000</pubDate>
      <link>https://dev.to/aditya_tiwari_techo/chatlectify-turn-your-chat-history-into-a-writing-style-your-llm-can-reuse-4d3e</link>
      <guid>https://dev.to/aditya_tiwari_techo/chatlectify-turn-your-chat-history-into-a-writing-style-your-llm-can-reuse-4d3e</guid>
      <description>&lt;p&gt;&lt;strong&gt;Two years of daily Claude + ChatGPT.&lt;/strong&gt; They've seen probably a million tokens of my writing. Every response still opens with &lt;em&gt;"Certainly!"&lt;/em&gt; or &lt;em&gt;"Great question!"&lt;/em&gt; and closes with &lt;em&gt;"In conclusion…"&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Nobody writes like that. The model has no idea who you are — you're just another session.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;chatlectify&lt;/strong&gt;. Point it at your exported chat history (Claude / ChatGPT / Gemini JSON, or a folder of your own writing — blog posts, emails, notes). It outputs a &lt;code&gt;SKILL.md&lt;/code&gt; + &lt;code&gt;system_prompt.txt&lt;/code&gt; that makes the model write like you.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Extracts ~20 stylometric features from your messages — sentence-length distribution, contraction rate, bullet usage, hedge words, typo rate, punctuation histograms, question-vs-imperative ratio, top sentence starters&lt;/li&gt;
&lt;li&gt;Picks a stratified sample of your messages across length buckets as exemplars&lt;/li&gt;
&lt;li&gt;One LLM call distills it all into a portable style file&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Privacy
&lt;/h2&gt;

&lt;p&gt;Runs locally. Exactly one outbound LLM call to your configured model — the synth step that writes the style file. That call includes your feature summary and ~40 exemplar messages (the stratified sample). Nothing else leaves your machine. No telemetry, no cloud backend, no account.&lt;/p&gt;

&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install chatlectify
chatlectify all ./conversations.json --out-dir ./my_skill
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Drop the folder into &lt;code&gt;~/.claude/skills/&lt;/code&gt; or paste &lt;code&gt;system_prompt.txt&lt;/code&gt; into any model that takes one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repo:&lt;/strong&gt; &lt;a href="https://github.com/0x1Adi/chatlectify" rel="noopener noreferrer"&gt;https://github.com/0x1Adi/chatlectify&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Curious what people think. Also — which export formats should I add next? Slack, iMessage, email, Discord, Obsidian vault?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>showdev</category>
      <category>writing</category>
    </item>
    <item>
      <title>🎭 Slopsquatting: The Supply Chain Attack Hiding in Plain Sight</title>
      <dc:creator>Aditya Tiwari</dc:creator>
      <pubDate>Fri, 07 Nov 2025 11:21:33 +0000</pubDate>
      <link>https://dev.to/aditya_tiwari_techo/slopsquatting-the-supply-chain-attack-hiding-in-plain-sight-5ai8</link>
      <guid>https://dev.to/aditya_tiwari_techo/slopsquatting-the-supply-chain-attack-hiding-in-plain-sight-5ai8</guid>
      <description>&lt;p&gt;Your AI coding assistant just suggested a package that doesn't exist. An attacker is about to register it with malware.&lt;br&gt;
Researchers analyzed 576,000 AI-generated code samples and found something terrifying:&lt;br&gt;
→ 205,474 unique "phantom packages" that don't exist in PyPI/npm&lt;br&gt;
 → 43% repeat PERFECTLY across identical prompts&lt;br&gt;
 → Commercial AI (GPT-4, Claude, Copilot): 5.2% hallucination rate&lt;br&gt;
 → Open-source LLMs: 21.7% hallucination rate&lt;/p&gt;

&lt;p&gt;This isn't typosquatting. It's slopsquatting - exploiting systematic AI behavior.&lt;/p&gt;

&lt;p&gt;The attack is trivial:&lt;br&gt;
Query AI assistant with common prompts&lt;br&gt;
Collect hallucinated package names&lt;br&gt;
Register them on PyPI/npm with malicious code&lt;br&gt;
Wait for developers to pip install your malware&lt;/p&gt;

&lt;p&gt;Here's what makes this surreal:&lt;br&gt;
Despite 6 months of security research, 205K identified targets, and trivial exploitation... zero confirmed attacks exist in the wild.&lt;br&gt;
The window for defense is open. But it's closing fast.&lt;br&gt;
I wrote a deep-dive on: &lt;br&gt;
 ✓ Why AI reliably hallucinates the same phantom packages&lt;br&gt;
 ✓ Which security tools detect this (spoiler: almost none)&lt;br&gt;
 ✓ A 15-minute scanner you can deploy today&lt;br&gt;
 ✓ Why zero attacks won't last much longer&lt;/p&gt;

&lt;p&gt;&lt;a href="https://lnkd.in/dw6R2qSN" rel="noopener noreferrer"&gt;https://lnkd.in/dw6R2qSN&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you're using AI coding assistants (and you probably are), this affects you.&lt;/p&gt;

&lt;p&gt;Read it before the first confirmed attack makes headlines.&lt;/p&gt;

&lt;p&gt;Disclaimer: Personal analysis based on my cybersecurity background. Not legal advice. Views are my own.&lt;/p&gt;

&lt;p&gt;hashtag#CyberSecurity hashtag#AppSec hashtag#AI hashtag#DevSecOps hashtag#SupplyChainSecurity hashtag#SoftwareDevelopment hashtag#InfoSec hashtag#DevOps&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>Are you fuzzing?</title>
      <dc:creator>Aditya Tiwari</dc:creator>
      <pubDate>Fri, 07 Nov 2025 11:17:02 +0000</pubDate>
      <link>https://dev.to/aditya_tiwari_techo/are-you-fuzzing-2j98</link>
      <guid>https://dev.to/aditya_tiwari_techo/are-you-fuzzing-2j98</guid>
      <description>&lt;p&gt;Why Fuzzing Matters More Than Ever in the AI Code Generation Era&lt;/p&gt;

&lt;p&gt;By 2025, nearly half of all code in AI-assisted projects is generated by LLMs. 63% of developers now use AI tools daily. &lt;/p&gt;

&lt;p&gt;We've embraced the productivity gains without updating our testing practices.&lt;/p&gt;

&lt;p&gt;Result? We're testing AI-generated code with techniques designed for human cognitive biases.&lt;/p&gt;

&lt;p&gt;The data is stark: Google's AI-powered fuzzer found a vulnerability in OpenSSL that had existed for 20 years. Another AI system found a SQLite bug that 150 CPU-hours of traditional fuzzing missed entirely.&lt;/p&gt;

&lt;p&gt;These aren't edge cases. As of May 2025, OSS-Fuzz has identified 13,000+ vulnerabilities across 1,000+ projects. The 26 vulnerabilities found by AI-enhanced fuzzing were all unreachable by human-written test harnesses.&lt;/p&gt;

&lt;p&gt;I spent time researching what actually works for testing AI-generated code. The answer: automated fuzzing. Not because it's trendy, but because it's the only technique that doesn't rely on human assumptions about how code should behave.&lt;/p&gt;

&lt;p&gt;Wrote up the full analysis with implementation guide and cost breakdown: &lt;a href="https://lnkd.in/dYRNQxEB" rel="noopener noreferrer"&gt;https://lnkd.in/dYRNQxEB&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Tools are free. Techniques are proven. What's missing is organizational adoption.&lt;/p&gt;

&lt;p&gt;Disclaimer: Views are my own.&lt;/p&gt;

&lt;p&gt;hashtag#CyberSecurity hashtag#ApplicationSecurity hashtag#Fuzzing hashtag#AI hashtag#SoftwareEngineering hashtag#DevSecOps hashtag#VulnerabilityResearch&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>security</category>
      <category>go</category>
      <category>ai</category>
    </item>
    <item>
      <title>Announcing SlopGuard — Open-Source Defence Against AI Supply Chain Attacks</title>
      <dc:creator>Aditya Tiwari</dc:creator>
      <pubDate>Fri, 07 Nov 2025 11:16:02 +0000</pubDate>
      <link>https://dev.to/aditya_tiwari_techo/announcing-slopguard-open-source-defence-against-ai-supply-chain-attacks-46ph</link>
      <guid>https://dev.to/aditya_tiwari_techo/announcing-slopguard-open-source-defence-against-ai-supply-chain-attacks-46ph</guid>
      <description>&lt;p&gt;Your AI coding assistant just suggested installing a package. It doesn't exist. You install it anyway. Now you're compromised.&lt;/p&gt;

&lt;p&gt;This isn't hypothetical—AI models hallucinate non-existent package names in 5-21% of generated code. Research analyzing 576,000 code samples found 205,000+ unique phantom packages, with 58% recurring predictably across sessions.&lt;/p&gt;

&lt;p&gt;Attackers exploit this by monitoring AI outputs, registering these hallucinated packages with malware, and waiting for developers to blindly install them. It's called "slopsquatting."&lt;/p&gt;

&lt;p&gt;While exploring AI supply chain risks (wrote about it here: &lt;a href="https://lnkd.in/dS3D-zwt" rel="noopener noreferrer"&gt;https://lnkd.in/dS3D-zwt&lt;/a&gt;), I built SlopGuard to detect these attacks before they reach production.&lt;/p&gt;

&lt;p&gt;🔍 Technical approach: &lt;br&gt;
• 3-stage lazy-loading trust scorer (downloads → dependents → maintainer/GitHub)&lt;br&gt;
• 87% of packages exit at stage 1 (basic trust), only 3% need full analysis &lt;br&gt;
• Detects typosquatting (Levenshtein distance), namespace squatting, download inflation, ownership changes &lt;br&gt;
• Automated scoring from verifiable signals—no manual whitelists that break&lt;br&gt;
⚡ Validated performance: &lt;br&gt;
• &amp;lt;3% false positives (tested against 500 legitimate + 500 malicious packages) &lt;br&gt;
• 96% detection rate on documented supply chain attacks &lt;br&gt;
• 7 seconds to scan 700+ packages (warm cache) &lt;/p&gt;

&lt;p&gt;Built in Ruby, ~2,500 lines, fully open source (MIT).&lt;br&gt;
━━━━━━━━━━━━━━━━━━━━━━━━&lt;br&gt;
Current stage: Early development, personal research project. RubyGems/PyPI/Golang for now. Metadata-based detection—can't analyze behavioral patterns.&lt;/p&gt;

&lt;p&gt;Looking for technical peer review: &lt;br&gt;
• Are trust thresholds (80/70/40) optimal for production? • What attack patterns am I missing? &lt;br&gt;
• Would you deploy this in CI/CD, or does it solve the wrong problem?&lt;/p&gt;

&lt;p&gt;Try it: &lt;a href="https://lnkd.in/dHyvucVQ" rel="noopener noreferrer"&gt;https://lnkd.in/dHyvucVQ&lt;/a&gt;&lt;br&gt;
GitHub: &lt;a href="https://lnkd.in/d2TsnQ3s" rel="noopener noreferrer"&gt;https://lnkd.in/d2TsnQ3s&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you work on supply chain security or AI security research—where are the blind spots in this approach?&lt;/p&gt;

&lt;p&gt;Disclaimer: This is my personal project in early development. The algorithms are based on academic research (TypoSmart, Sonatype data).&lt;/p&gt;

</description>
      <category>security</category>
      <category>ai</category>
      <category>ruby</category>
      <category>go</category>
    </item>
  </channel>
</rss>
