docs: ADR-0008 storage and retrieval without modification #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
8. SBOM storage/retrieval without modification
Date: 2024-10-16
Status
Proposed
Context
Documents imported into/exported by bomctl may have signatures associated with them, and we should support a way for users
to import an sbom and export the sbom in its' original form so that previous signatures can be validated. This is especially
true for documents that were not modified by the user while stored in the cache and are exported in the original format
they were imported in.
Decision
Storage
The storage in original format portion of this ADR is already implemented. Current behavior for all sbom documents added to the
local cache is to store the original document bytes as a unique annotation. Similarly, the original format of the sbom is stored
as a unique annotation at the time that its added to the cache.
Outstanding Updates:
Optional improvements:
Retrieval
TLDR:
desired format matches origin format.
--original
flag to export or push cmd, the original document content will be used regardless ifthe document had been altered in the cache or a different format is requested. (maybe we have a 'original' format type?)
Some Scenarios:
Context: A user imported multiple documents and then exports/pushes them with varying document states.
--original
flag, all documents will be exported as their original contentin their original format.
original format of the document, else will be exported as the format specified by the command.
--original
flag, all documents will be exported as their original contentin their original format.
original format of the document, else will be exported as the format specified by the command.
--original
flag, all documents will be exported as their original contentin their original format.
--original
Questions:
If a cyclonedx 1.5 document is imported, and user requests an export of a cyclonedx 1.6 formatted document which is unmodified, would we:
--original
flagIf a cyclonedx xml document is imported, and user requests an export of a cyclonedx json document which is unmodified, would we:
Consequences
--original
ignores and modifications made in bomctl and will not be reflected in exported document.