<?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: XM Yang · SweetAI</title>
    <description>The latest articles on DEV Community by XM Yang · SweetAI (@xm-yang).</description>
    <link>https://dev.to/xm-yang</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%2F4200677%2F059cc275-9a94-444b-ad7d-cfc043cc5b27.png</url>
      <title>DEV Community: XM Yang · SweetAI</title>
      <link>https://dev.to/xm-yang</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/xm-yang"/>
    <language>en</language>
    <item>
      <title>I replaced my 137MB Electron menu-bar app with a 693KB native build</title>
      <dc:creator>XM Yang · SweetAI</dc:creator>
      <pubDate>Fri, 23 Oct 2026 06:36:27 +0000</pubDate>
      <link>https://dev.to/xm-yang/i-replaced-my-137mb-electron-menu-bar-app-with-a-693kb-native-build-33ol</link>
      <guid>https://dev.to/xm-yang/i-replaced-my-137mb-electron-menu-bar-app-with-a-693kb-native-build-33ol</guid>
      <description>&lt;p&gt;I ship a small macOS menu-bar utility that shows AI API quota usage — used + remaining with a reset countdown — in a Control-Center-style dropdown. Click any tool for a native detail window. The first version was Electron: a 110–137MB download for what is essentially a dropdown panel and a settings window.&lt;/p&gt;

&lt;p&gt;Last week I rebuilt it native (macOS + Windows, separately). The macOS Apple Silicon build is now 693KB. The Windows build is 221KB. Same features, roughly 200× smaller.&lt;/p&gt;

&lt;p&gt;What actually made the difference:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The web runtime was the product.&lt;/strong&gt; Chromium + Node accounted for nearly all of those megabytes. My own code was a rounding error. If your app is mostly native UI with a little logic, you're shipping a browser to display a dropdown.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Menu-bar UX is one native API call.&lt;/strong&gt; &lt;code&gt;NSStatusItem&lt;/code&gt; + &lt;code&gt;NSPopover&lt;/code&gt; gives you the dropdown behavior for free — vibrancy, dark mode, screen-edge positioning. In Electron I was fighting frameless windows and CSS to fake it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The rewrite deleted more than it added.&lt;/strong&gt; All the Electron-side scaffolding I had accumulated (auto-updater config, the signing dance, transparent-window glitches) went away entirely. Less code to maintain, not more.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What I lost:&lt;/strong&gt; one codebase for two platforms. I now maintain two native codebases. For a utility this size that's fine; for a document editor it wouldn't be.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Honest trade-off, not a prescription: if your app is genuinely a web app with a desktop shell, stay on Electron. If it's a native-feeling utility wearing an Electron costume, the rewrite pays for itself in download size, launch time, and fewer "why does this dropdown eat my RAM" complaints.&lt;/p&gt;

&lt;p&gt;QuotaTray 2.0 (the native rebuild) is $24: &lt;a href="https://payhip.com/b/o7RZ1" rel="noopener noreferrer"&gt;https://payhip.com/b/o7RZ1&lt;/a&gt; — includes the macOS Apple Silicon and Windows builds.&lt;/p&gt;

</description>
      <category>macos</category>
      <category>swift</category>
      <category>electron</category>
      <category>productivity</category>
    </item>
    <item>
      <title>The poisoned LiteLLM 1.107.0 problem, and the 30-second check I now run on every repo</title>
      <dc:creator>XM Yang · SweetAI</dc:creator>
      <pubDate>Fri, 23 Oct 2026 00:05:54 +0000</pubDate>
      <link>https://dev.to/xm-yang/the-poisoned-litellm-11070-problem-and-the-30-second-check-i-now-run-on-every-repo-570c</link>
      <guid>https://dev.to/xm-yang/the-poisoned-litellm-11070-problem-and-the-30-second-check-i-now-run-on-every-repo-570c</guid>
      <description>&lt;p&gt;On Oct 21, LiteLLM disclosed that v1.107.0 shipped compromised — malicious wheels on PyPI (live 11:39–13:23 UTC), poisoned Docker tags (&lt;code&gt;v1.107.0&lt;/code&gt;, &lt;code&gt;latest&lt;/code&gt;, &lt;code&gt;main-latest&lt;/code&gt;, &lt;code&gt;main-stable&lt;/code&gt;, 11:46–14:20 UTC), and GHCR images (until 13:51 UTC). The official announcement: &lt;a href="https://docs.litellm.ai/blog/security-incident-oct-21-2026" rel="noopener noreferrer"&gt;https://docs.litellm.ai/blog/security-incident-oct-21-2026&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The part that caught people off guard: in an affected environment, &lt;em&gt;any&lt;/em&gt; Python start re-runs the implant. So the vendor's own response steps warn you &lt;strong&gt;not&lt;/strong&gt; to start with &lt;code&gt;pip install&lt;/code&gt; or &lt;code&gt;pip show&lt;/code&gt; on a suspect box — you check files and metadata first, from the shell.&lt;/p&gt;

&lt;p&gt;I turned the announcement's manual steps into a small checklist I now run on every repo and venv folder. Here's the method, then the tool that automates it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The manual check (works from any shell, no Python startup)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Version specs, evaluated not grepped.&lt;/strong&gt; &lt;code&gt;litellm==1.107.0&lt;/code&gt; pinned = exposed. But &lt;code&gt;litellm&amp;gt;=1.0&lt;/code&gt;, &lt;code&gt;~=1.107&lt;/code&gt;, &lt;code&gt;^1.107.0&lt;/code&gt;, or unpinned &lt;code&gt;litellm&lt;/code&gt; in requirements/pyproject/Poetry files = &lt;em&gt;admits&lt;/em&gt; the bad version — whether it actually installed it depends on whether you installed during the exposure windows above. A spec that excludes 1.107.0 = clean on this axis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lockfiles.&lt;/strong&gt; Check &lt;code&gt;poetry.lock&lt;/code&gt;, &lt;code&gt;uv.lock&lt;/code&gt;, &lt;code&gt;Pipfile.lock&lt;/code&gt; for a resolved &lt;code&gt;litellm&lt;/code&gt; 1.107.0 — the lockfile tells you what actually got installed, the manifest only tells you what was allowed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dockerfiles and compose files.&lt;/strong&gt; Tags &lt;code&gt;v1.107.0&lt;/code&gt; = exposed; &lt;code&gt;latest&lt;/code&gt; / &lt;code&gt;main-latest&lt;/code&gt; / untagged images pulled during Oct 21 11:46–14:20 UTC = suspect. Also compare against the compromised image digest published in the announcement.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Installed environments — without starting Python.&lt;/strong&gt; Read &lt;code&gt;litellm-*.dist-info/METADATA&lt;/code&gt; directly in site-packages. If it says 1.107.0, treat the environment as compromised: rebuild from &lt;code&gt;litellm==1.106.2&lt;/code&gt;, rotate every secret that box could reach, check CloudTrail.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implant markers.&lt;/strong&gt; Look for &lt;code&gt;cook.pth&lt;/code&gt;, &lt;code&gt;cook.py&lt;/code&gt;, a planted &lt;code&gt;sitecustomize.py&lt;/code&gt;, and &lt;code&gt;/tmp/remote_code_loader.lock&lt;/code&gt; (the C2 daemon ran or is still running if that lockfile exists).&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The automation
&lt;/h2&gt;

&lt;p&gt;I packaged the above as &lt;code&gt;litellm-check&lt;/code&gt; (13 rules, each mapped to a step in the official announcement), because I kept seeing "how do I know if I was exposed?" in issue threads:&lt;br&gt;
&lt;/p&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;litellm-check
litellm-check scan ./your-project        &lt;span class="c"&gt;# code side&lt;/span&gt;
litellm-check scan ~/.virtualenvs        &lt;span class="c"&gt;# installed-env side&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output is a Markdown or JSON evidence report — file:line, the matched spec/tag, and the announcement basis for each finding. &lt;code&gt;--fail-on critical&lt;/code&gt; works as a CI gate. Zero third-party dependencies, Python 3.11+, Apache-2.0.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The honest limit, printed on every report:&lt;/strong&gt; a clean scan means "none of the known indicators were found" — nothing more. Environments rebuilt after exposure, images pulled without a definition file in the tree, or CI-only installs leave nothing on disk to find. This is evidence collection, not a safety certification.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Repo: &lt;a href="https://github.com/dylanXM/litellm-check" rel="noopener noreferrer"&gt;https://github.com/dylanXM/litellm-check&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;PyPI: &lt;a href="https://pypi.org/project/litellm-check/" rel="noopener noreferrer"&gt;https://pypi.org/project/litellm-check/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Packaged bundle with sample report &amp;amp; remediation checklist ($29): &lt;a href="https://payhip.com/b/eFOvm" rel="noopener noreferrer"&gt;https://payhip.com/b/eFOvm&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Not affiliated with BerriAI/LiteLLM; "LiteLLM" names only the incident this tool audits.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your stack exposes LiteLLM somewhere these 13 rules miss, rule PRs with fixtures are the most useful contribution.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>python</category>
      <category>security</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
