bifrost CLI
The bifrost CLI is a command-line tool for uploading SBOM (Software Bill of Materials) files to bifrost.
Use it from your workstation, local automation, or CI/CD workflows when you already produce SBOMs as part of your build pipeline.
Prerequisites
Section titled “Prerequisites”Before using the CLI:
- Create an account or sign in to the bifrost portal.
- Create an API token for your organization in the organization settings. In GitHub Actions you can skip this step and authenticate with the workflow’s OIDC token instead.
- Install the CLI for your operating system.
Install
Section titled “Install”Homebrew
Section titled “Homebrew”The easiest way to install the CLI on macOS or Linux is with Homebrew:
brew install bifrostsec/tap/bifrost-cliThis installs the bifrost command. The bifrostsec/tap prefix automatically taps the bifrost Homebrew repository, so no separate brew tap step is needed.
To update an existing Homebrew installation:
brew updatebrew upgrade bifrost-cliDownload a release binary
Section titled “Download a release binary”You can also download the latest released executable from the bifrost-cli releases page.
For example, on macOS with Apple Silicon:
curl -L -o bifrost \ https://github.com/bifrostsec/bifrost-cli/releases/latest/download/bifrost-darwin-arm64chmod +x ./bifrostsudo mv ./bifrost /usr/local/bin/bifrostAvailable release binaries include:
bifrost-darwin-amd64bifrost-darwin-arm64bifrost-linux-amd64bifrost-linux-arm64bifrost-windows-386bifrost-windows-amd64
Windows
Section titled “Windows”- Open the latest bifrost-cli release on GitHub.
- Under Assets, download
bifrost-windows-amd64for 64-bit Windows, orbifrost-windows-386for 32-bit Windows. - Rename the downloaded file to
bifrost.exe. - Open PowerShell in the folder containing
bifrost.exeand verify the installation:
.\bifrost.exe --versionRun the CLI as .\bifrost.exe from that folder. To use bifrost from any directory, move bifrost.exe to a folder on your user PATH, or add its folder to your user PATH in Edit environment variables for your account, then open a new terminal.
Authentication
Section titled “Authentication”The CLI authenticates to bifrost with a bearer token and uses the first credential it finds:
- An API token from
--api-key, theBIFROST_API_KEYenvironment variable, or theapi_keysetting stored bybifrost config. - An access token stored by a
bifrost authcommand. - In GitHub Actions, an access token obtained by exchanging the job’s OIDC token, when an organization id is configured.
API token
Section titled “API token”Set the token with the BIFROST_API_KEY environment variable:
export BIFROST_API_KEY="<your-api-token>"In PowerShell:
$env:BIFROST_API_KEY = '<your-api-token>'.\bifrost.exe --service=my-service --service-version=1.2.3 sbom upload .\sbom.jsonYou can also pass the token with --api-key, or store it in ~/.bifrost/credentials by running bifrost config, which prompts for the token and the server URL.
GitHub Actions OIDC
Section titled “GitHub Actions OIDC”In a GitHub Actions job the CLI can authenticate without a stored secret. It requests the job’s OIDC token with your bifrost organization id as audience and exchanges it for an access token valid for 10 minutes, see Integration API. This requires:
- Your GitHub organization authorized in your bifrost organization.
- The job permission
id-token: write. - Your bifrost organization id passed with
--org-idor theBIFROST_ORG_IDenvironment variable, and no API token set.
The exchange happens automatically when the CLI uploads:
jobs: sbom: runs-on: ubuntu-latest permissions: contents: read id-token: write env: BIFROST_ORG_ID: ${{ vars.BIFROST_ORG_ID }} steps: - uses: actions/checkout@v6 # ... build your application and generate sbom.json ... - run: bifrost --service=my-service --service-version=${{ github.sha }} --git-repo-path=. sbom upload sbom.jsonTo exchange the token once and reuse it in later steps of the job, run bifrost auth github-actions. It exports the access token to the following steps as BIFROST_API_KEY, masked in the log, so nothing is written to disk:
- run: bifrost --org-id ${{ vars.BIFROST_ORG_ID }} auth github-actions- run: bifrost --service=my-service --service-version=${{ github.sha }} sbom upload sbom.jsonbifrost auth token prints the token the CLI would use, for example to pass it to curl. If you upload SBOMs with submit-sbom-action, pass org-id to the action instead, it runs the CLI for you.
OIDC authentication requires bifrost CLI v0.4.0 or later.
Upload an SBOM for a service and version:
bifrost --service=my-service --service-version=1.2.3 sbom upload ./sbom.jsonTo record the uploaded image and automatically detect Git metadata from the current repository, provide the image reference and enable Git detection:
bifrost \ --service=my-service \ --service-version=1.2.3 \ --image=registry.example.org/my-service:1.2.3 \ --git-repo-path=. \ sbom upload ./sbom.jsonYou can upload multiple SBOM files in one command:
bifrost --service=my-service --service-version=1.2.3 sbom upload \ ./sbom-application.cdx.json \ ./sbom-image.cdx.jsonYou can also read an SBOM from standard input by using - as the path:
cat ./sbom.json | bifrost --service=my-service --service-version=1.2.3 sbom upload -Examples
Section titled “Examples”Generate a CycloneDX SBOM for a container image with Trivy and pipe it directly to bifrost:
trivy image --format cyclonedx myapp:1.2.3 \ | bifrost --service=my-service --service-version=1.2.3 sbom upload -Export a repository dependency graph SBOM with the GitHub CLI and pipe the SPDX document to bifrost:
gh api \ -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2026-03-10" \ /repos/OWNER/REPO/dependency-graph/sbom \ --jq '.sbom' \ | bifrost --service=my-service --service-version=1.2.3 sbom upload -Attach Git metadata to the upload request:
bifrost \ --service=my-service \ --service-version=1.2.3 \ --image=registry.example.org/my-service:1.2.3 \ --git-branch=main \ --git-commit-sha=4f5b2d6e8a9c1f0b3d7e6a5c4b2a1908d6e5f4a3 \ --git-origin=https://github.com/example/project.git \ sbom upload ./sbom.json