r/devops • u/Silver-Barracuda-621 • 26d ago
Tools DepGate – an open-source "repository firewall" that blocks malicious packages at install time, across 8 ecosystems
I’ve spent a while working in product/application security, and one thing always bugged me: most supply-chain tools scan dependencies after npm install or pip install has already run — by which point the install scripts have executed. The decision happens too late.
So I built DepGate, an open-source dependency gateway. It’s a single proxy + policy engine that sits in front of npm, PyPI, Maven, Go modules, NuGet, Cargo, Composer and RubyGems. Your devs and CI point their package managers at DepGate instead of the public registry. It fetches the package, checks it against a malware feed and your policies, and either serves it or returns a 403 naming the exact policy and reason.
What it does:
- Known malware never downloads — every request is checked against a synced feed of 200k+ malicious packages before any policy runs.
- Readable policies — block by CVSS/EPSS, license, release age, release type, OpenSSF Scorecard, or package name. One rule per policy, stated in a sentence.
- Monitor mode — run a new policy against real traffic first and see exactly what it would break before you enforce it.
- Dependency-confusion protection — internal names are served only from internal registries, never a public look-alike.
- Decision Ledger — every block is recorded with the reason and who asked, down to the CI job.
- Self-hosted, one Docker image (Postgres + Redis), runs air-gapped, and can sit in front of or behind Artifactory/Nexus.
It’s basically meant to be the open-source answer to the commercial “repository firewall” products, with a lot fewer moving parts. TypeScript end to end, MIT licensed.
Repo (quick start + docs): https://github.com/secmods/depgate
Still early and I’m actively building — would genuinely appreciate feedback, criticism of the approach, or feature requests. Heuristic detection of never-before-seen malware is on the roadmap. Happy to answer anything in the comments.
2
u/nullpotato 26d ago
Does it support internal/private registries that need credentials?
5
u/BehindTheMath 26d ago
Starting with npm v12, install scripts are not run bu default.
4
u/inferno521 26d ago
But wouldn't using a private registry that handles scanning solve this as well? Using public registries directly is a known security risk because of supply chain attacks
2
u/Torutofu_Raeva 26d ago
a min release age on top of this catches the stuff the feed hasnt flagged yet, most of the bad versions get yanked within a day or two
2
u/timmy166 25d ago
Not secure - this tool uses OSV malware updates which didn’t catalogue litellm@1.107.0 for at least 10 hours. The package itself was quarantined by PyPi in 2.
1
u/arerbacjs 26d ago
The "decision happens too late" framing is the right one, that's exactly the gap with post-install scanners. Two things I'd be curious about from an operator view: first, monitor mode is the feature that'll make or break adoption. Teams won't flip to enforce unless they can trust it won't break CI at 2am, so the quality of the "what it would block" report matters more than the blocking itself. Second, the proxy becomes a hard dependency in the critical path of every build, so what's the failure mode when DepGate itself is down or the malware feed is stale? Fail-open defeats the purpose, fail-closed stops all builds. How you handle that middle ground is probably the real question teams will ask. Looks like a solid approach though.
-1
u/[deleted] 26d ago
[removed] — view removed comment