Cloud & app security

What Is SCA in Security? Software Composition Analysis Explained

Most of the code in your app was written by strangers. SCA is the practice of inventorying that borrowed code and checking every piece for known risks.

Cysoro Security TeamPublished · 8 min read
CLOUD AND APP SECURITY What is SCA? Know every library inside the software you ship. 1 vulnerable package SBOM full inventory verified
Quick answer

SCA, or software composition analysis, is the automated inventory of the third-party and open-source components inside an application, followed by checks on each component for known vulnerabilities, licence obligations and malicious behaviour. It reads manifests and lockfiles to list every dependency, including transitive ones, then matches each version against vulnerability databases. OWASP treats SCA as the software-only subset of component analysis.

Key takeaways

  • SCA inventories the code you did not write, then checks each component for known vulnerabilities, licences and maintenance risk.
  • A lockfile is the best inventory source, because one declared dependency can pull in dozens of transitive packages you never chose by name.
  • SCA finds known flaws, not new ones, so pair it with SAST for your own code and runtime checks for malicious packages.

Most of the code in your application was written by strangers. When you install one popular JavaScript library, your lockfile can quietly grow to 65 packages you never chose by name. SCA is how you find out what is actually inside your software, and whether any of it is known to be dangerous.

What is SCA in security?

Software composition analysis, or SCA, is the automated inventory of the third-party and open-source components inside an application, followed by checks on each component for known vulnerabilities, licence obligations and malicious behaviour. It answers one question first: what is this software made of?

OWASP defines the broader practice, component analysis, as the process of identifying potential areas of risk from the use of third-party and open-source software and hardware components. SCA is the software-only subset of that practice. Without an accurate inventory, OWASP notes, the other risk factors become impractical to judge with confidence.

SCA treats each third-party component as a unit and asks four questions about it: what is it, is it known to be vulnerable, what does its licence allow, and is it safe to run? The first three questions are what classic SCA tools answer. The fourth is newer, and it is the one recent supply-chain attacks exploit.

How does SCA work?

An SCA scan works in two steps. First it resolves an inventory: a list of components, each with an ecosystem, a name, an exact version and ideally a content hash. Then it joins that inventory against outside data, such as vulnerability advisories, licence texts and end-of-life records.

The inventory comes from manifests, lockfiles or built artifacts. A manifest such as package.json declares intent, usually as a version range, so it cannot tell the tool what will actually be installed. A lockfile records the result of resolution, with exact versions and integrity hashes, which makes it the best inventory source a repository offers.

Each lockfile entry is converted into a package URL, the identifier that vulnerability records use. The tool then checks each version against databases such as the National Vulnerability Database, the GitHub Security Advisory database and OSV, and reports which components carry known vulnerabilities.

How an SCA scan works1. Resolveread the lockfile2. Inventoryevery component3. MatchCVE and licence data4. Prioritisefix reachable firstOne declared dependency can become 65 packages in the lockfile.The inventory is where SCA succeeds or fails.
An SCA scan resolves the dependency graph, then matches each version against outside risk data. Illustration by Cysoro.

What does SCA actually find?

SCA finds four kinds of risk. Known vulnerabilities are the headline: a CVE tied to the exact version you use. Licence problems come next, when a component's licence conflicts with how you distribute your software. Outdated or abandoned components are a third risk, because unmaintained code stops receiving security fixes.

The fourth risk is malicious behaviour. A package can contain an install script that downloads a binary, exfiltrates data or rewrites files, and classic CVE matching will not catch it, because a malicious package is working code doing what its author intended, not a vulnerability with a public record.

SCA also surfaces duplication and bloat. OWASP notes that applications rarely need multiple XML parsers or cryptographic providers, and every extra component adds maintenance cost and risk. A clean inventory often reveals libraries nobody remembers adding.

How is SCA different from SAST and DAST?

SCA, SAST and DAST scan different code at different times. SCA scans the third-party code you imported. SAST scans the code your team wrote. DAST tests the running application from the outside, like an attacker would.

MethodWhat it scansWhen it runsWhat it finds
SCAThird-party and open-source dependenciesPull request and CI, continuouslyKnown CVEs, licences, malicious packages
SASTYour own source codeCommit and pull requestInjection, unsafe handling, logic flaws in code
DASTThe running applicationStaging and productionRuntime flaws, auth gaps, exposed endpoints
Secrets scanningCode, history and configEvery commitLeaked API keys, tokens and passwords

These methods complement each other rather than compete. A clean SAST result says nothing about your dependencies, and a clean SCA result says nothing about the code your team wrote. OWASP guidance recommends running component analysis earlier than SAST and DAST, so vulnerable libraries never reach production at all.

If you are choosing tools for a GitHub repository, our list of the best GitHub security tools shows which scanners combine SCA with SAST and secrets detection in one workflow.

Why does SCA matter so much now?

Supply-chain attacks have moved from theory to routine. Attackers compromise a component you trust rather than attacking your code directly, and one poisoned package can reach thousands of applications at once. OWASP's Top 10 for 2025 lists this risk as Software Supply Chain Failures, widened from the 2013 entry that covered only components with known vulnerabilities.

The scale of the problem is structural. Modern applications are assembled from third-party components glued together with original code, and the imported code usually dwarfs the code a team writes. A developer cannot audit that imported code by reading their own commits, so automation is the only practical answer.

Regulation is pushing the same way. NIST's Secure Software Development Framework asks software producers to collect, maintain and share provenance data for all components of each release, for example in an SBOM, and to verify the integrity and provenance of third-party components before reusing them. Customers and auditors increasingly ask for the SBOM as part of procurement.

What is an SBOM, and why do buyers ask for one?

An SBOM, or software bill of materials, is the inventory an SCA scan produces: a complete list of every component in a piece of software, with its name, version, licence and origin. OWASP compares it to the list of ingredients in a recipe. The two main formats are CycloneDX and SPDX.

An SBOM helps in three ways. It lets you answer, in minutes, whether a newly disclosed vulnerability affects anything you ship. It gives customers and auditors a verifiable list of what is inside your product. And it makes licence compliance possible, because you cannot honour a licence you do not know you have.

Generate the SBOM from the lockfile or the built artifact, not from the manifest, and regenerate it on every release. A stale SBOM is worse than none, because it gives a false sense of coverage. Store it with the release so it can be checked later, and check the public face of your release with our free SSL checker as part of the same release routine.

Why are transitive dependencies the hard part?

Transitive dependencies are components your application depends on indirectly, because a direct dependency depends on them. When you install one popular web framework, the package manager resolves its dependencies, then their dependencies, and the tree grows fast. In one test install, a single declared dependency produced 65 packages in the lockfile.

Each of those packages carries its own risk, and you never chose most of them by name. A vulnerability in a deeply nested logging library can be just as exploitable as one in code you wrote yourself, and fixing it usually means upgrading the direct dependency that pulled it in, not editing the transitive package directly.

That is why the lockfile matters so much. It records exact versions with integrity hashes, so an SCA tool can identify every node precisely enough to look it up. Without a committed lockfile, your inventory is a guess, and your SCA results are only as accurate as that guess.

How should you prioritise SCA findings?

Most matched CVEs are never reached by your code, so sorting by severity score alone creates a backlog nobody trusts. The better question is reachability: does your code actually call the vulnerable function, and can an attacker reach that path?

Start with vulnerabilities in components your code directly calls, especially in internet-facing services and code that handles authentication, payments or personal data. Then handle malicious or suspicious packages immediately, regardless of severity, because they are not vulnerabilities waiting for a patch, they are active threats.

Next, clear end-of-life components and licence conflicts, which are usually cheap to fix by upgrading or replacing the library. Use the SCA tool's fix pull requests where they exist, and set a policy that blocks merges only on reachable high-severity findings, so developers keep trusting the gate.

Prioritise by reachability, not by count1. Reachable and exploitable2. Malicious or suspicious packages3. End-of-life and licence conflicts4. Unreachable low-severity findings — schedule, do not block
Fix reachable findings first, then malicious packages, then maintenance and licence issues. Illustration by Cysoro.

What are the limits of SCA?

SCA only judges the components it can see. Packages fetched at runtime, global installs, tools run through a package runner, and code an AI agent installs in a sandbox never enter the repository an SCA tool scans, so they escape the inventory entirely.

Metadata can also lie. A malicious install script can rewrite a package's version metadata after it runs, so a scan of the installed tree reports a clean version while the lockfile still records the malicious one. Comparing the two inventories catches this, but trusting either one alone does not.

Finally, SCA depends on the quality of outside data. Advisory records key on name and version, so a team that builds a library from source against its own patched system library can receive the same findings as a team running the vulnerable binary. Treat SCA findings as leads to verify, not verdicts to obey blindly.

How do you start with SCA this week?

Start with the tools you already have. If your code is on GitHub, enable Dependabot alerts and dependency review, which give you a free SCA baseline with no new vendor. Then add a dedicated scanner such as Snyk, Semgrep or an open-source tool on your most important repository.

  1. Commit your lockfiles. Without them, no SCA tool can build an accurate inventory.
  2. Generate an SBOM for your next release. Use your package manager or your SCA tool, and store it with the release.
  3. Turn on scanning in pull requests. Findings are cheapest to fix before merge.
  4. Set a reachable-first policy. Block merges only on reachable high-severity findings at first.
  5. Schedule a weekly review. Clear new findings in a short triage session, and track end-of-life components as tech debt.

For a broader view of your security posture, run through our small business cybersecurity checklist alongside the SCA rollout, so the dependency work sits inside a complete programme rather than on its own.

The bottom line

SCA is how you stop flying blind on the code you did not write. Inventory every dependency from the lockfile, match it against vulnerability and licence data, and fix reachable findings first. The inventory itself is the win: once you know what is inside your software, every other decision gets easier.

Start with Dependabot or your SCA tool of choice on one repository this week, generate an SBOM for your next release, and make the scan part of every pull request. You can also check the public-facing side of your product with our free security headers checker to round out the release review.

Frequently asked questions

What does SCA stand for in security?

SCA stands for software composition analysis. It is the automated process of identifying the open-source and third-party components inside an application and assessing the risk each one carries, including known vulnerabilities, licence terms and whether the component is still maintained.

What is the difference between SCA and SAST?

SCA examines the third-party code your application imports, while SAST examines the code your team wrote. SCA matches dependency versions against vulnerability databases, and SAST analyses your source code for flaws such as injection and unsafe data handling. Most teams need both.

What is an SBOM and how does it relate to SCA?

An SBOM, or software bill of materials, is the inventory an SCA scan produces: a list of every component, its version and its origin. OWASP compares it to the list of ingredients in a recipe. NIST's Secure Software Development Framework asks producers to collect and share provenance data such as an SBOM for each release.

Can SCA detect malicious packages?

Only if the tool reads the package code itself. Classic SCA matches versions against vulnerability databases, and a malicious package rarely has a CVE, so it slips past that check. Newer tools inspect install scripts and package behaviour, and some block installs of packages confirmed as malware.

What is a transitive dependency?

A transitive dependency is a component your application depends on indirectly, because one of your direct dependencies depends on it. One declared dependency can pull in dozens of transitive packages, and each one carries its own risk, including vulnerabilities in versions you never chose.

When should SCA run in the development pipeline?

Run it early and often: on every pull request, in CI before merge, and continuously against deployed software. OWASP guidance recommends running component analysis earlier than SAST and DAST, because a vulnerable library should never reach production in the first place.

Is SCA only for open-source components?

No, although open source is where most components come from. The same method applies to any third-party code, including commercial libraries and proprietary components, as long as the tool can identify the component and its version.

What are the limits of SCA?

SCA only judges components it can see, so code fetched at runtime, global installs and packages an AI agent installs in a sandbox can escape it. It also depends on accurate vulnerability data, and most matched CVEs are never reachable from your code, so prioritisation by reachability matters.

Sources

  1. OWASP Foundation — Component Analysis
  2. Socket — Glossary: Software Composition Analysis
  3. NIST — Overview of the NIST Secure Software Development Framework (SSDF)
  4. GitHub Blog — Introducing GitHub Secret Protection and GitHub Code Security
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against OWASP's Component Analysis guidance, NIST's Secure Software Development Framework overview, and Socket's SCA glossary.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free