generate_sbom
Generate a CycloneDX SBOM from package URLs or directory scans for software inventory, vulnerability tracking, and compliance documentation.
Instructions
Generate a Software Bill of Materials (SBOM) in CycloneDX format using purl2notices.
This tool creates comprehensive SBOMs in CycloneDX 1.4 JSON format for software inventory, vulnerability tracking, and compliance documentation.
SBOM includes: name, version, PURL, licenses, homepage (external references). Data is sourced from purl2notices scan mode which provides accurate package metadata.
Use this tool when:
You need to generate an SBOM for a project or package list
Creating inventory documentation for compliance
After analyzing packages and need structured output
Preparing documentation for security audits
Required by procurement or regulatory requirements
Input modes:
Provide
purls(list of Package URLs) for packages you've already identifiedProvide
pathto scan a directory and generate SBOM from discovered packagesAt least one of
purlsorpathmust be provided
Args: purls: Optional list of Package URLs (PURLs) to include in SBOM path: Optional directory path to scan for packages output_file: Optional path to save the SBOM file (CycloneDX JSON format) include_licenses: If True, include license information (default: True)
Returns: Dictionary containing: - sbom: The generated SBOM structure (CycloneDX 1.4 JSON) - packages_count: Number of packages included - output_file: Path to saved file (if output_file was specified)
Examples: # Generate SBOM from PURLs (after batch analysis) generate_sbom( purls=["pkg:npm/express@4.0.0", "pkg:pypi/django@4.2.0"], output_file="/tmp/sbom.json" )
# Generate SBOM by scanning directory
generate_sbom(path="/path/to/project")
# After batch scan workflow
scan_result = check_package("package.jar")
generate_sbom(purls=[scan_result["purl"]], include_licenses=True)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| purls | No | ||
| output_file | No | ||
| include_licenses | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |