Bookmarks

SCA — software composition analysis

A method of automatically checking the third-party components of a program — libraries and their dependencies — for known vulnerabilities and incompatible licences.

Also: dependency analysis, dependency scanning, third-party component analysis

checked 9 Nov

All terms

A modern application is largely assembled from other people’s code: libraries, frameworks, container images. SCA enumerates this code and checks versions against vulnerability databases, so problems are found before a release ships rather than after an incident.

What it checks

CheckWhat it finds
Vulnerabilitiesknown vulnerabilities with CVE numbers in specific library versions, along with their CVSS severity rating
Licencesincompatible or risky licences: copyleft that forbids closed distribution, for example
Versionsoutdated versions with fixes available

How it works

An SCA tool reads the project’s manifests and lock files — package-lock.json, poetry.lock, go.sum — and builds the full dependency tree, including transitive dependencies: those pulled in not directly, but through other libraries. The resulting list is checked against vulnerability and licence databases, after which the tool produces a report: which component, which vulnerability, how severe it is and in which version it has been fixed.

bashStart of a pip-audit report for a Python project: package, version, vulnerability ID and the version containing the fix
$ pip-audit -r requirements.txtName     Version ID              Fix Versions-------- ------- --------------- ------------requests 2.28.1  PYSEC-2023-74   2.31.0

Limitations

  • The report is not always accurate: the vulnerable code may never be used by the project, and some findings are false positives.
  • Upgrading on the tool’s recommendation is not always safe: minor library updates can occasionally break compatibility.
  • Vulnerability databases lag behind: a fresh vulnerability does not appear in the report straight away.

Where it is used

SCA runs in a CI/CD pipeline on every build or overnight, and any critical findings block the release. Alongside software composition analysis, an SBOM is often maintained — a machine-readable inventory of components that is then checked against catalogues of actively exploited vulnerabilities.

Sources

the term is written from these pages

Verified 9 Nov

Not to be confused with

what it is mixed up with and how it differs

In depth in the references

where the topic is covered in detail