# Importing SBOMs

Import SBOMs and archives by selecting the _Import_ button from the Applications View.

Supported file types include CycloneDX, SPDX, and most non-proprietary binary archive files.

SBOMs cannot use UTF-16; convert them to UTF-8 before importing.

**Compliance Stage**

The SBOM Manager uses the `Compliance` stage when importing SBOMs and Binary files. This stage is only available for the SBOM Manager solution as a target stage for Continuous Monitoring.

## Steps to Import an SBOM

1. Select an Application, and click on the Import button at the top right.

2. Click the Choose File button, select the file to import, and click the **Import** button. Valid SBOMs are analyzed and the version ID is extracted from the file. Binaries are evaluated in the next step.

3. Type the Application Version and click the **Import** button. If the version is not found in the file, the import timestamp will be used.

4. The SBOM evaluation can take a few minutes to complete.

5. Once the evaluation is finished, refresh the page to see the import, and select the version to open the [bill of material view](https://help.sonatype.com/en/sbom-bill-of-material-view.html "SBOM Bill of Material View").

## Validation Errors on Import

Not all SBOMs are created at the same level of quality or fully meet the format's specification requirements. When validation errors occur during import the user has the option to proceed with the import at the risk of missing data in the Bill of Materials report.

Software Bill of Materials that failed validation have the warning message "`Invalid SBOM Detected`" at the top of the view and a warning icon remains to indicate the issue.

### Skip Validation

When importing an invalid SBOM, you have the option to import it as is by checking the option to "Skip validation and import anyway". This method only imports the components section of the SBOM.

**The option to _Skip Validation_ may not be available if the SBOM is severely malformed.**

- #### No Support for VEX Annotations

Using this method only imports the components section of the SBOM and the resulting report may not be VEX annotated.

- #### Only Export Orginal SBOM when Invalid

If you import an invalid SBOM, only the original SBOM can be exported. Most other actions will be disabled.

- #### Validation Error Details

Use the validation error details to correct the original SBOM, making it valid for importing and managing in SBOM Manager.

**Note**

The `skipSbomImportValidation` feature flag, when enabled, will bypass the validation step during SBOM import in both Lifecycle and SBOM Manager. This means that if you import an invalid SBOM while this flag is enabled, you will not see the validation error modal in SBOM Manager, and the SBOM will be imported anyway.

For more information about Lifecycle supported features go to the [Feature Configuration REST API](https://help.sonatype.com/en/feature-configuration-rest-api.html "Feature Configuration REST API") page.

## Similar Matching for SBOMs

When scanning binary files, Sonatype can determine when an open-source component has been modified from the versions found in open-source repositories. These components are labeled with the property `sonatype:match_state` as a `similar` match.

See the topic [Component Identification: Match States](https://help.sonatype.com/en/component-identification.html#match-states "Match States") to learn more.

## Binary File Names

When analyzing binary files, the name of the original binary files is stored with the component data and included in the user interface, the exported SBOM, and the PDF report. When storing the value in the SBOM the file name is included as the custom property `sonatype:original_file`.

## Supported Files for Importing

This table lists the supported files for importing. While individual project files are supported we recommend including the application in an archive file such as a zip or tar.gz.

| Format | Schema Versions |
| --- | --- |
| CycloneDX | 1.1, 1.2, 1.3, 1.4, 1.5, 1.6 (XML)<br>1.4, 1.5, 1.6 (JSON) |
| SPDX | 2.2, 2.3 (XML, JSON) |
| Archive files | .ear, .war, .jar, .zip, .tar.gz, etc<br>review the full list of supported formats in the [Analysis](https://help.sonatype.com/en/analysis.html "Analysis") documentation. |

**Converting between SPDX and CycloneDX formats**

The SPDX and CycloneDX formats are the most popular software bill of materials options. These standards are developed for different use cases and may not completely align with the information found within. Converting between SPDX and CycloneDX formats may result in the loss of data.

Review our blog post to learn more about [comparing and converting between SBOM formats](/content/blog/how-to-convert-your-sbom-between-spdx-and-cyclonedx-formats/index.html) and the CycloneDX documentation on the [high-level overview of the information lost during conversion](https://github.com/CycloneDX/cyclonedx-dotnet-library#high-level-overview-of-information-lost-during-conversion).

## Support for Container Analysis

Import SBOMs for your containers using Sonatype Container Security support in SBOM Manager. These scans use the Sonatype CLI and the container client to download images and analyze them for vulnerabilities.

This feature supports the following:

- The “`compliance`” stage is required to use for SBOM Manager.
- Use of the Sonatype CLI is limited to scan targets with the “`container:`” prefix
- Use of the Jenkins plugin is not supported.

Example Analysis

```
java -jar nexus-iq-cli.jar -a username:password -i app -s http://localhost:8070 -t compliance container:nginx:1.27.2
```

Learn more on [Sonatype Container Security](https://help.sonatype.com/en/sonatype-container-security.html "Sonatype Container Security") documentation.

## Merge Multiple SBOMs

When storing multiple SBOMs for a single application, say from various microservices, you may combine them into a single SBOM for the whole release.

This is accomplished with the following workflow:

1. Follow the naming convention for including SBOMs in an archive. [CycloneDX](https://help.sonatype.com/en/cyclonedx.html#identification-source-162461 "Identification Source"), [SPDX](https://help.sonatype.com/en/spdx-application-analysis.html "SPDX Application Analysis")
2. Combine the SBOMs into an archive file such as a `zip` or `tar.gz`
3. Import the archive as a binary analysis

The archive may include a mix of SBOMs as well as the application binaries to generate a single SBOM.
