Vulnerabilities and VEX
After an SBOM is processed, the platform attaches known vulnerabilities to its components. You can list them through the API and record a VEX assessment for each one.
You need the environment ID (projectId) and version ID (sbomId). Get them from List Products and Versions.
List vulnerabilities
curl https://api.interlynk.io/lynkapi \
-H "Authorization: Bearer $INTERLYNK_SECURITY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "query Vulns($projectId: Uuid!, $sbomId: Uuid!, $first: Int, $after: String) { sbom(projectId: $projectId, sbomId: $sbomId) { vulns(sbomId: $sbomId, first: $first, after: $after) { totalCount pageInfo { hasNextPage endCursor } nodes { id vuln { vulnId source sev cvssScore } component { name version } vexStatus { id name } } } } }",
"variables": {
"projectId": "1fade833-0603-4139-8ca0-26592264a4c9",
"sbomId": "4e423fe0-d089-4025-b1e4-8fe9608138d6",
"first": 25
}
}'{
"data": {
"sbom": {
"vulns": {
"totalCount": 14,
"pageInfo": { "hasNextPage": false, "endCursor": "MjU" },
"nodes": [
{
"id": "5c11d0e2-0d27-484d-b04f-8df991082652",
"vuln": {
"vulnId": "GHSA-72hv-8253-57qq",
"source": "GITHUB",
"sev": "medium",
"cvssScore": 6.9
},
"component": { "name": "jackson-core", "version": "2.15.2" },
"vexStatus": null
}
]
}
}
}
}The id on each node is the component vulnerability ID. It identifies one vulnerability on one component. You need it to set VEX.
vulns is paginated. When pageInfo.hasNextPage is true, request the next page with after set to endCursor. See Conventions.
Read more about a vulnerability
Two different IDs come back from the list above, and they point at different objects.
The
idon each node is the component vulnerability ID. It identifies one vulnerability on one component in this version. VEX attaches to it, and it carries the instance-level data: effective CVSS, fix versions, VEX state.The
vulnblock is the global vulnerability record, shared by every version that has this vulnerability. Itsid(also exposed on the node asvulnId) is what the top-levelvulnquery takes.
So you can read more two ways: expand fields on the node you already have, or look the global record up by its ID.
Expand the node
Add fields to the same vulns query. No second call is needed.
Node fields you can read, by group:
Identity
id, vulnId, componentId, sbomId, createdAt, updatedAt
Component
component { name version purl ... }
Effective CVSS
effectiveCvssScore, effectiveCvssSeverity, effectiveCvssVector, hasCustomCvss, cvssAdjustedScore, cvssAdjustedSeverity
CVSS customization
cvssTemporalVector, cvssEnvironmentalVector, cvssTemporalMetrics, cvssEnvironmentalMetrics
VEX
vexStatus { name }, vexJustification, cdxResponse, note, impact, detail, actionStmt, fixedIn, vexStatusUpdatedAt
Remediation
fixedVersions, lastAffectedVersions, resolutionDate, patchVelocity
State
retracted, retractedAt, isComplete, isPart, isFirstDegreePart
Links
externalUrls, currentExternalUrls, externalIssueTrackerLinks, componentVulnCustomFields, componentVulnLogs
Look up the global record
Pass the global vulnerability ID (the node's vulnId, or vuln.id) to the top-level vuln query. Use this for cross-version rollups without going through a single SBOM.
The vuln record fields are vulnId, displayId, nvdAliasId, source, sev, cvssScore, cvssVector, desc, publishedAt, lastModifiedAt, componentCount, sbomVersionsCount, projectGroupsCount, and sbomVersions. The nested vulnInfo adds threat intel: cveId, cwes, kev, epssScore, epssScores, epssPercentile, and advisories.
Get the VEX status options
VEX statuses are referenced by ID. Fetch the list of valid statuses first:
Fetch these IDs from your own organization. They are stable within an organization, so you can look them up once and reuse them.
Two more lookup queries return the other VEX option lists:
vexJustifications { id name }for justification IDs.cdxResponses { id name }for response IDs.
Set a VEX status
componentVexUpdate records a VEX assessment on one component vulnerability. Pass the component vulnerability id as componentVulnId, the version as currentSbomId, and the status ID.
componentVexUpdate inputs
componentVulnId
Uuid
The component vulnerability ID. Required.
currentSbomId
Uuid
The version the vulnerability belongs to. Required.
vexStatusId
Uuid
A status ID from vexStatuses.
vexJustificationId
Uuid
A justification ID from vexJustifications.
cdxResponseId
Uuid
A response ID from cdxResponses.
note
String
Free-text note.
impact
String
Impact statement.
detail
String
Detail statement.
action
String
Action statement.
fixedIn
String
Version the issue is fixed in.
propagateVex
Boolean
Apply the same VEX to matching components in other SBOMs.
To update many vulnerabilities at once, use componentVexBulkUpdate, which takes a list of componentVulnIds and the same VEX fields.
Errors
Failures return in the errors list:
See Errors.
Last updated