Skip to content
BENIBIX Learn

Dependency Scanning

Development🔐 SecuritySecurity Testing

Also known as npm audit, Dependabot, Software Composition Analysis, SCA

A check of the packages you use. It looks for known holes.

Think of it like

Think of it like a list of foods that were called back. You check your cupboard against it.

Example

Emma runs npm audit on an old project. It flags lodash 4.17.20 as high severity and says npm audit fix will update it.

Why it matters

Most of an app's code comes from packages. Scanning is how you learn when one of them turns dangerous.

Definition

Dependency scanning checks your packages against lists of known holes. A tool reads your lock file and compares each package and version with CVE data. It then reports which ones are risky and which version fixes them. npm audit, pip-audit and GitHub's Dependabot all do this. Run it on every change. It catches new holes in code you did not write.

Example code

console
$ npm audit
lodash  <=4.17.23
Severity: high
fix available via `npm audit fix`
1 high severity vulnerability
The scan found one risky package and the command that fixes it.

Common mistake

Running the scan once and never again. New holes are found every day in packages that were fine last week.

Key takeaways

  1. 1
    Checks your packages. Against known holes.
  2. 2
    Names the fix. Which version is safe.
  3. 3
    Run it every change. New holes appear daily.