Open wagoodman opened 1 year ago
If we have a config switch that allows to legacy behavior we can leverage https://github.com/anchore/go-struct-converter in the same way as done in spdx/tools-golang to support x many versions in the future (where the first would be "legacy" and "current").
dev note: draft branch started at https://github.com/anchore/syft/compare/rename-top-level-json-fields
This should be coordinated with #1419 so we can get the last remaining breaking changes before syft 1.0 in.
I think there is good reason to wait until syft 2.0 to make this change:
this change will break 99% of consumers (ok, not 99% exactly, but a lot of folks for common use cases)
currently we do not bump syft versions with schema versions (where a breaking change in one is a breaking change in another), so folks would not have much warning that this could happen
we are planning to allow for multiple supported encoding versions for the syft-json format in the future, which would be a very nice way to facilitate a controlled fallback for users that want the latest syft capabilities but not the latest schema versions
given the previous point, we could develop breaking changes in a version called dev
and incorporate such breaking schema changes into multiple releases ahead of switching the default schema version that syft outputs
So though we could make this change for syft 1.0, we ought to wait until we implement #846 to make this transition smoother.
Moving back to the backlog since this will land after https://github.com/anchore/syft/issues/846 , which isn't ready yet.
There are a couple of fields that feel like they should be renamed to better represent what they contain:
artifacts
->packages
: the original idea is that this field would be a mix of all nodes in the SBOM graph, however, it's been way more practical to break outfiles
into its own section, and there are no other types.artifactRelationships
->relationships
: given the last point, this just represents relationships between any two nodes, so we don't needartifacts
in the name