Skip to content
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

Deserialization of SBOM defaults the metadata/timestamp #258

Open
dmeibusch opened this issue Feb 1, 2023 · 1 comment
Open

Deserialization of SBOM defaults the metadata/timestamp #258

dmeibusch opened this issue Feb 1, 2023 · 1 comment

Comments

@dmeibusch
Copy link
Contributor

public class Metadata extends ExtensibleElement {

    @JsonSerialize(using = CustomDateSerializer.class)
    @VersionFilter(versions = {"1.2", "1.3", "1.4"})
    private Date timestamp = new Date();

This is useful (perhaps) when creating a new SBOM programmatically, to then be serialized. It is misleading when deserializing an existing SBOM without a timestamp where the current date/time may not be expected.

@dmeibusch
Copy link
Contributor Author

The fix would be to remove this initialization - however this does change existing behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant