Calendar Icon White
December 5, 2026
Clock Icon
9
 min read

Software Composition Analysis (SCA): The Complete Guide

Software composition analysis explained: how SCA reads lockfiles, matches OSV, KEV and EPSS data, ranks real risk and fixes transitive dependencies.

Software Composition Analysis (SCA): The Complete Guide
ChatGPT
Perplexity
Grok
Google AI
Claude
Summarize and analyze this article with:

TL;DR

Software composition analysis (SCA) finds every open-source package your application uses, including the ones your dependencies pull in, and checks each against vulnerability, malware and license data. Good SCA then ranks findings by real-world risk and fixes them with the smallest safe upgrade, which is what turns a list of 300 CVEs into the three you should fix today.

This guide explains how software composition analysis works under the hood: lockfiles, advisory databases such as OSV and CISA KEV, exploit prediction with EPSS, reachability and transitive fixes, with commands for each step. It is written by Strac, a Y Combinator-backed data security company trusted by enterprises, whose platform runs dependency scanning beside secret scanning, cloud checks and compliance automation.

✨ What software composition analysis is, and why it matters

A modern application is mostly other people's code. Black Duck's 2025 audit of commercial codebases found open source in 97% of them, with vulnerable open source in 86%. Software composition analysis is how you keep track of that code and its risks. A useful SCA finding answers four questions at once: which package, how it got into your app, how dangerous it is, and what single change fixes it.

Strac dependency finding: vulnerable-package 2.4.1 pulled in through build-tool, marked critical and actively exploited, with an Open fix PR button
The chain matters: this package is not in your manifest at all.

SCA covers four kinds of risk: known vulnerabilities in legitimate packages, malicious packages such as typosquats and hijacked releases, license risk such as GPL or AGPL code in a proprietary product, and end-of-life software that no longer gets security fixes.

SCA vs. SAST vs. DAST

Software composition analysis is one of three common kinds of application security testing. They overlap less than their names suggest:

SCASASTDAST
What it examinesThird-party packages you importSource code your team writesThe running application from outside
Typical findingsVulnerable, malicious or unlicensed packagesInjection flaws, unsafe functions, hardcoded secretsExposed endpoints, auth and input handling bugs
NeedsLockfiles and manifestsSource codeA deployed app or staging environment
SpeedSeconds to minutesMinutesMinutes to hours
FixUpgrade or override a versionChange your codeChange code or configuration

For a growing company, SCA usually delivers the most risk reduction per hour, because most of your code is open source and most of the fixes are version bumps. An external test of the running app, such as a pen test, covers what neither scanner sees; see our comparison of penetration testing and vulnerability scanning.

Step 1: building the inventory from lockfiles

Everything starts with an accurate list of what you ship. Manifests describe intent, and lockfiles describe reality:

FileWhat it tells youGood enough for SCA?
package.json, pyproject.toml, pom.xmlDirect dependencies and allowed version rangesNo: misses transitive packages and exact versions
package-lock.json, pnpm-lock.yaml, yarn.lockEvery npm package and exact version, with integrity hashesYes
poetry.lock, uv.lock, Pipfile.lockEvery Python package and exact versionYes
go.sumExact module versions and checksumsYes
Gradle lockfiles, Maven dependency treeResolved Java dependenciesYes, when generated

Monorepos multiply this: one repository can hold dozens of lockfiles in different ecosystems. A complete inventory reads every one of them in every repo, and keeps the parent chain for each package so a finding can say exactly how a package arrived.

✨ Direct and transitive dependencies

Most of your packages are transitive: you never chose them, a dependency did. That is also where most findings land, which is why an SCA tool that reads only manifests misses most of the risk.

Direct dependencies listed in your manifest versus transitive dependencies pulled in by them

You can trace any chain with the package manager itself:

# npm: show every path that pulls in a package
npm ls vulnerable-package --all

# pnpm: why is this here?
pnpm why vulnerable-package

# Python (uv): print the resolved tree
uv tree --invert --package vulnerable-package

# Go: show which module requires it
go mod why -m example.com/vulnerable-module

Step 2: matching against advisory databases

The inventory is then matched against public and commercial advisory sources. The core public ones are the OSV database, which aggregates advisories across ecosystems in one schema, GitHub's advisory database, NIST's National Vulnerability Database, and malicious-package reports published into OSV and by registry security teams. The match has to keep running after the scan: a package that was clean on Monday can be reported on Tuesday. Strac matches every new advisory against your stored package inventory without rescanning, so the "are we affected?" question takes seconds.

Want every new advisory checked against every repo, automatically?

Book a demo of Strac's dependency scanning  ·  Run a free security scan

✨ Step 3: ranking by real risk, not just CVSS

A raw scan of a mature codebase can return hundreds of findings. Ranking decides which ones matter this week. Three public signals do most of the work:

Three signals for ranking a vulnerability: CVSS for severity, EPSS for likelihood, CISA KEV for confirmed exploitation

CVSS measures impact. FIRST's EPSS estimates the probability a vulnerability will be exploited in the next 30 days. CISA's Known Exploited Vulnerabilities catalog lists vulnerabilities with confirmed exploitation. Context adjusts the result: a dev-only package that never ships to production deserves less urgency than the same flaw in a public API. Strac ranks findings this way, with actively exploited issues first and dev-only packages lower.

Reachability is a further refinement: checking whether your code ever calls the vulnerable function. It can cut noise sharply, but treat it as a way to lower priority, not to hide findings, because call graphs miss dynamic and reflective code paths.

Step 4: fixing transitive dependencies

Fixing a direct dependency is a version bump. Fixing a transitive one takes judgment: the cleanest fix is upgrading the parent to a version that pulls in the patched package. When no such version exists yet, force the patched version with an override:

// package.json (npm 8.3+): force a patched transitive version
{
  "overrides": {
    "vulnerable-package": "2.4.3"
  }
}

# pnpm: same idea in package.json -> "pnpm": { "overrides": { ... } }
# Yarn:  "resolutions": { "vulnerable-package": "2.4.3" }
# pip:   pin it in a constraints file and install with -c constraints.txt

Overrides are a bridge, not a destination: note why each exists and remove it once the parent catches up. Strac's fix pull requests choose the smallest safe upgrade and handle both cases, upgrading the parent or adding an override, so engineers review a diff instead of researching version trees.

Malicious packages: what vulnerability databases miss

A vulnerability is a mistake in a legitimate package. A malicious package is hostile on purpose: a typosquat one letter away from a popular name, a hijacked release of a real library, or a package an AI coding agent invented and an attacker registered. None of these has a CVE when it first appears, so a scanner that only matches CVEs will miss them. SCA in 2026 needs a malware feed as well, matched continuously, because a package can be reported days after you installed it. Strac checks every package against vulnerability and malware databases and flags look-alike names, and the 2025 npm worm that CISA warned about is a good reminder of why.

Choosing an open source vulnerability scanner

An open source vulnerability scanner is the engine of SCA, and the free ones are good. Google's OSV-Scanner reads lockfiles across most ecosystems, and package managers ship their own audits:

osv-scanner scan source -r ./        # every lockfile in the repo, against osv.dev
npm audit --omit=dev                 # npm, production dependencies only
pip-audit -r requirements.txt        # Python, via the PyPA advisory database
govulncheck ./...                    # Go, with call-level reachability

Free scanners stop at the finding. They do not track fix deadlines, detect most malicious packages before an advisory exists, open fix pull requests across every repo, or keep evidence for an auditor. Our roundup of the best SCA tools compares where each option fits.

✨ Dependency scanning across the development lifecycle

Dependency scanning works best at four points, each catching what the one before missed:

Where dependency scanning runs: in the editor, on the pull request, continuously, and at release

The pull request check is the one most teams skip and most regret. Blocking a new critical or malicious package before merge is far cheaper than finding it in production. The continuous check is the one that catches supply chain attacks, because a hijacked release is usually reported days after you installed it, as our software supply chain security guide shows.

Common software composition analysis mistakes

Most SCA programs that fail do so for the same handful of reasons:

  • Scanning manifests, not lockfiles. You miss transitive packages and exact versions, which is where most findings are.
  • Prioritizing by CVSS alone. A 9.8 in a test helper outranks a KEV-listed 7.5 in your public API. Use exploitation and exposure first.
  • Scanning only the main branch. The cheapest place to stop a bad package is the pull request that adds it.
  • Suppressing forever. Every ignored finding needs a reason and an expiry date, or the ignore list becomes the real backlog.
  • Auto-merging every update. Bots that merge brand-new versions instantly are exactly what a hijacked release relies on. Add a short cooling-off period.
  • No owner. Findings without an assigned team and a deadline do not get fixed.

How often should you scan? On every pull request for new packages, and continuously for new advisories against what is already deployed. A weekly scan feels thorough but leaves a seven-day gap in which a hijacked release or a newly exploited flaw can sit unnoticed, and attackers move faster than that.

✨ SCA, licenses and the SBOM

The same inventory that powers vulnerability matching also answers license and transparency questions. Strac flags packages under licenses such as GPL and AGPL, or with no license at all, and end-of-life runtimes and frameworks. It exports the inventory as a software bill of materials in CycloneDX or SPDX for customers' security questionnaires. Our SBOM guide explains both formats and how to generate one from lockfiles.

Strac free scan report: leaked secrets, vulnerable packages and malicious packages across five repos

License risk in software composition analysis

Open-source licenses range from permissive to strongly reciprocal. Most companies set a simple policy by category, then review exceptions:

CategoryExamplesTypical policy for a SaaS product
PermissiveMIT, Apache-2.0, BSDAllowed; keep attribution notices
Weak copyleftLGPL, MPL-2.0Allowed with care; changes to the library itself may need sharing
Strong copyleftGPL-2.0, GPL-3.0Review before use, especially in distributed software
Network copyleftAGPL-3.0Usually blocked: network use can trigger source-sharing duties
No licenseNothing declaredBlocked until clarified: no license means no permission

This is a summary, not legal advice; your counsel sets the policy. The SCA tool's job is to make every package's license visible so the policy can be enforced.

Software composition analysis and compliance

Auditors care about SCA because it is the most visible part of vulnerability management. SOC 2 CC7.1, ISO 27001:2022 control A.8.8 and PCI DSS 4.0 requirement 6.3 all expect you to identify vulnerabilities in the components you run and fix them within defined timeframes. The deadlines belong in a written policy; our vulnerability management policy template has one you can copy. Strac then closes the loop: fixed findings become SOC 2, ISO 27001 and HIPAA evidence automatically, and SCA sits in the same platform as secret scanning, cloud posture checks and the AI pen test, at one price. The wider picture is in our guide to application security posture management.

Turn dependency findings into fixes, and fixes into audit evidence.

Book a demo of Strac's software composition analysis  ·  Run a free security scan

🌶️ Spicy FAQs about software composition analysis

What is software composition analysis?

Software composition analysis (SCA) is the practice of identifying every open-source and third-party component in an application, then checking each one for known vulnerabilities, malicious code, license risk and end of life. It is usually automated by reading lockfiles and manifests.

What is the difference between SCA and SAST?

SAST analyzes the code your team writes for insecure patterns. SCA analyzes the packages you import. They find different problems and most teams need both, but SCA usually produces more exploitable findings because most of a modern application's code is open source.

What is a transitive dependency?

A package you did not add yourself but that one of your dependencies needs. If your app uses library A and A uses B, then B is transitive. Most vulnerabilities are found in transitive dependencies, and fixing them often means upgrading A or forcing a newer B with an override.

What is reachability analysis in SCA?

Reachability analysis checks whether your code actually calls the vulnerable function inside a package. A flaw in a function you never call is much less urgent. It is a useful way to lower noise, but it should lower priority, never hide a finding entirely.

Is dependency scanning required for SOC 2?

SOC 2 does not name specific tools, but CC7.1 asks you to identify newly discovered vulnerabilities in your systems, and almost every auditor expects to see dependency scanning as part of the answer, along with evidence that findings were fixed on time.

Customer story

“Don’t just alert on problems, fix them.”

Scott Roberts, Chief Information Security Officer, UiPath

  • UiPath
  • Crypto.com
  • Inmar Intelligence
  • thredUP
  • Paymentology
  • Enveda
  • Genesis Molecular AI
  • MeridianLink
More customer stories →
What is software composition analysis?
What is the difference between SCA and SAST?
What is a transitive dependency?
What is reachability analysis in SCA?
Is dependency scanning required for SOC 2?
Discover & Protect Data on SaaS, AI, MCP, Endpoints & Cloud
Strac provides end-to-end data loss prevention for all SaaS and Cloud apps. Integrate in under 10 minutes and experience the benefits of live DLP scanning, live redaction, and a fortified SaaS environment.
Get compliant from $4,995

Latest articles

Browse all

Get Your Datasheet

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Close Icon