Generate a software bill of materials
codeinspectus_generate_sbomGenerate a CycloneDX or SPDX SBOM for a project to inventory dependencies offline; uses Trivy plus Pub lockfiles, falls back to native Pub, and returns the file path and component count.
Instructions
Generate a CycloneDX or SPDX SBOM for the target project using Trivy plus the first-party offline Pub lockfile inventory, with native Pub fallback when Trivy is unavailable. Writes the SBOM file to the chosen output path and returns its location and component count. Offline.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the project to generate an SBOM for. | |
| format | No | SBOM format (default: cyclonedx). | |
| output_path | No | Absolute .json path for the SBOM. An existing file is replaced only if it is already a CycloneDX/SPDX SBOM. Default: ~/.codeinspectus/sbom/<project>.<fmt>.json. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| format | Yes | ||
| offline | Yes | ||
| generated | Yes | ||
| providers | Yes | ||
| ecosystems | Yes | ||
| limitations | Yes | ||
| output_path | Yes | ||
| coverage_state | Yes | ||
| component_count | Yes | ||
| lockfiles_analyzed | Yes |