> ## Documentation Index
> Fetch the complete documentation index at: https://docs.endorlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Export SBOMs and VEX

> Learn more about software transparency and the role of SBOMs in your organization.

Exporting an SBOM gives you a standardized, portable inventory of a project's or package version's components that you can share with customers, auditors, or other tools, independent of Endor Labs. A VEX export adds vulnerability exploitability status for those components, so recipients know which findings actually apply.

To export an SBOM you must first perform a successful `endorctl` scan. If you haven't successfully scanned a project see [quick start](https://docs.endorlabs.com/introduction/getting-started.md) for more information.

Endor Labs supports export in the [CycloneDX format](https://cyclonedx.org/docs/1.6/json/#bomFormat), [VEX](https://cyclonedx.org/capabilities/vex/) format, and [SPDX format](https://spdx.github.io/spdx-spec/v2.3/file-information/).

Endor Labs renders CycloneDX documents, including VEX documents, in specification version 1.5, 1.6, or 1.7, and renders SPDX documents in specification version 2.3. Endor Labs uses CycloneDX 1.5 and SPDX 2.3 by default. You can choose the specification version when you export through the Endor Labs user interface, the REST API, or endorctl.

## Export SBOM or VEX through the Endor Labs user interface

You can export an SBOM or VEX document for a project, a package version, or from a finding.

### Export SBOM or VEX for a project

When you export an SBOM or VEX at the project level, Endor Labs includes all packages and package versions by default, combining them into a single consolidated file. A consolidated SBOM or VEX enables quick identification and assessment of vulnerabilities across all software components in the project.

Endor Labs generates SBOM and VEX exports as background jobs. Start an export from a project, then track its progress and download the file from the **Reports** page once the job succeeds.

> [tab] SBOM export
>
> 1. Select **Projects** from the left sidebar and select the project for which you want to export the SBOM.
>
> 2. Click **Export**, then select **SBOM**.
>
> 3. Under **Packages**, select the packages and package versions to include in the SBOM and click **Confirm**.
>
>    If you don't select any packages, Endor Labs includes all packages and package versions.
>
>    You can filter by ecosystem to narrow the list of packages, and search to select multiple versions of the same package.
>
> 4. Select **CycloneDX** or **SPDX** in **Format**.
>
> 5. Select the target artifact type in **Artifact type**.
>
>    * For CycloneDX, select **Application** or **Library**.
>    * SPDX exports always use the application artifact type, so this field does not appear.
>
> 6. For an application export, enter a name in **Application Name**.
>
> 7. Select the output format in **File format**.
>
>    * CycloneDX supports **JSON** or **XML**.
>    * SPDX supports **JSON** or **Tag-Value**.
>
> 8. Select the specification version in **Spec version**.
>
>    * CycloneDX supports **1.5**, **1.6**, or **1.7**, and uses **1.5** by default.
>    * SPDX supports **2.3**.
>
> 9. Optional: Select **Include test dependencies** to include test and other non-production dependencies in the SBOM. By default, Endor Labs excludes test dependencies.
>
> 10. Click **Export**.
>
> Endor Labs submits the SBOM export as a background job and shows a confirmation message. Select **View Reports** in the confirmation message to track the job status and download the SBOM once it completes.
>
> You can also track the job status and download the SBOM once it completes by following these steps:
>
> 1. Select **Reports** from the left sidebar.
> 2. Find the SBOM export job in the list and click **View**.
> 3. Click the three vertical dots and select **Download** to download the SBOM.
>
> See [Reports](https://docs.endorlabs.com/inventory-insights/reports.md) for more information about report statuses and downloading reports.
>
> <video autoPlay muted loop playsInline>
>   <source src="https://mintcdn.com/endorlabs-b4795f4f/TdqdJbT6ir7IzUEQ/images/inventory-insights/sbom/sbom-export.mp4?fit=max&auto=format&n=TdqdJbT6ir7IzUEQ&q=85&s=8fd5f463dce96121e4335571a97fe249" type="video/mp4" />
> </video>

> [tab] VEX export
>
> 1. Select **Projects** from the left sidebar and select the project for which you want to export the VEX document.
>
> 2. Click **Export**, then select **VEX**.
>
> 3. Under **Packages**, select the packages and package versions to include in the VEX document and click **Confirm**.
>
>    If you don't select any packages, Endor Labs includes all packages and package versions.
>
>    You can filter by ecosystem to narrow the list of packages, and search to select multiple versions of the same package.
>
> 4. Select **Application** or **Library** in **Artifact type**.
>
>    If you select **Application**, enter a name in **Application Name**.
>
> 5. Select **JSON** or **XML** in **File Format**.
>
> 6. Select **1.5**, **1.6**, or **1.7** in **Spec version**. Endor Labs uses CycloneDX 1.5 by default.
>
> 7. Optional: Select **Include test dependencies** to include test and other non-production dependencies in the VEX document. By default, Endor Labs excludes test dependencies.
>
> 8. Click **Export**.
>
> Endor Labs submits the VEX export as a background job and shows a confirmation message. Select **View Reports** in the confirmation message to track the job status and download the VEX document once it completes.
>
> You can also track the job status and download the VEX document once it completes by following these steps:
>
> 1. Select **Reports** from the left sidebar.
> 2. Find the VEX export job in the list and click **View**.
> 3. Click the three vertical dots and select **Download** to download the VEX document.
>
> See [Reports](https://docs.endorlabs.com/inventory-insights/reports.md) for more information about report statuses and downloading reports.
>
> <video autoPlay muted loop playsInline>
>   <source src="https://mintcdn.com/endorlabs-b4795f4f/TdqdJbT6ir7IzUEQ/images/inventory-insights/sbom/vex-export.mp4?fit=max&auto=format&n=TdqdJbT6ir7IzUEQ&q=85&s=9d1b9aa7500567c814023b32cd3550a6" type="video/mp4" />
> </video>

### Export SBOM or VEX from findings

When you export an SBOM or VEX for findings, Endor Labs scopes the export to the project you select and includes all its packages and package versions by default, combining them into a single consolidated file. This lets you generate a consolidated SBOM or VEX for a project directly from its findings.

1. Select **Findings** from the left sidebar.
2. In the **Project** column, click the name of the project you want to export, then select **Export SBOM** or **Export VEX**.

<video autoPlay muted loop playsInline>
  <source src="https://mintcdn.com/endorlabs-b4795f4f/TdqdJbT6ir7IzUEQ/images/inventory-insights/sbom/export-sbom-from-finding.mp4?fit=max&auto=format&n=TdqdJbT6ir7IzUEQ&q=85&s=3a8d007446bcc903e81ef048da459f52" type="video/mp4" />
</video>

### Export SBOM or VEX for a package version

When you export an SBOM or VEX for a package version, Endor Labs scopes the export to the package version you select and includes all its dependencies by default, combining them into a single consolidated file. This lets you generate a consolidated SBOM or VEX for a package version directly from its dependencies.

1. Select **Threat Center** from the left sidebar, then select **OSS Packages**.
2. Search and select an open source package.
3. Select a package version to view its details.
4. Click **Export**, then select **SBOM** or **VEX**.

   See [Export an SBOM or VEX for a package version](https://docs.endorlabs.com/discover/open-source-packages.md#export-an-sbom-or-vex-for-a-package-version) for more information about selecting packages, choosing a format, and completing the export.

## Export an SBOM or VEX through the REST API

Endor Labs generates SBOM and VEX exports through the `AsyncJob` resource. This lets you export SBOMs and VEX documents for large projects without the request timing out.

**1. Submit an export job**

Submit an export job with `POST /v1/namespaces/{namespace}/async-jobs`. Set `spec.type` to `TYPE_SBOM` or `TYPE_VEX`, and provide the export parameters in `spec.request.sbom` or `spec.request.vex`.

To request a specification version, set `spec.request.sbom.cyclonedx_spec_version` or `spec.request.sbom.spdx_spec_version` for an SBOM, and `spec.request.vex.cyclonedx_spec_version` for a VEX document. Set the field that matches the format you export.

For example, the following request exports a CycloneDX 1.7 SBOM in JSON for a project:

```bash theme={null}
curl --request POST \
  --header "Authorization: Bearer $ENDOR_TOKEN" \
  --url "https://api.endorlabs.com/v1/namespaces/$ENDOR_NAMESPACE/async-jobs" \
  --data '{
    "meta": {
      "name": "SBOM export"
    },
    "spec": {
      "type": "TYPE_SBOM",
      "request": {
        "sbom": {
          "kind": "SBOM_KIND_CYCLONEDX",
          "format": "FORMAT_JSON",
          "component_type": "COMPONENT_TYPE_APPLICATION",
          "export_parameters": {
            "project_uuid": "<project-uuid>"
          },
          "cyclonedx_spec_version": "CYCLONE_DX_SPEC_VERSION_1_7"
        }
      }
    }
  }'
```

Endor Labs returns an `AsyncJob` with a UUID and `spec.state` set to `JOB_STATE_NEW`.

**2. Poll the job status**

Poll the job with `GET /v1/namespaces/{namespace}/async-jobs/{uuid}` until `spec.state` is `JOB_STATE_SUCCESS`, `JOB_STATE_FAILED`, or `JOB_STATE_CANCELLED`.

**3. Download the file**

On success, download the file from the signed URL in `spec.response.sbom.report_url` or `spec.response.vex.report_url`.

> [!NOTE]
>
> The signed download URL expires after 5 minutes. If it expires before you download the file, call `GetAsyncJob` again to get a fresh URL.

## Export SBOM through endorctl

You can use the following options with the SBOM export command.




&#x20; \- Flag: \`component-type\`
&#x20; Environment\_Variable: \`ENDOR\_SBOM\_COMPONENT\_TYPE\`
&#x20; Type: string
&#x20; Description: Set the SBOM component type to \`application\`, or \`library\` (default \`application\`).

&#x20; \- Flag: \`output-format\`
&#x20; Environment\_Variable: \`ENDOR\_SBOM\_OUTPUT\_FORMAT\`
&#x20; Type: string
&#x20; Description: Set the SBOM format to \`json\` or \`xml\` for CycloneDX, and \`json\` or \`tag-value\` for SPDX (\`json\` is the default for both).

&#x20; \- Flag: \`package-version-name\`
&#x20; Environment\_Variable: \`ENDOR\_SBOM\_PACKAGE\_VERSION\_NAME\`
&#x20; Type: string
&#x20; Description: Name of the package version for which you want to generate an SBOM.

&#x20; \- Flag: \`package-version-uuid\`
&#x20; Environment\_Variable: \`ENDOR\_SBOM\_PACKAGE\_VERSION\_UUID\`
&#x20; Type: string
&#x20; Description: The UUID of the package version for which you want to generate an SBOM.

&#x20; \- Flag: \`spec-version\`
&#x20; Environment\_Variable: \`ENDOR\_SBOM\_SPEC\_VERSION\`
&#x20; Type: string
&#x20; Description: Set the specification version the document conforms to. CycloneDX accepts \`1.5\`, \`1.6\`, or \`1.7\`, and SPDX accepts \`2.3\`. Defaults to CycloneDX \`1.5\` or SPDX \`2.3\`.

&#x20; \- Flag: \`timeout\`
&#x20; Environment\_Variable: \`ENDOR\_SBOM\_TIMEOUT\`
&#x20; Type: string
&#x20; Description: Set the timeout for the SBOM generation (default \`120s\`). Use the Go duration format, for example, 30s, 1m.

&#x20; \- Flag: \`with-vex\`
&#x20; Environment\_Variable: \`ENDOR\_SBOM\_WITH\_VEX\`
&#x20; Type: boolean
&#x20; Description: Generate the corresponding VEX document along with the SBOM.

&#x20; \- Flag: \`include-test-dependencies\`
&#x20; Environment\_Variable: \`ENDOR\_SBOM\_INCLUDE\_TEST\_DEPENDENCIES\`
&#x20; Type: boolean
&#x20; Description: Include test, development, build, and optional dependencies in the SBOM, and in the VEX document when you use \`with-vex\` (default \`false\`).

&#x20; \- Flag: \`project-uuid\`
&#x20; Environment\_Variable: \`ENDOR\_SBOM\_PROJECT\_UUID\`
&#x20; Type: string
&#x20; Description: The UUID of the project for which you want to generate an SBOM.

&#x20; \- Flag: \`project-name\`
&#x20; Environment\_Variable: \`ENDOR\_SBOM\_PROJECT\_NAME\`
&#x20; Type: string
&#x20; Description: Name of the project for which you want to generate an SBOM.

&#x20; \- Flag: \`app-name\`
&#x20; Environment\_Variable: \`ENDOR\_SBOM\_APP\_NAME\`
&#x20; Type: string
&#x20; Description: Name of the application or the library. Required for multi-package SBOM export.

&#x20; \- Flag: \`package-version-uuids\`
&#x20; Environment\_Variable: \`ENDOR\_SBOM\_PACKAGE\_VERSION\_UUIDS\`
&#x20; Type: string
&#x20; Description: The list of package version UUIDs to export an SBOM.


&#x20;&#x20;

You can export an SBOM in CycloneDX or SPDX format using endorctl, for a single package version or across multiple package versions.

To export an SBOM you need the package version name for which you'd like to create an SBOM or its UUID. You can also export an SBOM with multiple package versions. To export an SBOM with multiple package versions, you need the package version UUIDs or the project name.

Pass the package name or UUID to the command `endorctl sbom export` using the `--package-version-name` or `--uuid` flags.

To export an SBOM, you must first retrieve the package version name through the API.

You can easily export a reference package name and the scanned version you'd like to export as environment variables.

```shell theme={null}
export PACKAGE_NAME=<insert_package_name>
export VERSION=<insert_package_version>
```

Then query the API for the package version name and set this as an environment variable:

```shell theme={null}
export PACKAGE_VERSION_NAME=$(endorctl api list -r PackageVersion --filter "meta.name matches $PACKAGE_NAME AND meta.name matches $VERSION" --field-mask=meta.name | jq -r ".list.objects[].meta.name")
```

Export an SBOM in the CycloneDX format through endorctl using the package version name.

```shell theme={null}
endorctl sbom export --package-version-name=$PACKAGE_VERSION_NAME >> cyclonedx.json
```

Export an SBOM in the SPDX format through endorctl using the package version name.

```shell theme={null}
endorctl sbom export --format spdx --package-version-name=$PACKAGE_VERSION_NAME >> spdx.json
```

To export multiple package versions in an SBOM, you need the UUIDs of package versions, or the name or UUID of the project to which the package versions belong.

To create an SBOM based on project details, either provide the project UUID with the `--project-uuid` flag or the project name with the `--project-name` flag. You also need to provide a name for the package with the `--app-name` flag.

Run the command to create an SBOM with multiple package versions using the project UUID.

```shell theme={null}
endorctl sbom export -n <Namespace> --project-uuid=<Project UUID> --app-name=<Application Name> >> <SBOM Name>.json
```

For example:

```shell theme={null}
endorctl sbom export -n test --project-uuid=66e345c340669666c22979d6 --app-name=actions-hu/app-java-demo >> cyclonedx-sbom.json
```

Run the following commands to create an SBOM with multiple package versions with the project name.

1. Fetch the project name using the project's UUID.

   ```shell theme={null}
   endorctl api get -r Project --uuid <Project's UUID> -n <namesapce> |jq .meta.name
   ```

2. Run the following command and replace `<Project Name>` with the project name you retrieved in the previous step.

   ```shell theme={null}
   endorctl sbom export -n <Namespace> --project-name=<Project Name> --app-name=<Application Name> >> <SBOM Name>.json
   ```

   For example:

   ```shell theme={null}
   endorctl sbom export -n test --project-name=actions-hu/app-java-demo --app-name=actions-hu/app-java-demo >> cyclonedx-sbom.json
   ```

Generate an SBOM based on package version UUIDs, provide the package version UUIDs with the `--package-version-uuids` flag. You also need to provide a name for the package with the `--app-name` flag.

```shell theme={null}
endorctl sbom export -n <Namespace> --package-version-uuids=<Package Version UUID 1>,<Package Version UUID 2>,... <Package Version UUID N> --app-name=<Application Name> >> <SBOM Name>.json
```

For example:

```shell theme={null}
endorctl sbom export -n test --package-version-uuids=66e345c340669666c22979d6,89f456c340669666c229854a,43a56b1340669666c289d4a2 --app-name=actions-hu/app-java-demo >> spdx-sbom.json
```

To export multiple package versions in an SBOM, you need the UUIDs of package versions, or the name or UUID of the project to which the package versions belong.

To create an SBOM based on project details, either provide the project UUID with the `--project-uuid` flag or the project name with the `--project-name` flag. You also need to provide a name for the package with the `--app-name` flag.

Run the command to create an SBOM with multiple package versions using the project UUID.

```shell theme={null}
endorctl sbom export --format spdx -n <Namespace> --project-uuid=<Project UUID> --app-name=<Application Name> >> <SBOM Name>.json
```

For example:

```shell theme={null}
endorctl sbom export --format spdx -n test --project-uuid=66e345c340669666c22979d6 --app-name=actions-hu/app-java-demo >> spdx-sbom.json
```

Run the following commands to create an SBOM with multiple package versions with the project name.

1. Fetch the project name using the project's UUID.

   ```shell theme={null}
   endorctl api get -r Project --uuid <Project's UUID> -n <namesapce> |jq .meta.name
   ```

2. Run the following command and replace `<Project Name>` with the project name you retrieved in the previous step.

   ```shell theme={null}
   endorctl sbom export --format spdx --output-format=<Format Type> -n <Namespace> --project-name=<Project Name> --app-name=<Application Name> >> <SBOM Name>.json
   ```

   For example:

   ```shell theme={null}
   endorctl sbom export --format spdx --output-format=json -n test --project-name=actions-hu/app-java-demo --app-name=actions-hu/app-java-demo >> spdx-sbom.json
   ```

Generate an SBOM based on package version UUIDs, provide the package version UUIDs with the `--package-version-uuids` flag. You also need to provide a name for the package with the `--app-name` flag.

```shell theme={null}
endorctl sbom export --format spdx --output-format=json  -n <Namespace> --package-version-uuids=<Package Version UUID 1>,<Package Version UUID 2>,... <Package Version UUID N> --app-name=<Application Name> >> <SBOM Name>.json
```

For example:

```shell theme={null}
endorctl sbom export --format spdx --output-format=json -n test --package-version-uuids=66e345c340669666c22979d6,89f456c340669666c229854a,43a56b1340669666c289d4a2 --app-name=actions-hu/app-java-demo >> spdx-sbom.json
```

To export the CycloneDX SBOM as a library rather than an application use `--component-type=library`.

```shell theme={null}
endorctl sbom export --component-type=library --package-version-name=$PACKAGE_VERSION_NAME >> cyclonedx.json
```

To export the CycloneDX SBOM in XML format rather than json use `--output-format` with the XML parameter.

```shell theme={null}
endorctl sbom export --output-format=xml --package-version-name=$PACKAGE_VERSION_NAME >> cyclonedx.xml
```

To export a VEX document use the flag `--with-vex`

```shell theme={null}
endorctl sbom export --with-vex
```

To export a document that conforms to a specific specification version, use `--spec-version`.

```shell theme={null}
endorctl sbom export --spec-version=1.6
```

When you combine `--spec-version` with `--with-vex` on a CycloneDX export, the VEX document uses the same specification version.

```shell theme={null}
endorctl sbom export --package-version-name=$PACKAGE_VERSION_NAME --with-vex --spec-version=1.7
```

To export the SPDX SBOM using the tag-value format instead of json, use `--output-format=tag-value`.

```shell theme={null}
endorctl sbom export --format spdx --output-format=tag-value --package-version-name=$PACKAGE_VERSION_NAME >> sbom-spdx.spdx
```

> [!NOTE]
>
> endorctl generates SBOMs in the CycloneDX format by default.

## Endor Labs Export Formats

Endor Labs provides the following fields to map to the [NTIA minimum elements of an SBOM standard](https://www.ntia.gov/report/2021/minimum-elements-software-bill-materials-sbom).

### CycloneDX Format

Endor Labs supports export in the CycloneDX format.

The following table lists the mandatory and some optional fields in the SBOM file that Endor Labs exports.




&#x20; \- Field: \`bomFormat\`
&#x20; Mandatory: true
&#x20; Description: Specifies the format of the SBOM.

&#x20; \- Field: \`specVersion\`
&#x20; Mandatory: true
&#x20; Description: The version of the specification used (for example, "1.4").

&#x20; \- Field: \`serialNumber\`
&#x20; Mandatory: false
&#x20; Description: A unique identifier for the SBOM document.

&#x20; \- Field: \`version\`
&#x20; Mandatory: true
&#x20; Description: The revision number of the SBOM.

&#x20; \- Field: \`metadata\`
&#x20; Mandatory: false
&#x20; Description: Contains metadata about the SBOM and primary component.

&#x20; \- Field: \`metadata.timestamp\`
&#x20; Mandatory: false
&#x20; Description: The date and time when the SBOM was generated.

&#x20; \- Field: \`metadata.component\`
&#x20; Mandatory: false
&#x20; Description: Information about the main component described by the SBOM.

&#x20; \- Field: \`metadata.component.bom-ref\`
&#x20; Mandatory: false
&#x20; Description: A reference identifier for the component within the BOM.

&#x20; \- Field: \`metadata.component.type\`
&#x20; Mandatory: false
&#x20; Description: The type of the main component (for example, "application" or "library").

&#x20; \- Field: \`metadata.component.name\`
&#x20; Mandatory: false
&#x20; Description: The name of the main component.

&#x20; \- Field: \`metadata.component.version\`
&#x20; Mandatory: false
&#x20; Description: The version of the main component.

&#x20; \- Field: \`metadata.component.hashes\`
&#x20; Mandatory: false
&#x20; Description: Cryptographic hashes of the main component.

&#x20; \- Field: \`metadata.component.purl\`
&#x20; Mandatory: false
&#x20; Description: The Package URL (purl) for the main component.

&#x20; \- Field: \`metadata.supplier\`
&#x20; Mandatory: false
&#x20; Description: Information about the supplier of the software.

&#x20; \- Field: \`metadata.supplier.name\`
&#x20; Mandatory: false
&#x20; Description: The name of the supplier.

&#x20; \- Field: \`metadata.supplier.url\`
&#x20; Mandatory: false
&#x20; Description: URLs associated with the supplier.

&#x20; \- Field: \`metadata.supplier.contact\`
&#x20; Mandatory: false
&#x20; Description: Contact information for the supplier.

&#x20; \- Field: \`metadata.licenses\`
&#x20; Mandatory: false
&#x20; Description: License information for the main component.

&#x20; \- Field: \`components\`
&#x20; Mandatory: true
&#x20; Description: List of software components included in the SBOM.

&#x20; \- Field: \`components\[].bom-ref\`
&#x20; Mandatory: false
&#x20; Description: A reference identifier for each component within the BOM.

&#x20; \- Field: \`components\[].type\`
&#x20; Mandatory: true
&#x20; Description: The type of each component (for example, "library").

&#x20; \- Field: \`components\[].name\`
&#x20; Mandatory: true
&#x20; Description: The name of each component.

&#x20; \- Field: \`components\[].version\`
&#x20; Mandatory: false
&#x20; Description: The version of each component.

&#x20; \- Field: \`components\[].licenses\`
&#x20; Mandatory: false
&#x20; Description: License information for each component.

&#x20; \- Field: \`components\[].licenses\[].license.name\`
&#x20; Mandatory: false
&#x20; Description: The name of the license.

&#x20; \- Field: \`components\[].purl\`
&#x20; Mandatory: false
&#x20; Description: The Package URL (purl) for each component.

&#x20; \- Field: \`components\[].hashes\`
&#x20; Mandatory: false
&#x20; Description: Cryptographic hashes of the component. See \[Component hashes]\(#component-hashes) to review which components get hashes.

&#x20; \- Field: \`components\[].hashes\[].alg\`
&#x20; Mandatory: false
&#x20; Description: The hash algorithm, one of \`MD5\`, \`SHA-1\`, \`SHA-256\`, \`SHA-384\`, or \`SHA-512\`.

&#x20; \- Field: \`components\[].hashes\[].content\`
&#x20; Mandatory: false
&#x20; Description: The hash value in lowercase hexadecimal.

&#x20; \- Field: \`components\[].externalReferences\`
&#x20; Mandatory: false
&#x20; Description: External references for components.

&#x20; \- Field: \`components\[].externalReferences\[].url\`
&#x20; Mandatory: false
&#x20; Description: The URL of the external reference.

&#x20; \- Field: \`components\[].externalReferences\[].type\`
&#x20; Mandatory: false
&#x20; Description: The type of the external reference (for example, "\`vcs\`").

&#x20; \- Field: \`components\[].pedigree\`
&#x20; Mandatory: false
&#x20; Description: Contains pedigree metadata for components that use an \[Endor patch]\(/risk-remediation/endor-patches). See \[Patch data in SBOM]\(#patch-data-in-sbom) for more information.

&#x20; \- Field: \`components\[].pedigree.ancestors\`
&#x20; Mandatory: false
&#x20; Description: The upstream component version that is the base for the patch. The patched component in the SBOM is derived from this ancestor.

&#x20; \- Field: \`components\[].pedigree.patches\`
&#x20; Mandatory: false
&#x20; Description: List of patches applied to the component. Each patch includes the base64-encoded diff and the vulnerabilities it resolves.

&#x20; \- Field: \`components\[].pedigree.patches\[].diff\`
&#x20; Mandatory: false
&#x20; Description: The base64-encoded patch content.

&#x20; \- Field: \`components\[].pedigree.patches\[].resolves\`
&#x20; Mandatory: false
&#x20; Description: List of vulnerabilities resolved by this patch.

&#x20; \- Field: \`dependencies\`
&#x20; Mandatory: false
&#x20; Description: Describes the relationships between components.

&#x20; \- Field: \`dependencies\[].ref\`
&#x20; Mandatory: false
&#x20; Description: Reference to a component in the dependency relationship.

&#x20; \- Field: \`dependencies\[].dependsOn\`
&#x20; Mandatory: false
&#x20; Description: List of components that this component depends on.

&#x20;&#x20;

#### Component hashes

CycloneDX SBOMs add `components[].hashes` to each public dependency from the checksums that Endor Labs stores for its package version. Each component gets at most one hash for each algorithm. Hashes cover the following ecosystems:

* **PyPI, npm, NuGet, Cargo, RubyGems, and Maven**: The checksums of the published package.
* **CocoaPods**: The SHA-1 hash of the `.podspec` file.
* **Swift and GitHub Actions**: The Git commit of the release tag.

Go modules don't get component hashes, because Endor Labs stores the Go `h1:` module hash, which CycloneDX doesn't support. Private dependencies don't get component hashes.

#### Patch data in SBOM

CycloneDX SBOMs generated by Endor Labs include patch data for components that use an Endor patch. This allows consumers of the SBOM to see exactly which upstream version was patched, what changes were applied, and which vulnerabilities those patches resolve.

The following fields describe how patch data appears in the exported SBOM.




&#x20; \- Field: \`pedigree.patches\[].diff\`
&#x20; Description: Contains the patch data associated with the component. The \`diff\` object stores the patch as  base64 encoded content with \`contentType\` set to \`text/plain\`.
&#x20; \- Field: \`pedigree.ancestors\`
&#x20; Description: Contains the upstream component version that was used as the base for the patch. This is the original version from which the patched version was derived.
&#x20; \- Field: \`pedigree.patches\[].resolves\`
&#x20; Description: Identifies the vulnerabilities resolved by the patch. Each entry sets \`type\` to \`security\` and specifies \`name\` as the vulnerability identifier such as a GHSA ID.
&#x20; \- Field: \`version\`
&#x20; Description: Specifies the component version as declared in the manifest file. If a version reference such as \`endor-latest\` is used, the SBOM retains the value declared in the manifest file.


&#x20;&#x20;

The following example shows a patched component in a CycloneDX SBOM.

```json expandable theme={null}
{
  "bom-ref": "mvn://com.fasterxml.jackson.core:jackson-databind@2.9.10.3-endor-2024-07-10",
  "type": "library",
  "name": "com.fasterxml.jackson.core:jackson-databind",
  "version": "2.9.10.3-endor-2024-07-10",
  "licenses": [],
  "purl": "pkg:maven/com.fasterxml.jackson.core/jackson-databind@2.9.10.3-endor-2024-07-10",
  "pedigree": {
    "ancestors": [
      {
        "bom-ref": "mvn://com.fasterxml.jackson.core:jackson-databind@2.9.10.3",
        "type": "library",
        "name": "com.fasterxml.jackson.core:jackson-databind",
        "version": "2.9.10.3",
        "licenses": [],
        "purl": "pkg:maven/com.fasterxml.jackson.core/jackson-databind@2.9.10.3",
        "externalReferences": [
          {
            "url": "https://github.com/fasterxml/jackson-databind.git",
            "type": "vcs"
          }
        ]
      }
    ],
    "patches": [
      {
        "diff": {
          "text": {
            "content": "<base64-encoded patch content>",
            "contentType": "text/plain",
            "encoding": "base64"
          }
        },
        "resolves": [
          {
            "id": "",
            "name": "GHSA-q93h-jc49-78gg",
            "description": "",
            "type": "security"
          },
          {
            "id": "",
            "name": "GHSA-p43x-xfjf-5jhr",
            "description": "",
            "type": "security"
          }
        ]
      }
    ]
  }
}
```

### VEX Format

The following table lists the mandatory and some optional fields in the VEX file that Endor Labs exports.




&#x20; \- Field: \`bomFormat\`
&#x20; Mandatory: true
&#x20; Description: Specifies the format of the VEX document.

&#x20; \- Field: \`specVersion\`
&#x20; Mandatory: true
&#x20; Description: The version of the specification used.

&#x20; \- Field: \`serialNumber\`
&#x20; Mandatory: true
&#x20; Description: A unique identifier for the VEX document.

&#x20; \- Field: \`version\`
&#x20; Mandatory: true
&#x20; Description: The revision number of the VEX document.

&#x20; \- Field: \`metadata\`
&#x20; Mandatory: true
&#x20; Description: Contains metadata about the VEX document and primary component.

&#x20; \- Field: \`metadata.timestamp\`
&#x20; Mandatory: true
&#x20; Description: The date and time when the VEX document was generated.

&#x20; \- Field: \`metadata.tools\`
&#x20; Mandatory: true
&#x20; Description: Information about tools used to generate the VEX document.

&#x20; \- Field: \`metadata.tools.services\`
&#x20; Mandatory: true
&#x20; Description: List of services used in generating the VEX document.

&#x20; \- Field: \`metadata.tools.services\[].provider\`
&#x20; Mandatory: true
&#x20; Description: Information about the provider of the service.

&#x20; \- Field: \`metadata.tools.services\[].provider.name\`
&#x20; Mandatory: true
&#x20; Description: The name of the service provider.

&#x20; \- Field: \`metadata.tools.services\[].provider.url\`
&#x20; Mandatory: true
&#x20; Description: URLs associated with the service provider.

&#x20; \- Field: \`metadata.tools.services\[].name\`
&#x20; Mandatory: true
&#x20; Description: The name of the service.

&#x20; \- Field: \`metadata.tools.services\[].version\`
&#x20; Mandatory: true
&#x20; Description: The version of the service.

&#x20; \- Field: \`metadata.tools.services\[].description\`
&#x20; Mandatory: true
&#x20; Description: A description of the service.

&#x20; \- Field: \`metadata.component\`
&#x20; Mandatory: true
&#x20; Description: Information about the main component described by the VEX document.

&#x20; \- Field: \`metadata.component.bom-ref\`
&#x20; Mandatory: true
&#x20; Description: A reference identifier for the component within the VEX.

&#x20; \- Field: \`metadata.component.type\`
&#x20; Mandatory: true
&#x20; Description: The type of the main component.

&#x20; \- Field: \`metadata.component.name\`
&#x20; Mandatory: true
&#x20; Description: The name of the main component.

&#x20; \- Field: \`metadata.component.version\`
&#x20; Mandatory: true
&#x20; Description: The version of the main component.

&#x20; \- Field: \`metadata.component.hashes\`
&#x20; Mandatory: true
&#x20; Description: Cryptographic hashes of the main component.

&#x20; \- Field: \`metadata.component.purl\`
&#x20; Mandatory: true
&#x20; Description: The Package URL (purl) for the main component.

&#x20; \- Field: \`vulnerabilities\`
&#x20; Mandatory: true
&#x20; Description: List of vulnerabilities associated with the component.

&#x20; \- Field: \`vulnerabilities\[].id\`
&#x20; Mandatory: false
&#x20; Description: The identifier of the vulnerability.

&#x20; \- Field: \`vulnerabilities\[].references\`
&#x20; Mandatory: false
&#x20; Description: References related to the vulnerability.

&#x20; \- Field: \`vulnerabilities\[].references\[].source.url\`
&#x20; Mandatory: false
&#x20; Description: URL of the reference source.

&#x20; \- Field: \`vulnerabilities\[].ratings\`
&#x20; Mandatory: false
&#x20; Description: Severity ratings for the vulnerability.

&#x20; \- Field: \`vulnerabilities\[].ratings\[].score\`
&#x20; Mandatory: false
&#x20; Description: Numerical score of the severity.

&#x20; \- Field: \`vulnerabilities\[].ratings\[].severity\`
&#x20; Mandatory: false
&#x20; Description: Textual representation of the severity.

&#x20; \- Field: \`vulnerabilities\[].ratings\[].method\`
&#x20; Mandatory: false
&#x20; Description: The method used for rating (for example, "CVSSv3").

&#x20; \- Field: \`vulnerabilities\[].ratings\[].vector\`
&#x20; Mandatory: false
&#x20; Description: The vector string for the rating.

&#x20; \- Field: \`vulnerabilities\[].cwes\`
&#x20; Mandatory: false
&#x20; Description: Common Weakness Enumeration (CWE) identifiers.

&#x20; \- Field: \`vulnerabilities\[].description\`
&#x20; Mandatory: false
&#x20; Description: A description of the vulnerability.

&#x20; \- Field: \`vulnerabilities\[].detail\`
&#x20; Mandatory: false
&#x20; Description: Detailed information about the vulnerability.

&#x20; \- Field: \`vulnerabilities\[].recommendation\`
&#x20; Mandatory: false
&#x20; Description: Recommended actions to address the vulnerability.

&#x20; \- Field: \`vulnerabilities\[].advisories\`
&#x20; Mandatory: false
&#x20; Description: List of advisories related to the vulnerability.

&#x20; \- Field: \`vulnerabilities\[].advisories\[].url\`
&#x20; Mandatory: false
&#x20; Description: URL of the advisory.

&#x20; \- Field: \`vulnerabilities\[].published\`
&#x20; Mandatory: false
&#x20; Description: The date when the vulnerability was published.

&#x20; \- Field: \`vulnerabilities\[].updated\`
&#x20; Mandatory: false
&#x20; Description: The date when the vulnerability information was last updated.

&#x20; \- Field: \`vulnerabilities\[].credits\`
&#x20; Mandatory: false
&#x20; Description: Credits for individuals or organizations related to the vulnerability.

&#x20; \- Field: \`vulnerabilities\[].credits.individuals\`
&#x20; Mandatory: false
&#x20; Description: List of individuals credited.

&#x20; \- Field: \`vulnerabilities\[].analysis\`
&#x20; Mandatory: false
&#x20; Description: Analysis of the vulnerability's impact on the component.

&#x20; \- Field: \`vulnerabilities\[].analysis.state\`
&#x20; Mandatory: false
&#x20; Description: The state of the analysis (for example, \`not\_affected\`).

&#x20; \- Field: \`vulnerabilities\[].analysis.justification\`
&#x20; Mandatory: false
&#x20; Description: Justification for the analysis state.

&#x20; \- Field: \`vulnerabilities\[].affects\`
&#x20; Mandatory: false
&#x20; Description: Information about which components are affected by the vulnerability.

&#x20; \- Field: \`vulnerabilities\[].affects\[].ref\`
&#x20; Mandatory: false
&#x20; Description: Reference to the affected component.


&#x20;&#x20;

#### Vulnerability analysis state

Endor Labs sets `vulnerabilities[].analysis.state` to `not_affected` with the justification `code_not_reachable` when reachability analysis determines that your code doesn't reach the vulnerable function or dependency. Endor Labs doesn't set an analysis state for any other vulnerability.

Dismissing a finding doesn't set the analysis state to `not_affected`. A VEX export includes every vulnerability finding in its scope, including dismissed findings. Dismissal exempts a finding from action policies in your own workflow. It isn't an assertion that the component is unaffected, so a dismissed finding appears in the exported VEX document with the same vulnerability statement as any other finding.

See [Dismiss findings](https://docs.endorlabs.com/inventory-insights/findings/dismiss-findings.md) to learn the ways you can dismiss a finding.

### SPDX Format

The following table lists the mandatory and some optional fields in the SPDX file that Endor Labs exports.




&#x20; \- Field: \`spdxVersion\`
&#x20; Mandatory: true
&#x20; Description: Specifies the SPDX specification version used.

&#x20; \- Field: \`dataLicense\`
&#x20; Mandatory: true
&#x20; Description: Specifies the data license for the SPDX document.

&#x20; \- Field: \`SPDXID\`
&#x20; Mandatory: true
&#x20; Description: Unique identifier for the SPDX document.

&#x20; \- Field: \`name\`
&#x20; Mandatory: true
&#x20; Description: Name of the SPDX document.

&#x20; \- Field: \`documentNamespace\`
&#x20; Mandatory: false
&#x20; Description: Defines the namespace URI for the document.

&#x20; \- Field: \`creationInfo\`
&#x20; Mandatory: true
&#x20; Description: Contains metadata about when and how the document was created.

&#x20; \- Field: \`creationInfo.licenseListVersion\`
&#x20; Mandatory: false
&#x20; Description: Specifies the version of the SPDX license list used.

&#x20; \- Field: \`creationInfo.creators\[]\`
&#x20; Mandatory: true
&#x20; Description: List of entities that created the document (tool, organization, or person).

&#x20; \- Field: \`creationInfo.created\`
&#x20; Mandatory: true
&#x20; Description: The date and time when the document was created.

&#x20; \- Field: \`packages\[]\`
&#x20; Mandatory: true
&#x20; Description: List of packages included in the SPDX document.

&#x20; \- Field: \`packages\[].name\`
&#x20; Mandatory: true
&#x20; Description: Name of the package.

&#x20; \- Field: \`packages\[].SPDXID\`
&#x20; Mandatory: true
&#x20; Description: Unique identifier for the package.

&#x20; \- Field: \`packages\[].versionInfo\`
&#x20; Mandatory: false
&#x20; Description: Version of the package, if known.

&#x20; \- Field: \`packages\[].supplier\`
&#x20; Mandatory: false
&#x20; Description: Information about the package supplier.

&#x20; \- Field: \`packages\[].downloadLocation\`
&#x20; Mandatory: true
&#x20; Description: Location from where the package can be downloaded.

&#x20; \- Field: \`packages\[].filesAnalyzed\`
&#x20; Mandatory: false
&#x20; Description: Indicates whether the files in the package were analyzed.

&#x20; \- Field: \`packages\[].licenseConcluded\`
&#x20; Mandatory: false
&#x20; Description: License the package is concluded to be under.

&#x20; \- Field: \`packages\[].licenseDeclared\`
&#x20; Mandatory: false
&#x20; Description: License declared by the package supplier.

&#x20; \- Field: \`packages\[].copyrightText\`
&#x20; Mandatory: false
&#x20; Description: Copyright statement for the package.

&#x20; \- Field: \`packages\[].externalRefs\[]\`
&#x20; Mandatory: false
&#x20; Description: List of external references related to the package.

&#x20; \- Field: \`packages\[].externalRefs\[].referenceCategory\`
&#x20; Mandatory: true
&#x20; Description: Category of the external reference.

&#x20; \- Field: \`packages\[].externalRefs\[].referenceType\`
&#x20; Mandatory: false
&#x20; Description: Type of external reference (for example, \`purl\`).

&#x20; \- Field: \`packages\[].externalRefs\[].referenceLocator\`
&#x20; Mandatory: true
&#x20; Description: Value used to locate the reference (for example, a Package URL).


&#x20;&#x20;


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.