Ayyoub Amjahed

My dependency scanner said "No issues found" and had scanned nothing

It located sixteen packages and discarded all sixteen, silently and with a clean report. Given the resolved tree, ten vulnerabilities appeared, one of them an authentication bypass.

4 min read Project: Lineward securitydependenciesLineward

The day I added dependency scanning to Lineward, the first run over the repository finished like this:

No issues found

It would have been very easy to take that at face value, tick the box and move on. It is a young backend with few classes of its own, and “no issues” was exactly the result I expected. It had scanned nothing.

The line that gave it away

It was right above the verdict, and it is the one I nearly skipped:

Scanned backend/pom.xml file and found 10 packages
Filtered 10 local/unscannable package/s from the scan

It found ten and discarded ten. Sixteen packages detected across the four project files in total, and sixteen discarded. The clean report was over an empty set.

Why it discarded them

Almost no dependency in this project declares its version. They are pinned by the Spring Boot BOM, which is exactly the policy the project defends in writing: versions are declared in one place, not twenty.

To resolve those versions the scanner has to build the effective project model, and for that it needs the reactor parent, which is a local SNAPSHOT published to no repository. With no version there is nothing to look up in a vulnerability database, so it discards the package. And it discards it silently, with the same success message it would use if everything were clean.

The fix was to have Maven resolve the tree before scanning, and hand it the aggregated inventory of the whole reactor instead of the project files:

bash
./mvnw -q dependency:tree -DoutputType=text -DoutputFile=tree.txt

From 0 scannable packages to 63 with a real version, transitive ones included.

What was underneath

Ten vulnerabilities. Seven in the library that parses every request body in the project, and three in the embedded server, among them an authentication bypass by capture and replay. Both went up a patch version within their line, as a documented exception to the version policy, and the suite stayed green, which had to be checked because that same library had already broken this project twice.

And it happened twice the same day

Hours later we switched on GitHub’s automatic dependency alerts, and before calling them installed we went to look at what they could actually see. The dependency graph had twenty-five packages, fifteen of them with no version, and neither the parsing library nor the embedded server was in it.

In other words: the freshly enabled alerts would not have warned about a single one of that morning’s ten findings, for exactly the same reason. To build the graph, GitHub reads the project files. Two different tools, from two different vendors, with the same blind spot, both reporting normality.

What it saidWhat it had looked at
Scanner, first runNo issues found0 of 16 packages
Scanner, with the resolved tree10 vulnerabilities63 packages
Automatic alertsNo alerts10 of 25 packages

Neither of them is defective. It is that declaring versions in one central place, which is good practice, leaves a naive reader with nothing to read. A correct engineering decision can silently disable a security tool, with no error and a clean report.

The rule

You do not read a scanner’s conclusion, you read how many things it says it checked. A coverage control with no coverage number is not a control, it is an ornament that produces calm.

And it generalises beyond Maven. The same hole shows up anywhere versions live in a layer the tool cannot resolve: a shared version catalogue, a monorepo with workspaces, unpinned base images, a project with no lock file. The check is always the same and it costs a minute: look at the number of artifacts inspected and compare it with the number you know you have.

The second lesson, which I did not expect

I had deferred these controls to the last phase of the project, on an argument that felt solid: a backend of two classes produces no findings, so scanning it now is ceremony.

The argument was elegant and it was false. What was false was confusing “my code is small” with “my surface is small”. Those two classes drag in 63 dependencies nobody on this side wrote and nobody on this side audited. Your own code scales with what you write; your dependency surface does not.

And the most uncomfortable finding, the authentication bypass in the embedded server, appeared at the moment of least code in the project. Which is exactly when the argument for deferring looked strongest.