Use

Export a lockfile SBOM

Export a CycloneDX or SPDX SBOM inventory from apm.lock.yaml.

ht lock export serializes the existing apm.lock.yaml into a CycloneDX 1.5 or SPDX 2.3 document. It is an inventory export, not a security attestation: it reads the lockfile only and never re-resolves, re-hashes, or touches the network.

ht lock export
ht lock export --format cyclonedx -o sbom.json
ht lock export --format spdx | jq '.packages | length'
ht lock export --timestamp 2024-06-01T00:00:00+00:00

Missing lockfile fails closed. Diagnostics go to stderr so ht lock export | jq stays clean. Two runs with the same --timestamp are byte-identical.

This document is unsigned and does not claim SLSA.

Flags

FlagDefaultNotes
--format / -fcyclonedxCycloneDX 1.5 or SPDX 2.3
--output / -ostdoutFile write; stdout stays log-free
--project.Project directory
--global / -goffReads ~/.harnesstap/apm.lock.yaml only if that file already exists
--timestampSOURCE_DATE_EPOCH, then lock generated_atTimezone-aware ISO 8601 for byte-identical reruns

Identity and license

  • Git: pkg:github/owner/repo@sha (or host-appropriate purl)
  • Catalog: pkg:generic/harnesstap/<name>@<version> — no fake OCI
  • Local: pkg:generic/<name>@<content_hash>
  • Credentials (userinfo / query tokens) scrubbed from recorded URLs
  • declared_license from dep manifest license: only (never LICENSE file text). Written by apply/install.
  • Undeclared: CycloneDX omits licenses; SPDX writes NOASSERTION

Output is deterministic: components sorted by purl, pinned timestamp, stable key order.

See also: Lockfile, Command reference.