Skip to content

Warning

You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?

CycloneDX GoMod Generate SBOM

Actions
Github action to generate a CycloneDX SBOM for Go modules
v0.3.0
Star (10)

gh-gomod-generate-sbom

GitHub action to generate a CycloneDX SBOM for Go modules.

This action uses cyclonedx-gomod to generate SBOMs.

Inputs

version

Required The version of cyclonedx-gomod to use. Can be a version range, in which case the latest version matching the range is chosen.

Must either be an existing semantic version (e.g. v0.8.1, 0.8.1), version range or latest.

⚠ Only versions >= v0.8.1 are supported. Specifying versions below that will cause the workflow to fail.

Using latest is generally not recommended and will produce a warning, as it may fail your workflow unexpectedly due to breaking changes in newer cyclonedx-gomod versions. As of v0.3.0, version ranges are supported. Instead of latest, consider using ^v0, ^v0.8 or similar instead.

include-stdlib

Include Go standard library as component and dependency of the module. Default false.

include-test

Include test dependencies. Default false.

json

Output in JSON format. Default false.

module

Path to Go module. Default '.'.

omit-serial-number

Omit serial number. Default false.

omit-version-prefix

Omit "v" version prefix. Default false.

output

Output path. Default '-' (stdout).

reproducible

Make the SBOM reproducible by omitting dynamic content. Default false.

resolve-licenses

Resolve module licenses. Default false.

type

Type of the main component. Default 'application'.

Example usage

- name: Generate SBOM JSON
  uses: CycloneDX/[email protected]
  with:
    json: true
    output: bom.json
    resolve-licenses: true
    version: ^v0

- name: Generate SBOM XML
  uses: CycloneDX/[email protected]
  with:
    output: bom.xml
    resolve-licenses: true
    version: latest

CycloneDX GoMod Generate SBOM is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Github action to generate a CycloneDX SBOM for Go modules
v0.3.0

CycloneDX GoMod Generate SBOM is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.