Prerequisites
Before using the SCANOSS API, ensure you have:- A SCANOSS API key
curl: command-line tool (pre-installed on Linux/macOS)jq(optional): JSON processor for readable output
Authentication Setup
Configure your API key as an environment variable:GetComponentCpes
Retrieves Common Platform Enumeration (CPE) identifiers for a single software component identified by Package URL (PURL). CPE identifiers are used to identify IT platforms in vulnerability databases, enabling vulnerability scanning and assessment.Request Format
See Common API Types forComponentRequest documentation.
HTTP Request Example
Response Example
GetComponentsCpes
Batch version ofGetComponentCpes. Retrieves CPE identifiers for multiple components in a single request.
Request Format
See Common API Types forComponentsRequest documentation.
HTTP Request Example
GetComponentVulnerabilities
Analyses a single software component and returns known vulnerabilities, including CVE details, severity scores, publication dates, and additional security metadata. Vulnerability data is sourced from the NVD (National Vulnerability Database) and other security feeds.Request Format
See Common API Types forComponentRequest documentation.
HTTP Request Example
Response Format
The response contains acomponent object with the following fields:
| Field | Description |
|---|---|
purl | The requested component’s Package URL |
requirement | The version constraint provided in the request |
version | The specific version that was analysed |
vulnerabilities | Array of known vulnerabilities affecting the component (may be empty) |
vulnerabilities array contains:
| Field | Description |
|---|---|
id | CVE identifier |
cve | CVE identifier (same as id) |
url | Reference URL for the CVE entry |
summary | Description of the vulnerability |
severity | Severity rating (Low, Medium, High, Critical) |
published | ISO 8601 timestamp of initial publication |
modified | ISO 8601 timestamp of last modification |
source | Source database (e.g. NVD) |
cvss | Array of CVSS scoring objects (see below) |
CVSS Information
Thecvss field is an array of CVSS (Common Vulnerability Scoring System) objects. Multiple entries may be present where more than one CVSS version or source applies. Each object contains:
| Field | Description |
|---|---|
cvss | The CVSS vector string (e.g. CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) |
cvss_score | Numerical CVSS score (range: 0.0 to 10.0) |
cvss_severity | Severity rating derived from the score (None, Low, Medium, High, Critical) |
Note: The field name cvss is used both for the array itself and for the vector string field within each array object. Take care to distinguish between these when parsing the response.
Response Examples
Component with Vulnerabilities
Component with No Known Vulnerabilities
GetComponentsVulnerabilities
Batch version ofGetComponentVulnerabilities. Analyses multiple components and returns vulnerability information for each in a single request.
Request Format
See Common API Types forComponentsRequest documentation.