Software Composition Analysis (SCA)

Updated at:
Copy as MD

Third-party open-source components introduced into a project may contain publicly disclosed security vulnerabilities. Manually auditing the dependency tree is both time-consuming and error-prone. Software Composition Analysis (SCA) automatically identifies all third-party dependencies in a project and cross-references them against vulnerability databases, helping you discover and fix security risks before they are exploited.

Overview

SCA detects open-source security risks in your project through the following steps:

  1. Dependency identification: Parses the project's dependency declaration files (such as package.json, pom.xml, go.mod, requirements.txt) to extract all direct and transitive dependencies.

  2. Vulnerability matching: Cross-references the identified components and their version numbers against the CVE (Common Vulnerabilities and Exposures) database to determine whether known security vulnerabilities exist.

  3. Risk assessment: Assigns a severity level to each vulnerability based on CVSS score and exploitability, and provides remediation suggestions (such as upgrading to a secure version).

Comparison with SAST

Dimension

SCA (Software Composition Analysis)

SAST (Static Application Security Testing)

Detection target

Third-party open-source components and their known vulnerabilities

Security defects in the project's own source code

Detection method

Cross-references vulnerability database (CVE)

Static analysis of source code logic

Typical finding

Remote code execution vulnerability in a dependency package

SQL injection risk in code

Remediation method

Upgrade dependency version

Modify code logic

For an introduction to SAST features, see Static Application Security Testing (SAST).

Applicable scenarios

  • Your project uses a large number of third-party open-source libraries and you need to understand their security status.

  • Security compliance requirements mandate periodic scans for third-party component vulnerabilities.

  • Before merging code, you want to check whether newly introduced dependencies contain known vulnerabilities.

View SCA scan results

After completing a scan task that includes SCA through either of the following methods, you can view the Software Composition Analysis details from the SCA tab on the scan results page:

  • Manual upload scan: SCA was selected under Scan Type when creating the project. For detailed steps, see Manual Upload Scan.

  • GitLab CI integration: The scan job in the Pipeline has completed. For detailed steps, see GitLab CI Integration.

Steps

  1. Log on to the Code Security console.

  2. Go to the Project List page, locate the target project, and click View in the Actions column.

  3. In the project details, go to the Task List, and click View in the Actions column of the target scan task to go to the scan results page.

  4. Click the SCA tab to view the Software Composition Analysis results.

Interpret scan results

The SCA tab displays the third-party dependency information and associated security vulnerability details identified in the current scan.

Component overview

The top of the page displays a card summary of the SCA results for the current scan, including:

  • CVE vulnerability count: The total number of known vulnerabilities identified in the current scan.

  • Critical risk component count: The number of components associated with Critical or High severity vulnerabilities.

  • Risk level distribution: The distribution of components and vulnerabilities across each risk level.

Dependency package list

The list shows all third-party dependency packages detected in the project and their security status:

Field

Description

Component name

The name of the third-party dependency package (for example, log4j-core, lodash).

Version

The version of the component currently used by the project.

Component risk level

The overall risk level based on the highest CVSS score of vulnerabilities associated with this component.

CVE vulnerability severity

The highest severity (Critical, High, Medium, or Low) of vulnerabilities associated with this component.

Vulnerability details

Click a specific dependency package to view its associated vulnerability information:

Field

Description

CVE ID

The unique CVE database identifier for the vulnerability, for example, CVE-2021-44228.

Severity

Critical, High, Medium, or Low, classified based on CVSS score.

Vulnerability description

Description of the vulnerability's impact scope and attack method.

Remediation suggestion

The recommended safe version to upgrade to, or an alternative solution.

Risk level descriptions

Level

CVSS score range

Recommended action

Critical

9.0–10.0

Remotely exploitable without user interaction. Fix immediately.

High

7.0–8.9

Poses a significant security risk. Fix as soon as possible.

Medium

4.0–6.9

Poses some risk. Fix during the next version iteration.

Low

0.1–3.9

Low risk. Evaluate whether to fix based on actual circumstances.