Skip to content
shield

GitHub Action

Generate SBOM

v1 Latest version

Generate SBOM

shield

Generate SBOM

Generate an SBOM via the REST API

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Generate SBOM

uses: advanced-security/generate-sbom-action@v1

Learn more about this action in advanced-security/generate-sbom-action

Choose a version

test status

Generate SBOM Action

This action uses the REST API call to generate the SBOM for the repo (on the default branch). You can then use the fileName output to upload the file as an artifact.

Usage

You can use the workflow as follows:

gen-sbom:
  runs-on: ubuntu-latest
  steps:
  - uses: actions/checkout@v3
  - uses: advanced-security/generate-sbom-action@v1
    id: gensbom
  - uses: actions/upload-artifact@v3
    with:
      name: sbom
      path: ${{ steps.gensbom.outputs.fileName }}