Skip to content

Refresh

Refresh #48

Workflow file for this run

name: Generate SBOM
on:
workflow_dispatch:
push:
# branches:
# - 'master'
# - 'releases/**'
# - 'CXX**'
jobs:
configure-and-scan:
permissions:
id-token: write # Required to request a json web token (JWT) for keyless authentication with Endor Labs
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v6
with:
submodules: recursive
- name: Configure CMake and fetch dependency sources
env:
BUILD_TYPE: Release
BUILD: ${{github.workspace}}/build
CXX_STANDARD: 17
working-directory: ${{env.BUILD}}
run: cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_STANDARD=${{env.CXX_STANDARD}} -DENABLE_TESTS=ON
- name: Install endorctl and Scan with Endor Labs
uses: endorlabs/github-action@519df81de5f68536c84ae05ebb2986d0bb1d19fc # v1.1.8
with:
additional_args: "--languages=c --exclude-path=\"build/CMakeFiles/**\""
log_level: info
log_verbose: false
namespace: mongodb.${{github.repository_owner}}
pr: false
scan_dependencies: true
tags: github_action
env:
ENDOR_SCAN_EMBEDDINGS: true
- name: Set up Python 3.10
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: '3.10'
- uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4
with:
python-version: "3.10"
activate-environment: true
- name: Install dependencies
run: uv sync --group make_release
- name: generate_sbom.py
run: uv run etc/sbom/generate_sbom.py --target=branch --sbom-metadata=etc/sbom/metadata.cdx.json