A GitHub Action that submits Software Bill of Materials (SBOM) files to the bifrost API to analyze your services for known vulnerabilities and security risks.
- A bifrost organization and service set up to receive SBOMs. See Get started for more information.
- A valid bifrost API token. Navigate to your organization settings and create a new token under API access tokens.
- An SBOM file generated by your build process
- GitHub repository with Actions enabled
name: build
on:
pull_request:
jobs:
build:
name: Build and submit SBOM
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v6
- name: Build code
run: make build
- name: Generate SBOM
run: # execute tool that generates SBOM output to file
- name: Send SBOM to bifrost
uses: bifrostsec/submit-sbom-action@v1
with:
api-token: ${{ secrets.BIFROST_API_TOKEN }}
service: 'my-service'
service-version: 'v1.0.0'
image: 'my-org/my-service:latest'
sbom-path: 'build/sbom.spdx'name: build
on:
pull_request:
jobs:
build:
name: Build and submit SBOM
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v6
- name: Build code
run: make build
# Generate SBOM using anchore/sbom-action (syft)
- name: Generate SBOM
uses: anchore/sbom-action@v0.21.1
with:
path: .
format: spdx-json
output-file: build/sbom.spdx
- name: Send SBOM to bifrost
uses: bifrostsec/submit-sbom-action@v1
with:
api-token: ${{ secrets.BIFROST_API_TOKEN }}
service: 'my-service'
service-version: 'v1.0.0'
image: 'my-org/my-service:latest'
sbom-path: 'build/sbom.spdx'The action includes automatic retry logic for handling transient network errors. You can customize the retry behavior:
- name: Send SBOM to bifrost
uses: bifrostsec/submit-sbom-action@v1
with:
api-token: ${{ secrets.BIFROST_API_TOKEN }}
service: 'my-service'
service-version: 'v1.0.0'
image: 'my-org/my-service:latest'
sbom-path: 'build/sbom.spdx'
retry-attempts: '5'
retry-delay: '10'Note: If you want the workflow to continue even if this action fails, you can use GitHub's built-in continue-on-error setting. See the GitHub Actions workflow syntax documentation for more information.
| Input | Description | Required | Default |
|---|---|---|---|
api-token |
Bearer token for Bifrost API authentication | Yes | - |
service |
Your Service name | Yes | - |
service-version |
Your Service version | Yes | - |
sbom-path |
Path to the SBOM file to submit | Yes | - |
image |
Container image name | No | - |
retry-attempts |
Number of retry attempts for failed requests | No | 3 |
retry-delay |
Delay in seconds between retry attempts | No | 5 |
This action does not provide explicit output values. Instead, it uses GitHub Actions' standard exit behavior:
- On successful SBOM submission, the action completes successfully
- On failure, the action fails and stops the workflow (unless
continue-on-erroris set)
This action submits SBOMs to the Bifrost API using the following endpoint:
POST https://portal.bifrostsec.com/api/v2/service/{service}/version/{version}/sbom?image={image}
The request includes:
Authorization: Bearer {api-token}headerContent-Type: application/jsonheader- SBOM file contents as the request body
Read the bifrost API documentation for more details on authentication and request formats.
Always store your bifrost API token as a GitHub Secret:
- Go to your repository Settings > Secrets and variables > Actions
- Click "New repository secret"
- Name:
BIFROST_API_TOKEN - Value: Your bifrost API token
- Click "Add secret"
Never hardcode API tokens in your workflow files or commit them to your repository.
Error: Error: SBOM file not found at build/sbom.spdx
Solution: Ensure your SBOM generation step runs before this action and outputs to the correct path. Check that the path specified in sbom-path matches where your SBOM is generated.
Error: Failed to submit SBOM (HTTP 401)
Solution:
- Verify your API token is correct and not expired
- Check that the secret is properly configured in GitHub
Error: Failed to submit SBOM (HTTP 400)
Error Message: Unknown SBOM format: must be either 'SPDX' or 'CycloneDX'
Solution:
- Verify your SBOM file is in a format accepted by bifrost (SPDX or CycloneDX). See documentation SBOM Formats
- Check the SBOM file is valid JSON
This action follows semantic versioning. When using this action, you can specify:
@v1- Latest v1.x.x release (recommended for most users)@v1.0.0- Specific version for maximum stability@main- Latest development version (not recommended for production)
This project is licensed under the MIT License - see the LICENSE file for details.
- Anchore SBOM Action - Generate SBOMs
- Syft - CLI tool for generating SBOMs
- CycloneDX - SBOM standard
- SPDX - SBOM standard