CycloneDX / cyclonedx-dotnet

Creates CycloneDX Software Bill of Materials (SBOM) from .NET Projects
https://cyclonedx.org/
Apache License 2.0
167 stars 78 forks source link

Inconsistent Timestamp Representation in XML and JSON BOM Files #877

Closed eugenhoffmann closed 1 month ago

eugenhoffmann commented 1 month ago

I have noticed that the timestamp representation in the XML and JSON BOM files is inconsistent. While both formats are ISO 8601 conform, the XML BOM file contains a timestamp with a precision of up to 7 decimal places for the seconds fraction:

In my opinion, this level of precision is not necessary. Furthermore, the second fractions more than 3 digits are not supported by the Python API datetime.fromisoformat(date_string) method.

While these differences are not incorrect, they can be confusing and may cause issues when processing the data. I would like to propose that we adopt a consistent timestamp representation across both file formats, ideally using the JSON timestamp format.

Thank you for considering this issue!

mtsfoni commented 1 month ago

This is most likely an issue for the CycloneDX dotnet library where the serialization actually happens.

Could you open this issue also there? Once fixed in the library, I will create a new version of the generating tool.

eugenhoffmann commented 1 month ago

Thank you for your response. I have opened an Issue in the CycloneDX dotnet library as suggested

mtsfoni commented 1 month ago

Should be resolved in 3.0.7. Let me know if you still have problems