<?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: Nicolas</title>
    <description>The latest articles on DEV Community by Nicolas (@nicolasb29).</description>
    <link>https://dev.to/nicolasb29</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%2F4259280%2F84bf1a3d-99bc-4082-8751-36ca53298d69.jpg</url>
      <title>DEV Community: Nicolas</title>
      <link>https://dev.to/nicolasb29</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nicolasb29"/>
    <language>en</language>
    <item>
      <title>How I built a proxy that blocks compromised npm, PyPI and Maven packages before they hit your CI</title>
      <dc:creator>Nicolas</dc:creator>
      <pubDate>Sun, 22 Nov 2026 20:31:02 +0000</pubDate>
      <link>https://dev.to/nicolasb29/how-i-built-a-proxy-that-blocks-compromised-npm-pypi-and-maven-packages-before-they-hit-your-ci-3gck</link>
      <guid>https://dev.to/nicolasb29/how-i-built-a-proxy-that-blocks-compromised-npm-pypi-and-maven-packages-before-they-hit-your-ci-3gck</guid>
      <description>&lt;p&gt;A few months ago another npm package got hacked. Someone took over a&lt;br&gt;
  maintainer account, pushed a bad version, and a lot of CI pipelines&lt;br&gt;
  downloaded it within minutes.&lt;/p&gt;

&lt;p&gt;What bugged me is that most tools only help &lt;em&gt;after&lt;/em&gt; the advisory is out.&lt;br&gt;
  By then your build already ran the code. I wanted to stop the package at&lt;br&gt;
  download time, and not ask developers to change anything.&lt;/p&gt;

&lt;p&gt;So I started building SilicaProxy.&lt;/p&gt;

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

&lt;p&gt;It's a proxy. It sits between your artifact repository (Nexus,&lt;br&gt;
  Artifactory, whatever you use) and npm, PyPI and Maven Central.&lt;/p&gt;

&lt;p&gt;Every download goes through it. It checks the package and says yes or no.&lt;/p&gt;

&lt;p&gt;What it checks today:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;known vulnerabilities (OSV, GHSA and others, stored locally)&lt;/li&gt;
&lt;li&gt;versions published only a few days ago (quarantine)&lt;/li&gt;
&lt;li&gt;deprecated or yanked packages&lt;/li&gt;
&lt;li&gt;public packages with the same name as your internal ones (dependency confusion)&lt;/li&gt;
&lt;li&gt;your own allow/block list, kept in a Git repo&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The vulnerability data is local, so builds don't wait for an API call.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two extra services
&lt;/h2&gt;

&lt;p&gt;Lists are not enough. A brand new malicious package is in no list yet.&lt;br&gt;
  So I made two small services the proxy can call.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Package Name Guardian&lt;/strong&gt; finds typosquatting, like &lt;code&gt;lodahs&lt;/code&gt; instead of&lt;br&gt;
  &lt;code&gt;lodash&lt;/code&gt;. It compares the name with the most popular packages and uses&lt;br&gt;
  three similarity algorithms that vote.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Package Behavior Guardian&lt;/strong&gt; looks at what the package really does. The&lt;br&gt;
  main case is a good package that gets a bad new version, for example one&lt;br&gt;
  that steals credentials when you install it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Write your own checks
&lt;/h2&gt;

&lt;p&gt;The part I like most is that the proxy is not a closed box. Any HTTP&lt;br&gt;
  service can be plugged in as a check.&lt;/p&gt;

&lt;p&gt;The proxy sends a POST with the package name, version and ecosystem.&lt;br&gt;
  Your service answers "allowed" or "blocked". It can answer right away,&lt;br&gt;
  or take its time and call the proxy back later. That second mode is good&lt;br&gt;
  for slow scans, or even for a human who has to approve a package.&lt;/p&gt;

&lt;p&gt;You can also run a new check in shadow mode: it gives a verdict, the&lt;br&gt;
  verdict is stored, but nothing is blocked. That way you can test it on&lt;br&gt;
  real traffic before you trust it.&lt;/p&gt;

&lt;p&gt;Some ideas I have in mind: a license checker, a Slack approval flow,&lt;br&gt;
  an OpenSSF Scorecard threshold, a SBOM archive, or an adapter for the&lt;br&gt;
  scanner your company already pays for.&lt;/p&gt;

&lt;p&gt;Package Name Guardian and Package Behavior Guardian are just two examples&lt;br&gt;
  of this. If you write another one, I'd love to hear about it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/Silica-Proxy/Silica-Proxy" rel="noopener noreferrer"&gt;https://github.com/Silica-Proxy/Silica-Proxy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Silica-Proxy/Package-Name-Guardian" rel="noopener noreferrer"&gt;https://github.com/Silica-Proxy/Package-Name-Guardian&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Silica-Proxy/Package-Behavior-Guardian" rel="noopener noreferrer"&gt;https://github.com/Silica-Proxy/Package-Behavior-Guardian&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

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