In November 2025, Shai-Hulud 2.0 was spreading through npm packages and stealing credentials from the machines that installed them. At PolicyMe, we were forced to pause all npm installs while we investigated the known indicators of compromise (IOCs). Due to the distributed nature of engineering, this process was slow and brutal. The best LLM models at the time helped, but only on one system at a time. Going forward, we knew that we needed a way to answer a simple question across our environment: which packages had we pulled, and how quickly could we stop pulling one if we needed to?
The cable package problem

We needed a controlled path between our developers, build systems and public package registries. A place to set access rules, audit what came through, and cut off a package or version during an incident.
Our first instinct was to look at commercial and open self-hosting options. The existing self-hosted space wasn't holistic and would require a lot of engineering effort to deploy and own. Commercial options didn't fit our requirements and were expensive! One quote we received was in the ballpark of $70,000 USD a year.
The commercial solutions are loaded with plenty of features, many of which had little to do with the problem we were trying to solve. It reminded us of buying cable TV back in the day: you wanted one show and somehow ended up paying for fifteen channels.
If you had asked us three years ago, we would have argued that buying was the right solution. "Focus on our business model, and buy the rest." In today's LLM-driven world, that price made building worth a closer look.
Why a package pull deserves scrutiny

Shai-Hulud 2.0 showed how quickly a trusted package can turn into a way to steal secrets and propagate. Since then, Trivy, LiteLLM and Axios have all appeared in supply chain incident reports. These are names people use in real builds. A developer can run an ordinary install command and bring someone else's code into a laptop, CI runner, or production artifacts. One right command at the wrong time could kill trust in a company like PolicyMe overnight!
The registry gives us a point of control in that path. Package requests go through it before reaching the public ecosystem. It can serve a cached package or fetch one from upstream, apply a package and version policy, and record the request for later investigation. We can publish internal packages through it too, reducing dependencies and vendor costs further! The first goal was to make those actions visible, controllable, and auditable across our environment.
Visibility has already been useful. During the WEL1DROPPER npm campaign, we checked the registry's audit logs against the affected package patterns, and a single API call gave us an answer in a few seconds: zero matches. None of those packages had come through our registry.
How it works

The stack
Since PolicyMe would be owning this application long after the first commit, we decided to build it on the stacks familiar to our dev teams, even where they were new to us, like React with Vite for the admin UI. With agents doing most, if not all, of the typing, it made sense to pick the stack that reduces friction for the people maintaining it for years to come.
- API: Python 3.11 and FastAPI, with SQLAlchemy and Alembic for the database.
- Admin UI: React, Vite, TypeScript and Tailwind.
- Storage: S3 for packages, and PostgreSQL 16 on RDS for rules, audit logs, users and API keys.
- Auth: Okta single sign-on for people and scoped API keys for automation. nginx checks every request with the API first, and if the API is down, requests are refused.
- Infrastructure: ECS Fargate in a dedicated tooling network, managed with OpenTofu. We chose OpenTofu because of licensing concerns.
Most of our applications run on Elastic Beanstalk, and we'd been looking for something to migrate to that could offer more fine-grained control. We used this project as an opportunity to test ECS Fargate as that option, and it paid off. The switch from Elastic Beanstalk to ECS Fargate is now approved, and the migration of our existing applications is underway.
The architecture
Today the registry supports npm and PyPI, the two ecosystems our applications and tooling depend on, and we plan to extend it to other artifacts like containers down the road.
The artifact registry sits as a middleman between our developers and build systems on one side, and the public registries on the other. Every install request lands on the registry first, and the registry decides whether to approve or block it before anything is fetched or served.
Requests from a developer and a build pipeline go to the Artifact Registry, which records each one in an audit log. Allowed requests continue to npm or PyPI and come back. Blocked requests are sent straight back.
Right now it runs as a block list, so known-bad packages are stopped and everything else is allowed through, with rules that can cover an entire package or only specific versions. A blocked request gets an error back, and the registry logs it and can send an alert to Slack. If a bad package has already been cached, we can purge it, and it's added to the block list automatically so it can't come back. When an admin needs to make an exception, they can override a block with a written reason and an optional expiry date. Approving packages one at a time by hand doesn't scale, so we're aiming to ship an automated package approval system before we switch to an allow list, where only approved packages get through.
Enforcement
Of course, a registry only helps if everyone actually uses it.
Our MDM uses process tree blocking to stop direct calls to the common package manager clients, and developers go through our own CLI, jig, instead.
jig detects the environment it's running in and overrides the package manager's settings, so every install goes to our registry and stays off the public channels. Onboarding is a single jig init, jig doctor checks that your setup is healthy, and jig upgrade keeps the tool current. From there, you run your package manager through the registry with jigx, which is shorthand for jig run:
bash
# Blocked: direct calls to package managers
npm install
pip install -r requirements.txt
yarn add lodash
uv pip install requests
# Allowed: the same commands through jigx
jigx npm install
jigx pip install -r requirements.txt
jigx yarn add lodash
jigx uv pip install requestsForty-eight hours to prod

We built the initial application with OpenCode and Opus 4.0 while carrying on with our normal security work.
Vibe coding is a term that gets thrown around a lot with derogatory intent, so we prefer the term agentic engineering. We didn't one-shot a prompt with "Make no mistakes". Instead, we gave the agents requirements and architectural direction, reviewed what they produced, and worked through the security and operational consequences. The agents could write code quickly. We still had to decide what it should do and where it could fail.
We started out with off-the-shelf open source servers for the npm and PyPI backends, with our API sitting in front of them, but it became clear pretty quickly that they were only slowing us down. So we cut them out and had the agents build both registries directly into the API, where we could iterate on them freely.
The first commit went in, and the application was deployed to production within 48 hours. That was an impressive start. It also put us at the beginning of the work that would decide whether people could depend on it.
Over the following months, we connected build pipelines and developer workflows, and migrated package publishing and pulls. We addressed authentication edge cases, deployment pipelines, scaling and enforcement so that using the registry became part of the normal path for development.
The familiar 80/20 rule feels about right. The early build delivered a lot of visible functionality. The remaining work took over a quarter because every integration had another way to fail. This was where cloud architecture and infrastructure security experience earned their keep. You have to understand the failure modes of the system around the code: network boundaries, authentication, traffic spikes, CI behavior, enforcing usage and the consequences when a dependency source is unavailable. These things are what separate vibe coding from agentic engineering.
The registry has been in production since February 2026. It is now maintained alongside our other internal infrastructure, with our infrastructure and security teams working together on its ongoing operation and improvements.
Scale finds the gaps

The initial version did very little caching and handled database connections poorly, so when we ran a load test with 15,000 simultaneous pulls, the workers saturated. We moved to connection pools and added caching structures inside the app, right-sized the instances, and then added a scheduled scale-out from 3 tasks to 6, so the extra capacity is there during work hours and scheduled test runs. Today it handles about 650,000 package requests a day.
The biggest source of that load was our own internal test framework, which rebuilt the same environments from scratch on every scheduled run. A tool built for security ended up exposing a bottleneck in our CI/CD.
All those pulls also grew the audit table quickly, and searching it for known-bad packages got slower the bigger it got. We tuned it with indexes and put limits on the expensive queries, but once the table gets big enough, we'll need to partition it by date to keep things responsive.
So, is this the SaaSpocalypse?

Our estimated infrastructure spend for the registry is roughly $250 to $350 USD per month. That figure leaves out engineering time, maintenance and the responsibility we took on by owning it. The original commercial quotes and that monthly estimate cover different cost categories. Even with that caveat, the gap gave us room to build around the requirements we actually had.
AI changed the calculation too. It helped one engineer get a working service into production fast enough that building was a credible option. A quarter of integration work made the other half of the calculation clear: code generation speeds up implementation, while operating a secure service still takes people who understand the environment and will be there when something breaks.
We expect more teams to revisit purchases that once felt automatic, especially when a bundle is expensive and their actual requirements are narrow. Some will build. Plenty will buy because the service, support and operational burden are worth the price. We made this call for a specific security problem, with an architecture we could own and teams willing to maintain it.
The next time a supply chain advisory lands, we want to be able to check exposure and act quickly. That's what we built for. The 48-hour deployment got the project moving; the months after deployment made the registry useful to everyone else.
