AI-Driven Dependency Analysis: Beyond CVE Databases

Hayden Smith 8 min read

A CVE record appears only after someone has found a vulnerability, reported it, and gotten it catalogued. That process takes time. Across that stretch, an attacker who knows about the flaw, or planted it, can work unopposed against organizations whose pipelines depend on CVE matching alone. Depending on the attack, the stretch runs weeks or months, and for some classes no CVE is filed at all.

Dependency scanning as traditionally built is a known-threat lookup. It performs that job well. The ceiling comes from the design: a CVE database tells you what somebody already found and decided to write down. It has nothing to say about what went into a package over the weekend with no release notes and no entry in any database.

What a CVE database really gives you

The big databases, NVD, OSV, the GitHub Advisory Database and the rest, earn their place. They gather disclosures from maintainers, researchers, and vendors. Query one against your lockfile and the answer is reliable: this version carries a publicly reported flaw someone can exploit.

That covers a large share of real exposure. Stale packages with privilege escalation bugs, crypto libraries weakened in particular version ranges, parsers with known deserialization holes. Compliance programs often make tracking and clearing these findings mandatory, and no credible security team drops CVE scanning.

The catch is that CVE coverage faces backward. The database describes what researchers already found. Injection-style attacks against the registry layer usually plant code with no CVE attached. The package may be days old, the vector may be new, or the payload may be written to sidestep exactly the patterns a researcher would need before filing a report.

The gap that no CVE list closes

Picture a SaaS infrastructure team that leans on one build utility for local setup and CI config generation. One developer maintains it, versions arrive regularly with small conveniences, and hundreds of teams install it. No CVE has ever been published. Then the maintainer's registry account gets taken over and a patch release goes out late on a Friday. Initialization code now contains a credential harvester.

No CVE is filed. The bad version stays live for eleven days until someone notices unusual outbound traffic from a CI runner. Every team that installed dependencies inside that window ran the harvester. A CVE-based scan would not have caught it, since the finding exists in no database. It never will, because what changed was behavior, not a flaw in the package's declared function.

Post-publish tampering and account-takeover injection have grown more common as registries scale and maintainer accounts turn into worthwhile targets. event-stream in 2018 is an early documented instance of the pattern; the technique has been sharpened a great deal since.

Reading behavior instead of matching lists

A behavioral approach watches what a package does instead of comparing it to a list of prior findings. The signals of interest sit at install time: code in the published tarball that departs from the repository source, and network activity the package declares or implies in its code.

Our engine looks at several dimensions when it analyzes a package. Do lifecycle hooks (postinstall, preinstall) appear that make no sense for the stated purpose? Does the installed code diverge from the linked source repository? Does the package open network connections where its documentation promises none? Has the release rhythm broken from the maintainer's established cadence, especially patch releases?

Alone, none of that settles anything. A legitimate package may run a postinstall script to write configuration files. What matters is whether the signals, taken together, cross a line where inspection beats installing into a production pipeline. Drawing that line is the work behavioral scoring does.

Provenance checks as the second leg

Provenance verification asks a different question: is the artifact you are installing actually derived from source you can read? SLSA levels and sigstore attestations are the most mature standards here. A SLSA Level 3 attestation states that a specific CI pipeline built the artifact from a specific commit in a specific repository, with a signed, checkable provenance trail.

Provenance says nothing about whether the source itself is malicious. It says whether the published artifact corresponds to the declared source, and that shuts the post-publish tampering route. If an attacker rewrites the tarball after publication, the checksum in the attestation no longer matches and verification fails.

HuntedIabs checks package checksums against registry manifests as a baseline. A mismatch counts as critical no matter the CVE status, because tampering after publication is exactly the category no CVE database will ever list.

Where novel attacks slip through

Behavior and provenance together close most of the gap, though they bring problems of their own. Behavioral scoring produces false positives, and attestations are far from universal; most packages across most registries carry no SLSA record. Detection built on these signals needs calibration, and that calibration never really finishes.

For anyone building security tooling, the conclusion favors layers over substitution. CVE scanning stays first because it is precise on known findings. Behavioral analysis and provenance verification reach into territory CVE databases cannot see. Neither substitutes for the other.

Precision costs something

None of this makes CVE scanning obsolete. A known CVE in a production dependency is a critical finding and has to be fixed. The point is narrower: CVEs record flaws already discovered in existing code, while novel attacks live in the span before discovery, and sometimes stay undiscovered permanently.

An organization that runs only CVE matching has therefore accepted a blind spot over the attack categories behind the worst supply-chain incidents of recent years. That can be a reasonable trade against operational limits, as long as it is a decision someone made on purpose rather than an assumption that CVE coverage means full coverage.

The teams we work with usually stack behavioral analysis on top of CVE scanning instead of picking one. That pairing catches the most incidents at a false-positive rate people can live with, although behavioral tuning takes iteration. It is not something you configure once and stop reviewing.

For how the layers fit inside active pipeline execution, the piece on CI/CD security scanning best practices covers structuring detection within the build workflow.

Back to Security Insights