-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] option to generate reproducible output #227
Comments
Pull requests are welcome. Please review the existing tests, as they are intended to build identical results already. |
@jkowalleck: Do you have a preference for whether the model uses sorted sets, or if the output classes sort while generating output? |
FYI: The tests understandably ignore a few things when comparing outputs, namely the timestamp, serialNumber, ordering (JSON sorts before comparing, XML does XML comparison), and tool version. |
my experience from other CycloneDX tools that have a feature to generate reproducible results, the following should be requirement/acceptance-criteria
Making output consistent is a non-standard feature, since it takes extra effort. here is an example from the JavaScript implementation that got a reproducibility-feature lately: |
I've had a look at various ways of doing this by sorting the output, and think I've settled on (initially) replacing I won't look to check BomRef yet - but I won't use it in sort criteria, either. This won't change the JSON property order either - or XML element order - but I believe it should be consistent. |
bom-refs are the key to according to the CycloneDX spec, the bom-ref can be any string, as long as it is unique over all bom-refs in one document. (the xml xsd even has enforcement for uniqueness) nevertheless, give it a try and see if you can hack the feature in :) |
one adddition: Output must be valid according to the used spec. see https://github.com/CycloneDX/specification/tree/master/schema |
I think this can be closed now, as #235 is merged. |
re: #227 (comment) |
I would like the tool to create exactly the same output if I run it on the same (Pipfile.lock) input file twice. This would make it easier to detect changes over time.
There are several places where the outputs differ:
The text was updated successfully, but these errors were encountered: