Stop 13 · SecurityTopics · 12/12

Dependency Vulnerability Scanning

Part of the Backend Developer Roadmap

In short

Your app might have 30 direct packages and 800 hidden ones underneath. A hole in any of them is a hole in your app. Scanners check them for you.

Automatically checking your project's npm dependencies for known security vulnerabilities — a huge share of real-world breaches come through vulnerable third-party packages, not your own code.

The blob as a kirana shopkeeper inspects shelf packets with a big magnifying glass.

Think of it like this

The kirana shelf check

A good shopkeeper doesn't just stock packets; every week he checks dates and pulls out anything swollen or recalled. Your node_modules is that shelf. npm audit and Dependabot do the weekly check so a bad packet doesn't reach the customer.

Watch it happen

Catching a vulnerable package

Advisory DB
Scan
Update PR
CI tests
Merge

1/5A researcher reports a flaw in a popular package. It's published in public advisory databases with affected versions.

The big ideas

What you need to know

Transitive deps count

You installed express, but it pulled in dozens of packages. Scanners check the full tree in your lockfile.

Severity isn't everything

A critical bug in a dev-only tool may not matter in production. Read what the advisory affects before panicking.

Automate the boring part

Dependabot or Renovate open update PRs for you. Small, frequent upgrades are far easier than one giant yearly jump.

Commit the lockfile

package-lock.json pins exact versions, so what you scanned is what you ship. Use npm ci in CI.

See it in code

Walk through the code

bash
1# What's vulnerable right now?2npm audit3 4# Only fail on serious problems (handy in CI)5npm audit --audit-level=high6 7# Apply fixes that don't need a breaking major upgrade8npm audit fix9 10# Why is this package even installed?11npm explain minimist

1/4Lists every known vulnerability in your installed tree, with severity and the path that pulled it in.

Avoid npm audit fix --force without reading what it changes; it may jump major versions and break your app.

Save yourself the pain

Common mistakes

Oops

Ignoring Dependabot PRs until there are 60 of them.

Do this instead

Merge small updates weekly. Group minor updates so the queue stays short.

Oops

Installing a package because it has a cool name, without checking it.

Do this instead

Look at downloads, last publish date and maintainers. Typo-squatted fake packages are real.

Your mission

Clean up one project's dependencies

~30 min

Quick check

npm audit flags a critical issue in a package you never installed directly. What's the best first step?

Go deeper

  1. 1Run `npm audit` on a real project and review the reported vulnerabilities.
  2. 2Set up automated dependency scanning (Dependabot, Snyk) in your CI pipeline.
  3. 3Learn to evaluate whether a flagged vulnerability actually affects how you use that package.

More topics at this stop

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.

Download
InsideEdge