Skip to content

Message codes: Embedded SBOMs

See also: Message codes (the index of every code) and Messages and codes (the line grammar, what a code guarantees and when to trust one).

Trust a code only when the line is one of the lines below, a value in place of each <name>, after at most one prefix: the index lists the prefixes and message-codes-values.md the values.

Codes

Code Level Means Since
datetime-not-recordable INFO The SBOM's creation time (--creation-datetime, else SOURCE_DATE_EPOCH) is before 1980, which a ZIP archive cannot record as a member's date (SOURCE_DATE_EPOCH=0 is the usual case). 0.25.0
sbom-name-conflict ERROR The build hook's SBOM file name is also, ignoring letter case, the name of an SBOM Hatchling already places under .dist-info/sboms/ (an sbom-files entry, often a 'loom project' output of the same default name): one would overwrite the other, on a case-insensitive file system too. 0.25.0
wheel-sbom-ambiguous ERROR A wheel holds several SBOMs under its own .dist-info/sboms/ (PEP 770 allows any number) and the command was not told which one to check. 0.25.0
wheel-sbom-conflict ERROR, WARNING An SBOM embedded in a wheel, or given to embed (embed-wheel --sbom), names a subject whose name or version differs from the wheel's own METADATA, compared as the ecosystem compares them (PEP 503 names, PEP 440 versions): an SBOM of another package or release. One line per part that differs. 0.25.0
wheel-sbom-conflict/held WARNING, INFO An embed found another Pitloom SBOM already under the wheel's .dist-info/sboms/. One of type build or analyzed for the wheel's own name and version is the one the new embed supersedes; any other (a design or source SBOM, or one of another release) was shipped on purpose. 0.25.0
wheel-sbom-missing ERROR A wheel to verify or validate has no SBOM under its own .dist-info/sboms/ (PEP 770), or none of the file name given as --sbom-filename. Only a direct child of sboms/ is an embedded SBOM. 0.25.0
wheel-sbom-unusable WARNING A check of an embedded SBOM, or of one given to embed, could not be made: its format is not one Pitloom recognises (only SPDX 3 JSON-LD is; a CycloneDX file is not), so its extension is not checked or no validator runs; or its subject's name and version cannot be compared with the wheel's METADATA (PEP 503 names, PEP 440 versions): a side states none, a version is not a PEP 440 version, or the SBOM has no SpdxDocument whose rootElement leads (through a software_Sbom) to a software_Package or ai_AIPackage. Only the first rootElement is followed. 0.25.0
wheel-sbom-wrong-format WARNING An SBOM embedded in a wheel is in a format Pitloom recognises (SPDX 3 JSON-LD) but its file name does not end in that format's recommended extension (.spdx3.json), which tools that look for an SBOM by name go by. 0.25.0

datetime-not-recordable

  • Level: INFO.
  • Means: The SBOM's creation time (--creation-datetime, else SOURCE_DATE_EPOCH) is before 1980, which a ZIP archive cannot record as a member's date (SOURCE_DATE_EPOCH=0 is the usual case).
  • SBOM effect: none: the SBOM states what the input holds.
  • Pitloom did: Dated the embedded SBOM's ZIP entry 1980-01-01; the SBOM's own created keeps the date given, so the wheel is still reproducible.
  • Nothing to do: The line says why the entry's date and the SBOM's created differ; mention it only when the user asks about the dates.
  • Lines:
INFO: ARCHIVE='<archive>': SBOM entry dated 1980-01-01, the earliest a ZIP archive can record; the SBOM's created keeps the true date [datetime-not-recordable]

sbom-name-conflict

  • Level: ERROR. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
  • Means: The build hook's SBOM file name is also, ignoring letter case, the name of an SBOM Hatchling already places under .dist-info/sboms/ (an sbom-files entry, often a 'loom project' output of the same default name): one would overwrite the other, on a case-insensitive file system too.
  • SBOM effect: not-written: no SBOM is written for the input.
  • Pitloom did: Wrote nothing: the build hook fails the build.
  • Tell the user: the two SBOM names collide, as the line says. They set [tool.pitloom] sbom-basename to another name, or drop the sbom-files entry, and build again. Do not edit the configuration for them; ask first, and with nobody to ask, report it only.
  • Lines:
ERROR: FILE=<file>: also the name, ignoring case, of sbom-files entry '<path>'; set another sbom-basename in [tool.pitloom] or drop the entry [sbom-name-conflict]

wheel-sbom-ambiguous

  • Level: ERROR. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
  • Means: A wheel holds several SBOMs under its own .dist-info/sboms/ (PEP 770 allows any number) and the command was not told which one to check.
  • SBOM effect: none: the SBOM states what the input holds.
  • Pitloom did: Checked none of them: the wheel is reported failed and the command exits 1; the library (find_embedded_sbom) raises ValueError carrying the code.
  • The caller may fix: The caller may run again with --sbom-filename naming one of the files the line lists, once for each SBOM to check.
  • Lines:
ERROR: ARCHIVE='<archive>': <number> SBOMs under .dist-info/sboms/ (<members>); pass --sbom-filename [wheel-sbom-ambiguous]

wheel-sbom-conflict

  • Level: ERROR, WARNING. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
  • Means: An SBOM embedded in a wheel, or given to embed (embed-wheel --sbom), names a subject whose name or version differs from the wheel's own METADATA, compared as the ecosystem compares them (PEP 503 names, PEP 440 versions): an SBOM of another package or release. One line per part that differs.
  • SBOM effect: weaker: what the SBOM says is less sure.
  • Pitloom did: As a WARNING (verify-wheel; embed-wheel with --allow-mismatch), went on: the status and exit status do not change. As an ERROR (verify-wheel --fail-on-mismatch: the wheel is reported failed and the command exits 1; embed-wheel --sbom: nothing is written, the command exits 1 and the library raises ValueError carrying the code).
  • Tell the user: the SBOM is not of this wheel, as the line says. They regenerate the SBOM for this wheel (or embed the right one) and run again; in CI, verify-wheel --fail-on-mismatch keeps a mismatch from passing. Do not pass --allow-mismatch or regenerate the SBOM for them; ask first, and with nobody to ask, report it only.
  • Lines:
WARNING: ARCHIVE='<archive>': SBOM <part> <sbom-value> differs from the wheel's METADATA <wheel-value> [wheel-sbom-conflict]
ERROR: ARCHIVE='<archive>': SBOM <part> <sbom-value> differs from the wheel's METADATA <wheel-value> [wheel-sbom-conflict]

wheel-sbom-conflict/held

  • Level: WARNING, INFO.
  • Means: An embed found another Pitloom SBOM already under the wheel's .dist-info/sboms/. One of type build or analyzed for the wheel's own name and version is the one the new embed supersedes; any other (a design or source SBOM, or one of another release) was shipped on purpose.
  • SBOM effect: none: the SBOM states what the input holds.
  • Pitloom did: The INFO line: removed the earlier SBOM from the rewritten wheel (and from RECORD). The WARNING: kept the other SBOM beside the new one; the wheel now holds both.
  • Tell the user: Tell the user, after a WARNING only, that the wheel holds another SBOM, as the line says; if it is stale, they remove it and embed again. After the INFO line there is nothing to do. Do not remove an SBOM for them; ask first, and with nobody to ask, report it only.
  • Lines:
WARNING: ARCHIVE='<archive>' ENTRY='<member>': a Pitloom SBOM, not a build or analyzed one of this wheel's name and version; kept [wheel-sbom-conflict/held]
INFO: ARCHIVE='<archive>' ENTRY='<member>': an earlier Pitloom SBOM of this wheel; removed [wheel-sbom-conflict/held]

wheel-sbom-missing

  • Level: ERROR. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
  • Means: A wheel to verify or validate has no SBOM under its own .dist-info/sboms/ (PEP 770), or none of the file name given as --sbom-filename. Only a direct child of sboms/ is an embedded SBOM.
  • SBOM effect: none: the SBOM states what the input holds.
  • Pitloom did: Reported the wheel as failed (STATUS=failed); a batch goes on with the next wheel and the command exits 1.
  • Tell the user: the wheel carries no SBOM where PEP 770 puts it, as the line says. They embed one ('loom embed-wheel', 'loom wheel --embed', or the build hook) and check again, or give the right --sbom-filename. Do not embed for them; ask first, and with nobody to ask, report it only.
  • Lines:
ERROR: ARCHIVE='<archive>': no SBOM under .dist-info/sboms/ [wheel-sbom-missing]
ERROR: ARCHIVE='<archive>': no SBOM under .dist-info/sboms/ named '<sbom-filename>' [wheel-sbom-missing]

wheel-sbom-unusable

  • Level: WARNING.
  • Means: A check of an embedded SBOM, or of one given to embed, could not be made: its format is not one Pitloom recognises (only SPDX 3 JSON-LD is; a CycloneDX file is not), so its extension is not checked or no validator runs; or its subject's name and version cannot be compared with the wheel's METADATA (PEP 503 names, PEP 440 versions): a side states none, a version is not a PEP 440 version, or the SBOM has no SpdxDocument whose rootElement leads (through a software_Sbom) to a software_Package or ai_AIPackage. Only the first rootElement is followed.
  • SBOM effect: weaker: what the SBOM says is less sure.
  • Pitloom did: Skipped that check, never counting it as a mismatch: verify-wheel and embed-wheel go on, validate-wheel reports the wheel as skipped (STATUS=skipped), and no exit status changes.
  • Tell the user: which check was not made and why, as the line says; the wheel and its SBOM may still disagree. If the SBOM is theirs, they regenerate it in SPDX 3 JSON-LD with the package as its subject. Do not edit the SBOM for them; ask first, and with nobody to ask, report it only.
  • Lines:
WARNING: ARCHIVE='<archive>' ENTRY='<member>': SBOM format not recognised; extension not checked [wheel-sbom-unusable]
WARNING: ARCHIVE='<archive>' ENTRY='<member>': no validator for the SBOM's format; not validated [wheel-sbom-unusable]
WARNING: ARCHIVE='<archive>': SBOM name and version not cross-checked: the wheel's METADATA states neither [wheel-sbom-unusable]
WARNING: ARCHIVE='<archive>': SBOM <part> not cross-checked: the wheel's METADATA states none [wheel-sbom-unusable]
WARNING: ARCHIVE='<archive>': SBOM <part> not cross-checked: the SBOM's subject states none [wheel-sbom-unusable]
WARNING: ARCHIVE='<archive>': SBOM <part> not cross-checked: neither the wheel's METADATA nor the SBOM's subject states one [wheel-sbom-unusable]
WARNING: ARCHIVE='<archive>': SBOM version not cross-checked: the wheel's METADATA version <wheel-value> is not a PEP 440 version [wheel-sbom-unusable]
WARNING: ARCHIVE='<archive>': SBOM version not cross-checked: the SBOM's version <sbom-value> is not a PEP 440 version [wheel-sbom-unusable]
WARNING: ARCHIVE='<archive>': SBOM name and version not cross-checked: the SBOM is not SPDX 3 JSON-LD [wheel-sbom-unusable]
WARNING: ARCHIVE='<archive>': SBOM name and version not cross-checked: the SBOM has no SpdxDocument [wheel-sbom-unusable]
WARNING: ARCHIVE='<archive>': SBOM name and version not cross-checked: the SpdxDocument has no usable rootElement [wheel-sbom-unusable]
WARNING: ARCHIVE='<archive>': SBOM name and version not cross-checked: the software_Sbom has no usable rootElement [wheel-sbom-unusable]
WARNING: ARCHIVE='<archive>': SBOM name and version not cross-checked: the SBOM's subject is of type <sbom-value>, not a package [wheel-sbom-unusable]

wheel-sbom-wrong-format

  • Level: WARNING.
  • Means: An SBOM embedded in a wheel is in a format Pitloom recognises (SPDX 3 JSON-LD) but its file name does not end in that format's recommended extension (.spdx3.json), which tools that look for an SBOM by name go by.
  • SBOM effect: none: the SBOM states what the input holds.
  • Pitloom did: Verified the rest; the wheel's status and the exit status do not change.
  • Tell the user: the embedded SBOM's name lacks its recommended extension, as the line says. They embed it again under a name ending in that extension (embed-wheel --sbom-basename), if tools that read it need one. Do not re-embed for them; ask first, and with nobody to ask, report it only.
  • Lines:
WARNING: ARCHIVE='<archive>' ENTRY='<member>': SBOM does not end in <extension>, its format's recommended extension [wheel-sbom-wrong-format]

Summaries

A summary is an INFO: line that reports what a run did under its own rule (a count, the key it wrote), with no condition to name: it carries no code, and there is nothing to do.

  • loom validate-wheel found every wheel's embedded SBOM valid (schema and SHACL).
INFO: validate-wheel: <number> wheel(s) valid
  • loom validate-wheel found no invalid SBOM, but could not validate some, their format having no validator (a wheel-sbom-unusable WARNING names each).
INFO: validate-wheel: <number> wheel(s) valid, <skipped> skipped (no validator for their format)
  • loom verify-wheel found every wheel's SBOM where PEP 770 puts it; the WARNING lines before it, if any, say what else it found.
INFO: verify-wheel: <number> wheel(s) OK