Skip to content

Commit

Permalink
changed link to wiki docs
Browse files Browse the repository at this point in the history
Signed-off-by: Artemii Fedotov <[email protected]>
  • Loading branch information
Makefolder committed Nov 1, 2024
1 parent f74c121 commit 81b3a26
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
25 changes: 0 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,31 +120,6 @@ Where the `formats` available are:

Note that flags using the @<version> can be used for earlier versions of each specification as well.

## Format conversion (experimental)

The ability to convert existing SBOMs means you can create SBOMs in different formats quickly, without the need to regenerate the SBOM from scratch, which may take significantly more time.

```sh
syft convert [SOURCE-SBOM] -o [FORMAT] [flags]
```

This feature is experimental and data might be lost when converting formats. Packages are the main SBOM component easily transferable across formats, whereas files and relationships, as well as other information Syft doesn't support, are more likely to be lost.
We support formats with wide community usage AND good encode/decode support by Syft. The supported formats are:

- Syft JSON (```-o syft-json```)
- SPDX 2.2 JSON (```-o spdx-json```)
- SPDX 2.2 tag-value (```-o spdx-tag-value```)
- CycloneDX 1.4 JSON (```-o cyclonedx-json```)
- CycloneDX 1.4 XML (```-o cyclonedx-xml```)

Conversion example:

```sh
syft convert img.syft.json -o spdx-json # convert a syft SBOM to spdx-json, output goes to stdout
syft convert img.syft.json -o cyclonedx-json=img.cdx.json # convert a syft SBOM to CycloneDX, output is written to the file img.cdx.json
syft convert - -o spdx-json # convert an SBOM from STDIN to spdx-json
```

### Supported Ecosystems

- Alpine (apk)
Expand Down
2 changes: 1 addition & 1 deletion cmd/syft/internal/commands/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func Convert(app clio.Application) *cobra.Command {
return app.SetupCommand(&cobra.Command{
Use: "convert [SOURCE-SBOM] -o [FORMAT]",
Short: "Convert between SBOM formats",
Long: "[Experimental] Convert SBOM files to, and from, SPDX, CycloneDX and Syft's format. For more info about data loss between formats see https://github.com/anchore/syft/tree/main?tab=readme-ov-file#format-conversion-experimental",
Long: "[Experimental] Convert SBOM files to, and from, SPDX, CycloneDX and Syft's format. For more info about data loss between formats see https://github.com/anchore/syft/wiki/format-conversion",
Example: internal.Tprintf(convertExample, map[string]interface{}{
"appName": id.Name,
"command": "convert",
Expand Down

0 comments on commit 81b3a26

Please sign in to comment.