CycloneDX 1.6 JSON bill of materials (--sbom or --format cyclonedx).
Lists every locked package with its package URL, scope (required for
the production closure, excluded otherwise) and lockfile checksum, the
dependency graph, and the matched advisories with a CycloneDX analysis
block derived from the reachability verdict.
Output is reproducible: the timestamp is the report's generated_at and
the serial number is derived from the document content, unless they are
given with the :timestamp and :serial_number options.
Summary
Functions
CycloneDX analysis block of a finding.
References of locked components, including distinct lock aliases of the same package.
The bill of materials as plain maps.
Encodes the bill of materials. Options: :timestamp (ISO-8601) and
:serial_number (urn:uuid:...).
Package URL of a locked package.
Reference of the scanned project and the scope of the analysis.
Functions
@spec analysis(VulnCheck.Types.Finding.t()) :: map()
CycloneDX analysis block of a finding.
@spec component_refs(VulnCheck.Types.Workspace.t() | nil) :: %{ required(String.t()) => String.t() }
References of locked components, including distinct lock aliases of the same package.
@spec document(VulnCheck.Types.ScanReport.t(), VulnCheck.Config.t(), keyword()) :: map()
The bill of materials as plain maps.
@spec encode(VulnCheck.Types.ScanReport.t(), VulnCheck.Config.t(), keyword()) :: String.t()
Encodes the bill of materials. Options: :timestamp (ISO-8601) and
:serial_number (urn:uuid:...).
@spec purl(VulnCheck.Types.Package.t()) :: String.t()
Package URL of a locked package.
iex> VulnCheck.Report.CycloneDX.purl(%VulnCheck.Types.Package{name: "ash", version: "3.34.2", source: :hex, scope: :prod})
"pkg:hex/ash@3.34.2"
@spec root_ref(VulnCheck.Types.ScanReport.t() | VulnCheck.Types.Workspace.t() | nil) :: String.t()
Reference of the scanned project and the scope of the analysis.