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: \S

Example: 0199140f-4343-7c06-a7e3-b835c305b629

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: 01890f3e-7b5c-7cc2-bc6f-3f5d8c9a1e4a

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
[
  {
    "nodes": [
      {
        "purl": "example",
        "name": "example",
        "version": "example",
        "licenses": [
          {}
        ],
        "maxLicenseRiskScore": 0,
        "maxLicenseRiskSeverity": "example",
        "cves": [
          {}
        ],
        "maxCveSeverity": "example",
        "packageManager": "example",
        "scope": "example"
      }
    ]
  }
]

target

Type: object | null

Any of 2 types
  • Type: DependencyNodeDto

    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"
    }
    
  • Type: null

    Example: null

Vulnerable package; null when it cannot be resolved in the selected scan's SBOM.

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"
}

DependencyLicenseDto

Name

Description

name

Type: string

Example: 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: example

defectGroupPublicIds

Type: integer[]

Example
[
  0
]

defectGroupUuids

Type: string[]

Example
[
  "example"
]

severity

Type: string

Example: example

Example
{
  "cveId": "example",
  "severity": "example",
  "defectGroupUuids": [
    "example"
  ],
  "defectGroupPublicIds": [
    0
  ]
}

DependencyNodeDto

Name

Description

cves

Type: DependencyCveDto[]

Example
[
  {
    "cveId": "example",
    "severity": "example",
    "defectGroupUuids": [
      "example"
    ],
    "defectGroupPublicIds": [
      0
    ]
  }
]

licenses

Type: DependencyLicenseDto[]

Example
[
  {
    "name": "example",
    "riskScore": 0
  }
]

maxCveSeverity

Type: string

Example: example

maxLicenseRiskScore

Type: integer

maxLicenseRiskSeverity

Type: string

Example: example

name

Type: string

Example: example

packageManager

Type: string

Example: example

purl

Type: string

Example: example

scope

Type: string

Example: example

version

Type: string

Example: 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
[
  {
    "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"
  }
]
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"
    }
  ]
}