Get the dependency chain for an SCA defect group
Returns the vulnerable package and paths towards its direct/root dependencies. Uses the latest successful default-branch scan when scanUuid is omitted or blank. Paths start at the vulnerable package and are capped at 64 paths of 64 nodes, with cycles cut off.
Request
GET
https://appsec.sourcecraft.tech/v1/defect-groups/{publicId}/dependency-chain
Path parameters
|
Name |
Description |
|
publicId |
Type: integer Per-repository public id of the SCA defect group |
Query parameters
|
Name |
Description |
|
gitRepo |
Type: string Repository identifier. Accepts either internal repository ID (e.g., 88769874964302633) or public UUID (e.g., 0199140f-4343-7c06-a7e3-b835c305b629). These values can be obtained from the getRepo API (fields: id and uuid). Pattern: Example: |
|
scanUuid |
Type: string Scan UUID to select. Omit or leave blank to use the repository's latest scan. Scan UUIDs can be obtained from the scan listing endpoints. Default: `` Example: |
Responses
200 OK
OK
Body
application/json
{
"target": {
"purl": "example",
"name": "example",
"version": "example",
"licenses": [
{
"name": "example",
"riskScore": 0
}
],
"maxLicenseRiskScore": 0,
"maxLicenseRiskSeverity": "example",
"cves": [
{
"cveId": "example",
"severity": "example",
"defectGroupUuids": [
null
],
"defectGroupPublicIds": [
null
]
}
],
"maxCveSeverity": "example",
"packageManager": "example",
"scope": "example"
},
"paths": [
{
"nodes": [
null
]
}
],
"isTransitive": true
}
|
Name |
Description |
|
isTransitive |
Type: boolean Whether the target has a recorded parent in the selected scan's dependency graph. |
|
paths |
Type: DependencyChainPathDto[] Example
|
|
target |
Type: object | null Any of 2 types
Vulnerable package; null when it cannot be resolved in the selected scan's SBOM. Example
|
DependencyLicenseDto
|
Name |
Description |
|
name |
Type: string Example: |
|
riskScore |
Type: integer License risk score from the repository's current license configuration, from 0 to 10. |
Example
{
"name": "example",
"riskScore": 0
}
DependencyCveDto
|
Name |
Description |
|
cveId |
Type: string Example: |
|
defectGroupPublicIds |
Type: integer[] Example
|
|
defectGroupUuids |
Type: string[] Example
|
|
severity |
Type: string Example: |
Example
{
"cveId": "example",
"severity": "example",
"defectGroupUuids": [
"example"
],
"defectGroupPublicIds": [
0
]
}
DependencyNodeDto
|
Name |
Description |
|
cves |
Type: DependencyCveDto[] Example
|
|
licenses |
Type: DependencyLicenseDto[] Example
|
|
maxCveSeverity |
Type: string Example: |
|
maxLicenseRiskScore |
Type: integer |
|
maxLicenseRiskSeverity |
Type: string Example: |
|
name |
Type: string Example: |
|
packageManager |
Type: string Example: |
|
purl |
Type: string Example: |
|
scope |
Type: string Example: |
|
version |
Type: string Example: |
Example
{
"purl": "example",
"name": "example",
"version": "example",
"licenses": [
{
"name": "example",
"riskScore": 0
}
],
"maxLicenseRiskScore": 0,
"maxLicenseRiskSeverity": "example",
"cves": [
{
"cveId": "example",
"severity": "example",
"defectGroupUuids": [
"example"
],
"defectGroupPublicIds": [
0
]
}
],
"maxCveSeverity": "example",
"packageManager": "example",
"scope": "example"
}
DependencyChainPathDto
|
Name |
Description |
|
nodes |
Type: DependencyNodeDto[] Ordered from the vulnerable package towards a root; capped at 64 nodes, with cycles cut off. Example
|
Example
{
"nodes": [
{
"purl": "example",
"name": "example",
"version": "example",
"licenses": [
{
"name": "example",
"riskScore": 0
}
],
"maxLicenseRiskScore": 0,
"maxLicenseRiskSeverity": "example",
"cves": [
{
"cveId": "example",
"severity": "example",
"defectGroupUuids": [
null
],
"defectGroupPublicIds": [
null
]
}
],
"maxCveSeverity": "example",
"packageManager": "example",
"scope": "example"
}
]
}