I tested osv-scanner against my own dependency scanner

I maintain a small dependency scanner called deps. It runs on my Mac and reads the packages my repos pin. Each version gets checked against the Open Source Vulnerabilities (OSV) database at osv.dev, and the result shows up on a local page at deps.this. That is about 6,900 lines of Go, and I am the one who has to keep them working.

Google ships osv-scanner for the same database. It has a team behind it, a release about once a month, and a feature list much longer than mine. So I had to ask whether my tool still earns its place. I spent a morning finding out.

The setup

I installed nothing. go run fetches and builds a pinned version:

go run github.com/google/osv-scanner/v2/cmd/osv-scanner@v2.7.1 \
  scan source -r --format json --output-file out.json <dirs>

v2.7.1 was the newest tag, published on 2026-11-09. Exit code 1 means it found something. I gave it 26 repo directories by name. deps scanned the 11 repos in its registry, plus the install trees of 6 command-line tools that mise put on the machine.

Pass the directories one by one. The help text says --x-exclude takes “just dirname for exact match”. In a scratch test, --x-exclude skipme still scanned the directory named skipme, while --x-exclude 'g:**/skipme' skipped it.

run wall time
first go run, download and compile 45.8 s
osv-scanner, 26 repos, Go call analysis on (the default) 14 to 16 s
osv-scanner, 26 repos, --no-call-analysis=go 10 to 20 s
deps check, 11 repos and 6 tools 32 to 36 s

This isn’t like for like. deps runs go list in every module and asks three package registries about each version. The spread in the osv-scanner rows is the network. Both are fast enough for a job that runs once a day.

What each one saw

deps osv-scanner
packages checked 623 461
Go modules in thismoon 275 108
npm packages in two lockfiles 49 and 39 49 and 39
one requirements.txt 2 44
Swift Package.resolved files 6 3
GitHub Actions refs 39 in 5 repos none
tools installed by mise 6 none
repos with a yarn.lock or pubspec.lock none 2

The Go row is the big one. deps reads the full module graph from go list -m all. osv-scanner reads the lines in go.mod. Most of what follows comes from that difference.

Why the findings barely overlap

In the 11 repos both tools scanned, they flagged 25 packages between them.

flagged by packages
both 1
deps only 18
osv-scanner only 6

The shared one is github.com/klauspost/compress@1.18.7, advisory GO-2026-6865. It is a line in thismoon’s go.mod, so both tools see it. deps marks it “not imported”. osv-scanner reports "called": false. go mod why -m shows why: only a test inside a dependency needs it. The two tools get to the same answer by different routes. deps asks whether any package of the module is compiled in. osv-scanner runs govulncheck and asks whether the vulnerable function is called, which is the finer question.

The 18 that only deps found are all in the module graph and not in a go.mod. None is compiled in. One of my command-line tools carries a golang.org/x/crypto from 2021 with 46 advisories on it:

$ go mod why -m golang.org/x/crypto
# golang.org/x/crypto
(main module does not need module golang.org/x/crypto)

It is in the graph because some other module’s go.mod names it. deps puts these under “Not compiled in”, dims them and never sends a notification. osv-scanner leaves them out. If the question is what to fix, leaving them out is the better answer. I like seeing what the graph could pull in, but I can’t count 18 dimmed rows as 18 catches.

The 6 that only osv-scanner found come from one requirements.txt. It has two exact pins and one unpinned package. deps reads the two pins and stops. osv-scanner resolves the file into 44 packages and flags six of them. As far as I can tell it asks deps.dev for the versions; its docs describe that lookup only for Maven. The resolved versions include setuptools 9.1.0, uploaded to PyPI in December 2014. I doubt a fresh install picks that. I can’t prove it, because there is no lockfile, so neither tool knows what pip would install. osv-scanner made a guess; deps didn’t look. The fix is on my side: write a lockfile.

Three things sit outside that table.

What each tool is for

osv-scanner answers a question you ask: is this tree vulnerable right now? It does a lot that deps can’t.

deps answers a question I forget to ask: did something I already pinned or installed go bad since yesterday?

Only the Go, npm, Python and Swift parsing overlaps, and that is the part of deps I maintain least.

The decision

I’m keeping deps, with three changes.

  1. The unregistered repos go into the registry. That closes the gap that mattered.
  2. The requirements.txt gets a lockfile.
  3. I’ll look at running govulncheck per module, so “not imported” can become “not called”.

I also asked what it would take to put osv-scanner under deps as the engine. A rough count, which I haven’t checked line by line: about 1,500 of the 6,900 lines would go, about 700 would be rewritten, and the rest would stay. The module graph view would be lost. That saves less than a quarter of the code, and I would then follow someone else’s JSON schema.

What this doesn’t prove

I write and maintain deps alone, and I make mistakes. This test found one. Four repos were never registered, so deps had never looked at them. It reported nothing for them, and that silence looked the same as a clean result.

More coverage isn’t proof of safety. A scanner can tell you what it found. It can’t tell you that nothing is there. A parser can skip a file. An advisory can be missing from the database, or arrive late. A check can say “not imported” and be wrong.

So a quiet deps page doesn’t mean there is nothing to patch. For the Go code in thismoon, govulncheck and Dependabot still decide what gets fixed, and deps sits beside them. A second tool, run now and then, is how I caught the gap this time. If you run something like deps, keep the other layers too.

What would change my mind

These would:

The morning was worth it for the registry gap alone. osv-scanner is the better scanner, and I’ll keep running it by hand now and then as a second opinion. What I need every day is the watching, and that part is deps. The code is in thismoon.