VulnCheck.Report.CycloneDX (VulnCheck v1.0.1)

Copy Markdown View Source

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

analysis(f)

@spec analysis(VulnCheck.Types.Finding.t()) :: map()

CycloneDX analysis block of a finding.

component_refs(arg1)

@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.

document(report, config, opts \\ [])

The bill of materials as plain maps.

encode(report, config, opts \\ [])

Encodes the bill of materials. Options: :timestamp (ISO-8601) and :serial_number (urn:uuid:...).

purl(pkg)

@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"

root_ref(report)

Reference of the scanned project and the scope of the analysis.