sbomasm icon indicating copy to clipboard operation
sbomasm copied to clipboard

Feature: Allow `assemble` version override based on flag when using config

Open matglas opened this issue 1 year ago • 3 comments

It would be great if you could override or set the version of the main component when you do sbomasm assemble -v [X.Y.Z] -c [config]. This allows you to set default in config but make them specific in your CI for example base on input variables.

matglas avatar Dec 10 '24 12:12 matglas

Have u taken a look at https://github.com/interlynk-io/sbomasm?tab=readme-ov-file#edit-sboms, or is this something that if available in assemble would be better?

riteshnoronha avatar Dec 12 '24 04:12 riteshnoronha

I have seen the edit functionality and its great. It would be a convenience to have the primary component version set the moment that you assemble it.

matglas avatar Dec 12 '24 09:12 matglas

Current functionality: We can override the default values from the config file, but there’s a strict requirement to provide all three values in the group: "name," "type," and "version." If we try to override just one value (e.g., "version"), the command enforces providing the other two values as well, which is restrictive.

For example:

$ sbomasm assemble -v "v1.0.20" -c config.yaml -o final-sbom-config.spdx.json sbomex-cdx.json sbomgr-cdx.json
Error: if any flags in the group [name version type] are set they must all be set; missing [name type]

Our desired functionality is: When a config.yaml file is provided, users should have the flexibility to override any individual field (e.g., just "version") without being required to provide all the other grouped fields.

viveksahu26 avatar Jan 01 '25 07:01 viveksahu26