Skip to content

    Type a page, a command such as keryn scan, or a rule id.

    keryn sbom

    Describes Keryn 0.5.2 and keryn-rules 0.8.0. Changelog

    View as Markdown

    Dependency SBOM: every locked package with purl, licence and graph, CycloneDX 1.6 or SPDX 2.3 (no rules, offline).

    keryn sbom [path]
    Usage: keryn sbom [path] [--format cyclonedx|spdx] [-o <file>] [--subject <name>] [--revision <id>] [--timestamp <iso|now>] [--no-ignore] [-q]
    Lists the tree as keryn scan does (.gitignore honoured, .git and node_modules skipped), reads only the lockfiles and the
    package metadata that carries licences, and writes every locked package (purl, version, scope, direct, licence as an SPDX
    expression where one is declared, the lockfiles) and the dependency graph each lockfile records. CycloneDX 1.6 JSON by
    default, SPDX 2.3 JSON with --format spdx; stdout unless -o. The AI-BOM (keryn bom) lists AI components only.
    No rules run, no advisory is matched, nothing is sent. Lockfiles up to 64 MiB are read. A full keryn scan writes
    the same document as one of its outputs (keryn scan --help, Outputs).
    Exit 0 written; 3 no lockfile found, or a lockfile too large to read (the SBOM is written, but incomplete); 2 usage.
    Terminal window
    # CycloneDX 1.6 SBOM of every locked dependency.
    keryn sbom . -o sbom.cdx.json
    # The same as SPDX 2.3.
    keryn sbom . --format spdx -o sbom.spdx.json
    Code Meaning
    0 written
    2 usage error
    3 no lockfile found, or a lockfile too large to read: the SBOM is incomplete