Scrivio Interview library
ConceptFoundations6 min read · updated 12 November 2026

What do dependency vulnerability scanners such as OWASP Dependency-Check, Dependabot, Snyk, Trivy or OSV-Scanner do, and what are their main limitations?

These scanners find the third-party components in our project or image, by coordinates or by file hashes, and match them against vulnerability databases such as the NVD, the GitHub Advisory Database and OSV, reporting CVE identifiers with severity scores such as CVSS. Their main limitations are false positives from loose name and version matching, false negatives for shaded or renamed jars, no knowledge of whether the vulnerable code is reachable from our application, and results that are only as fresh as the database, so they must run regularly and not only at build time.

Why this question is asked

Almost every Java team now has a scanner in its pipeline, and almost every team has argued about its findings. Interviewers ask this concept question because using the tools well depends on knowing how they decide that something is vulnerable, and therefore when they are wrong. In this answer, we will recap the vocabulary (CVE, CVSS and the databases), see how scanners identify components and match them, compare the common tools, and then go through the limitations one by one with an example of each.

1A Quick Recap: CVEs, CVSS and Vulnerability Databases

A CVE (Common Vulnerabilities and Exposures) identifier, such as CVE-2021-44228, is a unique name for one publicly known vulnerability. CVSS (the Common Vulnerability Scoring System) gives it a severity score from 0 to 10, computed from factors like whether it can be exploited over the network and whether it needs authentication; 9.0 and above is labelled critical.

Vulnerability databases connect CVEs to affected software. The NVD (National Vulnerability Database) describes affected products with CPE names, a generic naming scheme for vendors and products. The GitHub Advisory Database and OSV (Open Source Vulnerabilities) describe them with package ecosystem coordinates, such as Maven groupId:artifactId and version ranges, which fit Java dependencies much better.

2How a Scanner Decides Something Is Vulnerable

Every scanner does two steps. First it builds an inventory of components. It can read build files (pom.xml, Gradle lockfiles or the resolved dependency graph), open jars and read the pom.properties or MANIFEST.MF files embedded in them, or compute a jar's SHA-1 and look it up in Maven Central's index. Second, it matches each component against a database and reports every advisory whose affected range includes that version.

Step throughFrom project to finding
  1. Find componentsbuild files, jars in the image, embedded pom.properties
  2. Identify each oneMaven coordinates, CPE guess or file hash
  3. Match against advisoriesNVD, GitHub Advisories, OSV, vendor databases
  4. Report CVE, CVSS and fixed versionthe scanner knows nothing about our code paths

4 steps in order. Play them, or step through them one at a time.

Each step is a place where a scanner can be wrong.

Notice the last step. The scanner knows that a vulnerable version is present. It does not know whether we call the vulnerable method, whether the feature is configured, or whether the input can reach it.

3How the Common Tools Differ

The tools share the same idea but differ in where they look and which database they use. These differences explain many of the arguments teams have about findings.

Common dependency scanners
ToolLooks atMain data source
OWASP Dependency-CheckJars and build output; Maven and Gradle pluginsNVD via CPE matching, plus others
DependabotManifests in a GitHub repositoryGitHub Advisory Database
SnykManifests, resolved graph, imagesSnyk's own curated database
TrivyContainer images, file systems, jars insideSeveral sources incl. GitHub Advisories
OSV-ScannerLockfiles, manifests, SBOMsOSV.dev
Check each tool's documentation for its current sources; they change over time.

Dependabot and Snyk also open pull requests that upgrade a vulnerable dependency, which makes them remediation tools as well as scanners. Trivy and Grype are strongest on container images, because they see jars that were never in a build file.

4Limitation 1: False Positives From Loose Matching

Dependency-Check has to guess a CPE for each jar from its file name, manifest and package names. A guess can attach a vulnerability in one product to an unrelated library with a similar name, or to a different module of the same project. A common example is a CVE for a server product being reported against a small client library that shares the vendor's name. Version parsing causes the rest: a version like 2.0.0.RELEASE or a vendor-patched 1.2.3-redhat-00001 may be read wrongly.

Tools that match on Maven coordinates against GitHub Advisories or OSV make far fewer of these errors, but they still report advisories that apply only to one module or one configuration. So every finding needs a quick check: is this really the affected artifact and version?

5Limitation 2: False Negatives From Shaded or Renamed Jars

A shaded jar contains another library's classes copied in, often under relocated package names. Its file name and metadata describe the outer library, so a scanner that identifies components by coordinates sees nothing vulnerable inside. The same happens with jars renamed by hand, jars stripped of their pom.properties, and code copied into a repository as source.

Hash-based identification helps only for unmodified jars, because relocation changes the bytes. That is why a clean scan does not prove absence, and why SBOMs generated during the build, when the build tool still knows the real components, are more complete than scans of the finished jar.

6Limitations 3 and 4: Reachability and Freshness

A finding means a vulnerable version is present, not that our application is exploitable. A CVE in a library's XML parsing feature does not matter if we only use its JSON features, and a deserialization flaw does not matter if we never deserialize untrusted input. Some commercial tools try to compute reachability from the call graph, which reduces noise, but most findings still need a human judgement, recorded so the next person does not repeat it.

Finally, results depend on the database on the day of the scan. A jar that was clean when we built it in March can be vulnerable in June, because the advisory was published in between and nothing about our code changed. So scanning only at build time leaves deployed services unchecked. We rescan the artifacts and images that are running, daily or whenever the database updates, or keep SBOMs in a system such as Dependency-Track that re-evaluates them automatically against new advisories.

7Follow-up questions

Which scanner would you choose for a Java team?

It depends on where the risk is. For repositories on GitHub, Dependabot is free and opens upgrade pull requests. For container images, Trivy or Grype see the whole image, including jars that never appear in a build file. Many teams combine a coordinates-based scanner in CI with an image scanner in the registry and an SBOM platform for continuous monitoring. I would avoid running three tools that report the same thing differently without a plan for triaging them.

Is a high CVSS score enough to decide priority?

No. CVSS describes the vulnerability in general, not in our environment. A 9.8 in a feature we never use may matter less than a 7.5 in code that handles every request from the internet. Data such as EPSS, the probability of exploitation, and lists of known exploited vulnerabilities help, together with our own judgement about reachability and exposure.

Why do two scanners report different results for the same project?

They identify components differently and use different databases, which may disagree on affected version ranges or on whether an advisory exists at all. One may see jars inside the image that the other, reading only manifests, does not. Differences are normal; what matters is a consistent policy for which tool is the source of truth for each decision.

8Conclusion

In this answer, we saw that scanners build an inventory of components, by coordinates or hashes, and match it against databases such as the NVD, GitHub Advisories and OSV, reporting CVEs with CVSS scores. They produce false positives when matching is loose, miss shaded or renamed jars, cannot tell whether vulnerable code is reachable, and are only as current as their database, which is why we scan deployed artifacts continuously rather than once at build time.

What to say in the interviewAbout 80 seconds aloud

Open with

These tools all do two things. They find the third-party components in a project or image, from build files, from metadata inside jars, or from file hashes, and then they match them against vulnerability databases: the NVD, the GitHub Advisory Database, OSV or a vendor's own database.

Then, if they want more

They report each match as a CVE with a severity score, usually CVSS. The tools differ in where they look: Dependabot reads manifests in GitHub, OWASP Dependency-Check works on jars with NVD CPE matching, and Trivy scans container images, including nested jars. The limitations are what I keep in mind when reading findings.

Loose matching, especially CPE guessing, gives false positives, where a CVE for one product is attached to an unrelated library. Shaded, relocated or renamed jars give false negatives, because the scanner never identifies the copied classes. A finding means a vulnerable version is present, not that the vulnerable code is reachable from my application, so it needs triage.

And results are only as fresh as the database, so a jar that was clean at build time can become vulnerable later; I would rescan deployed artifacts regularly or monitor SBOMs continuously.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "What do dependency vulnerability scanners such as OWASP Dependency-Check, Dependabot...": https://scrivio-interview-library.netlify.app/java/dependency-and-supply-chain/5b0c41bc6c/