Message codes: SBOM fragments¶
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-missing |
WARNING | 'loom merge' (pitloom.assemble.generate_merged_sbom) dates the merged SBOM by SOURCE_DATE_EPOCH, else by the latest created of the fragments' creation info, never by the clock. Neither was there: SOURCE_DATE_EPOCH is not set and every fragment merged states no creation info (an empty @graph, or a file holding []). | 0.25.0 |
fragment-conflict |
WARNING | Two sources of one merged element state different values for a property that holds one value, or for one key of a dictionary property: the project's own element in a project build, or an earlier fragment in the merge order, against a later fragment. Neither value is a respelling of the other (the same JSON, or a path ending in the other). | 0.25.0 |
fragment-digest-invalid |
WARNING | The bytes of a configured SBOM fragment do not have the SHA-256 its sha256 setting in [tool.pitloom.fragment] states: the file changed after the digest was configured, or the digest is of another file. Only 'loom fragment list' checks it; the merge does not. | 0.25.0 |
fragment-hash-conflict |
WARNING | Two elements of one type in the merged document share a name but state different SHA-256 digests: two files of one name with different content, or one artefact whose digest in one source is stale. | 0.25.0 |
fragment-id-conflict |
WARNING | An element a fragment brings has the spdxId of an element already merged but is not that element: one of another type holds the id, or one of the same type whose digests of one algorithm share no value (two artefacts). | 0.25.0 |
fragment-invalid |
WARNING | An SBOM fragment was read but is not one Pitloom can merge. Not valid JSON: a syntax error, bytes that are not UTF-8, UTF-16 or UTF-32, or nesting too deep to parse. Not SPDX 3 JSON-LD Pitloom can merge: JSON the SPDX 3.0.1 bindings do not read (not an object, an unknown property or type, a value of the wrong type), or a number with no RFC 8785 spelling (an integer beyond +-(2**53 - 1), a number past a double), which the merged document could not be written with. | 0.25.0 |
fragment-missing |
ERROR | A merge went without a fragment it needed: configured fragments marked required = true were not merged (not found, not readable, not mergeable, or the project's own document), or 'loom merge' merged none of the *.json files of its directory. A WARNING line before it names each fragment and why. | 0.25.0 |
fragment-unreadable |
WARNING | An SBOM fragment Pitloom was to merge (one configured under [tool.pitloom.fragment], or a *.json file of the directory 'loom merge' reads) is there but could not be read: the operating system refused it (no read permission, a directory where a file was expected, an I/O error). 'loom fragment list' says the same of a configured fragment. | 0.25.0 |
fragment-unusable |
WARNING | A configured SBOM fragment is the document Pitloom is building: its SpdxDocument has the id the project's own SBOM gets, so it is an earlier SBOM of the same project, not a fragment written to enrich it. Merging it would fold the project into itself. | 0.25.0 |
generated-value-conflict |
INFO | A fragment states a value Pitloom generated itself, and the fragment's statement wins, by design: in a project build, a base model's value generated from the model file, or its name, replaced by the one the fragments agree on; or a merged element now holds a value its not_measured provenance entry says was not measured. | 0.25.0 |
reference-not-found |
ERROR, WARNING | After the fragments merged, an element of the merged document names an element that is neither in it nor declared external (an import of its SpdxDocument): a relationship's from or to, an annotation's subject, a collection's rootElement, or a licence expression's customIdToUri in the document's own namespace. Usually a fragment written against an older SBOM of the project, whose element ids have changed since (a Pitloom upgrade, a change to the project's files or name), or one naming an element a fragment left out was to supply. | 0.25.0 |
reference-not-found/dataset |
WARNING | A loom run's add_output_dataset names, in input_datasets, a dataset no add_input_dataset of the same run declared (a typo, or an input declared in another run). | 0.25.0 |
datetime-missing¶
- Level: WARNING.
- Means: 'loom merge' (pitloom.assemble.generate_merged_sbom) dates the merged SBOM by SOURCE_DATE_EPOCH, else by the latest created of the fragments' creation info, never by the clock. Neither was there: SOURCE_DATE_EPOCH is not set and every fragment merged states no creation info (an empty @graph, or a file holding []).
- SBOM effect: weaker: what the SBOM says is less sure.
- Pitloom did: Wrote the SBOM with created set to the date the line names, the start of 1970, which says nothing of when it was made.
- Tell the user: the merged SBOM's creation time is a placeholder, as the line says. They state created in a fragment's CreationInfo (the enrichment that writes it does), or set SOURCE_DATE_EPOCH for the merge, and merge again. Do not edit the fragments or set the environment for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: Merge: no fragment states a creation time; created set to <datetime> [datetime-missing]
fragment-conflict¶
- Level: WARNING.
- Means: Two sources of one merged element state different values for a property that holds one value, or for one key of a dictionary property: the project's own element in a project build, or an earlier fragment in the merge order, against a later fragment. Neither value is a respelling of the other (the same JSON, or a path ending in the other).
- SBOM effect: thinner: the SBOM says less than reading the input would.
- Pitloom did: Kept the value merged first (the project's, else the earlier fragment's) and dropped the other: the SBOM states the kept value; the dropped one is recorded nowhere.
- Tell the user: the SBOM states the kept value and the dropped one is not recorded, as the line says. If the kept value is the wrong one, they fix whichever source is wrong (the project metadata or the fragment) and generate again. Do not edit either for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: Merge: ELEMENT=<spdx-id>: <property> differs; kept <kept>, dropped <dropped> [fragment-conflict]
WARNING: Merge: ELEMENT=<spdx-id>: <property> key <entry-key> differs; kept <kept>, dropped <dropped> [fragment-conflict]
fragment-digest-invalid¶
- Level: WARNING.
- Means: The bytes of a configured SBOM fragment do not have the SHA-256 its sha256 setting in [tool.pitloom.fragment] states: the file changed after the digest was configured, or the digest is of another file. Only 'loom fragment list' checks it; the merge does not.
- SBOM effect: none: the SBOM states what the input holds.
- Pitloom did: Listed the fragment with SHA256=mismatch; the listing goes on, and its exit status does not change.
- Tell the user: the fragment's bytes differ from the configured digest, as the line says. If the change is expected, they set sha256 to the new value; else they restore the fragment that was pinned. Do not change the setting or the file for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: FILE=<file>: SHA-256 <sha256> does not match the configured <declared> [fragment-digest-invalid]
fragment-hash-conflict¶
- Level: WARNING.
- Means: Two elements of one type in the merged document share a name but state different SHA-256 digests: two files of one name with different content, or one artefact whose digest in one source is stale.
- SBOM effect: none: the SBOM states what the input holds.
- Pitloom did: Kept both as separate elements, each with its own digest.
- Tell the user: two elements share a name with different SHA-256 digests, as the line says. If they are one artefact, one source's digest is stale and they generate that source again; if they are two, nothing needs fixing. Do not edit the sources for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: Merge: ELEMENT=<spdx-id>: a '<type>' named <name> has SHA-256 <digest>, another of that name <other-digest>; both kept [fragment-hash-conflict]
fragment-id-conflict¶
- Level: WARNING.
- Means: An element a fragment brings has the spdxId of an element already merged but is not that element: one of another type holds the id, or one of the same type whose digests of one algorithm share no value (two artefacts).
- SBOM effect: weaker: what the SBOM says is less sure.
- Pitloom did: Kept both: the later element gets a new id in the document's namespace (the line names it), and every reference to it follows. The SBOM states both, but the later one's id is not the one its fragment stated.
- Tell the user: a fragment reuses the id of another element, as the line says. They give the fragment's element an id of its own (write the fragment again against the current base SBOM), so the id is stable across runs. Do not edit the fragment for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: Merge: ELEMENT=<spdx-id>: id held by a '<holder-type>', also wanted by a '<type>'; both kept, the later is now <new-id> [fragment-id-conflict]
WARNING: Merge: ELEMENT=<spdx-id>: id held by two '<type>' elements of different <algorithm> digests; both kept, the later is now <new-id> [fragment-id-conflict]
fragment-invalid¶
- Level: WARNING.
- Means: An SBOM fragment was read but is not one Pitloom can merge. Not valid JSON: a syntax error, bytes that are not UTF-8, UTF-16 or UTF-32, or nesting too deep to parse. Not SPDX 3 JSON-LD Pitloom can merge: JSON the SPDX 3.0.1 bindings do not read (not an object, an unknown property or type, a value of the wrong type), or a number with no RFC 8785 spelling (an integer beyond +-(2**53 - 1), a number past a double), which the merged document could not be written with.
- SBOM effect: thinner: the SBOM says less than reading the input would.
- Pitloom did: Merged the SBOM without it and wrote it (the build hook builds the wheel). For a fragment marked required = true (the line says so), the merge then fails with fragment-missing and no SBOM is written. 'loom fragment list' lists the fragment, and exits 1 for a required one.
- Tell the user: which fragment is not usable and why, as the line says. They fix the fragment or write it again (run the enrichment that wrote it); for a configured fragment, 'loom fragment list' reads it as the merge does, so they can check it before the next build. Do not edit the fragment for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: FILE=<file>: SBOM fragment is not valid JSON (<failure>); not merged [fragment-invalid]
WARNING: FILE=<file>: SBOM fragment is not valid JSON (<failure>); required, so the merge will fail [fragment-invalid]
WARNING: FILE=<file>: SBOM fragment is not SPDX 3 JSON-LD Pitloom can merge (<failure>); not merged [fragment-invalid]
WARNING: FILE=<file>: SBOM fragment is not SPDX 3 JSON-LD Pitloom can merge (<failure>); required, so the merge will fail [fragment-invalid]
fragment-missing¶
- Level: ERROR. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
- Means: A merge went without a fragment it needed: configured fragments marked required = true were not merged (not found, not readable, not mergeable, or the project's own document), or 'loom merge' merged none of the *.json files of its directory. A WARNING line before it names each fragment and why.
- SBOM effect: not-written: no SBOM is written for the input.
- Pitloom did: Wrote nothing: no SBOM is written, the command exits 1 (the Action step fails), the build hook fails the build, and the library raises pitloom.assemble.FragmentMergeError (a ValueError) carrying the code.
- Tell the user: which fragments were not merged, as the line names them, and why, as each one's WARNING says. They fix each fragment as that WARNING advises, or, for a required fragment no longer wanted, remove its entry or its required = true, and run again. Do not edit the fragments or the configuration for them; ask first, and with nobody to ask, report it only.
- Lines:
ERROR: <number> required SBOM fragment(s) not merged: <files>; fix each as its WARNING says [fragment-missing]
ERROR: no SBOM fragment in '<path>' could be merged; fix each as its WARNING says [fragment-missing]
fragment-unreadable¶
- Level: WARNING.
- Means: An SBOM fragment Pitloom was to merge (one configured under [tool.pitloom.fragment], or a *.json file of the directory 'loom merge' reads) is there but could not be read: the operating system refused it (no read permission, a directory where a file was expected, an I/O error). 'loom fragment list' says the same of a configured fragment.
- SBOM effect: thinner: the SBOM says less than reading the input would.
- Pitloom did: Merged the SBOM without it and wrote it (the build hook builds the wheel). For a fragment marked required = true (the line says so), the merge then fails with fragment-missing and no SBOM is written. 'loom fragment list' lists the fragment, and exits 1 for a required one.
- Tell the user: which fragment could not be read and why, as the line says. They fix its permissions or its path and run again. Do not change permissions or the configuration for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: FILE=<file>: SBOM fragment could not be read (<failure>); not merged [fragment-unreadable]
WARNING: FILE=<file>: SBOM fragment could not be read (<failure>); required, so the merge will fail [fragment-unreadable]
fragment-unusable¶
- Level: WARNING.
- Means: A configured SBOM fragment is the document Pitloom is building: its SpdxDocument has the id the project's own SBOM gets, so it is an earlier SBOM of the same project, not a fragment written to enrich it. Merging it would fold the project into itself.
- SBOM effect: thinner: the SBOM says less than reading the input would.
- Pitloom did: Merged the SBOM without it and wrote it (the build hook builds the wheel). For a fragment marked required = true (the line says so), the merge then fails with fragment-missing and no SBOM is written. 'loom fragment list' lists the fragment, and exits 1 for a required one.
- Tell the user: the configured path names an SBOM of the project itself, as the line says. They point the entry at the fragment the enrichment wrote, not at a generated SBOM of the project, and run again. Do not edit the configuration for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: FILE=<file>: SBOM fragment is the document being merged into (<spdx-id>); not merged [fragment-unusable]
WARNING: FILE=<file>: SBOM fragment is the document being merged into (<spdx-id>); required, so the merge will fail [fragment-unusable]
generated-value-conflict¶
- Level: INFO.
- Means: A fragment states a value Pitloom generated itself, and the fragment's statement wins, by design: in a project build, a base model's value generated from the model file, or its name, replaced by the one the fragments agree on; or a merged element now holds a value its not_measured provenance entry says was not measured.
- SBOM effect: none: the SBOM states what the input holds.
- Pitloom did: Kept the fragment's value and dropped the generated one, or dropped the not_measured provenance entry that no longer holds; the SBOM states what the fragments state.
- Nothing to do: Nothing to fix: a fragment is how a user states what Pitloom cannot read, and the line reports the replacement. Mention it only when the user asks where a value came from.
- Lines:
INFO: Merge: ELEMENT=<spdx-id>: <property> generated from the model file replaced by a fragment's; kept <kept>, dropped <dropped> [generated-value-conflict]
INFO: Merge: ELEMENT=<spdx-id>: name replaced by the one the fragments agree on; kept <kept>, dropped <dropped> [generated-value-conflict]
INFO: Merge: ELEMENT=<spdx-id>: <property> now holds a value; dropped its not_measured provenance of <provenance-field> [generated-value-conflict]
reference-not-found¶
- Level: ERROR, WARNING. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
- Means: After the fragments merged, an element of the merged document names an element that is neither in it nor declared external (an import of its SpdxDocument): a relationship's from or to, an annotation's subject, a collection's rootElement, or a licence expression's customIdToUri in the document's own namespace. Usually a fragment written against an older SBOM of the project, whose element ids have changed since (a Pitloom upgrade, a change to the project's files or name), or one naming an element a fragment left out was to supply.
- SBOM effect: not-written: no SBOM is written for the input.
- Pitloom did: Said each reference as a WARNING, then wrote nothing: no SBOM is written, the command exits 1, the build hook fails the build and the library raises pitloom.assemble.FragmentMergeError carrying the code.
- Tell the user: which references name nothing, as the WARNING lines say. They regenerate the base SBOM, run the enrichment again against it, and merge again; the same merge run again fails the same way. Do not write or change an ID registry to make the ids match, and do not edit the fragments for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: Merge: ELEMENT=<spdx-id>: <property> names <reference>, which is not in the merged document; regenerate the base SBOM, then run the enrichment again [reference-not-found]
ERROR: <number> reference(s) to elements not in the merged document; regenerate the base SBOM, then run the enrichment again [reference-not-found]
reference-not-found/dataset¶
- Level: WARNING.
- Means: A loom run's add_output_dataset names, in input_datasets, a dataset no add_input_dataset of the same run declared (a typo, or an input declared in another run).
- SBOM effect: thinner: the SBOM says less than reading the input would.
- Pitloom did: Linked the output dataset to the inputs it names that were declared, not to this one; the fragment is written.
- The caller may fix: The caller may declare the input with add_input_dataset in the same run, or correct the name in input_datasets, and run again.
- Lines:
WARNING: loom SDK: add_output_dataset('<dataset>') names input_datasets='<dataset-input>', which no add_input_dataset of this run declared; not linked [reference-not-found/dataset]
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 enrich' wrote a fragment, not an SBOM of the project: to merge it, the user adds it to [tool.pitloom.fragment] and builds the project's SBOM again.
INFO: enrich: register the fragment under [tool.pitloom.fragment] and re-run 'loom project'/'loom generate' to merge it into a base SBOM
- 'loom fragment list' found no [tool.pitloom.fragment] entry in the project's pyproject.toml (none, or an empty list), so it lists nothing.
INFO: fragment list: no fragments configured
- 'loom fragment validate' found every document it was given valid against the SPDX 3 schema and SHACL shapes.
INFO: fragment validate: <number> document(s) valid
- 'loom merge' wrote the SBOM from this many fragments of the directory; one it could not merge is not counted (its WARNING line says why).
INFO: merge: merged <number> fragment(s)