Skip to content

Remove leap seconds conversion rule because it is non significant #1348

@bernhardreiter

Description

@bernhardreiter

Current draft has a leap second conversion rule in 9.1.5:

In addition, the converter outputs a warning that leap seconds are now prohibited in CSAF and the value has been replaced.
The CVRF CSAF Converter SHOULD indicate in such warning message whether the value was a valid leap second or not.

and 9.1.18:

* value type `string` with format `date-time`: If the value contains a `60` in the seconds place, the CSAF 2.0 to CSAF 2.1 Converter MUST replace
the seconds and their fractions with `59.999999`.
In addition, the converter outputs a warning that leap seconds are now prohibited in CSAF and the value has been replaced.
The CSAF 2.0 to CSAF 2.1 Converter SHOULD indicate in such warning message whether the value was a valid leap second or not.

I propose to remove these rules on the basis that they cover an extreme edge case.

They do not have the significance to have their own conversion rule nor test of this rule. This would all be additional code and contents that is not helping CSAF's mission.

There is not and will not be (with > 99% confidence) any leap second in a real world CSAF 2.0 document.

Rationale:

  • The last leap second was from 2016 to 2017. It is unlikely there will be some in the next years. There were 27 leap seconds over 34 years so far.
  • date-time is used in the revision history for the CSAF documents and CSAF is newer than 2017, so valid 2.0 document cannot have a leap second in there.
  • date-time can be used in discovery_date which holds when the vulnerability was originally discovered. The chance for a leap second to be hit is tiny. A (unrealistic high) upper limit is 0.81% : We have about 320000 CVE#s available. Let us assume the leap seconds and the discovery dates were evenly distributed, this means we have a change of 27 leap seconds /(34 years *365 days *24 hours *60 minutes *60 seconds) for hitting one on a single discovery. For all CVE#s to miss, we'd have (1-27/(24*365*60*60*34))**320000 that is about 99.194%. The non-even distribution (more vulnerabilities found in recent years) will make that number go higher in practice.
  • CSAF 2.1 will supersede 2.0 soon.

Checking on our testing ISDuBA instance, on all 376000 documents, there is no leap second.

psql -t -c "select count(*) from documents" isduba
 376429

psql -t -c -t -c "SELECT count(*) FROM documents WHERE original LIKE '%23:59.60Z%'" isduba
  0

In the very unlikely case that such a real world 2.0 document still gets created, the CSAF 2.1 validation at the end of the conversion would fail and the person converting would need to handle this manually.

While the saved time for readers of the standard is good.
And the saved time and saved code (with potential defects) for handling this in the converter and the test documents for the converter is an upside.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions