-
Notifications
You must be signed in to change notification settings - Fork 198
Description
At the moment the versionType
cve-schema/schema/CVE_Record_Format.json
Lines 306 to 318 in 6af5c9c
"versionType": { | |
"type": "string", | |
"description": "The version numbering system used for specifying the range. This defines the exact semantics of the comparison (less-than) operation on versions, which is required to understand the range itself. 'Custom' indicates that the version type is unspecified and should be avoided whenever possible. It is included primarily for use in conversion of older data files.", | |
"minLength": 1, | |
"maxLength": 128, | |
"examples": [ | |
"custom", | |
"git", | |
"maven", | |
"python", | |
"rpm", | |
"semver" | |
] |
identifier is fairly loosely defined. The description reads
This defines the exact semantics of the comparison (less-than) operation on versions, which is required to understand the range itself.
However it does not inform the reader of the exact semantics of any of the example version types (nor does it lay out a complete list of types).
In essence that just means that all the versionType are fancy unstructured text.
I suggest that for a future revision of the spec we create and maintain a list of supported version schemes. Custom likely needs to remain for backwards compatibility, however I suggest that we also encourage users of the custom type to propose new versionTypes. I would advise against version types that are named for languages eg. python
as languages can end up in packages/executables which tend to not share the same idea of a version as the backing language.
If I understand the intent of the python
identifier correctly (big if) then I would suggest that it be renamed to pypa
and follow the convention here
https://packaging.python.org/en/latest/specifications/version-specifiers/
For the purpose of longterm maintainability I suggest that whatever versionTypes are formally adopted have their full spec copied into this repo. This allows the spec to say we support that one right there in that file we control
and we won't be subject to a spec being updated without anyone knowing. Downside there is that it will require updates to the versionType spec over time and maybe versions for versionType (yo dawg). Ideally each version type also has an associated ordering (might be hard for a git type), but failing that then versions could be presented as a list.
Semver for instance is on version 2.0.0
and no change log (that I can find) exists from 1.x.y. So it would be most correct to rename semver
-> semver 2.0.0
or 1.x.y if that's desired instead.
https://semver.org/
I do not propose that we attempt to catalog a large number of version schemes. Quite a few exist out there and most really don't matter. Some may as well be strings eg.
https://central.sonatype.org/publish/requirements/#correct-coordinates
The version can be an arbitrary string and can not end in -SNAPSHOT , since this is the reserved string used to identify versions that are currently in development.
Some more fun ones
https://nesbitt.io/2024/06/24/from-zerover-to-semver-a-comprehensive-list-of-versioning-schemes-in-open-source.html
I think a manageable approach would be to support custom (for a catch all case) semver (2.0.0), datever, and maybe a few others where we know people publishing date can reliably provide them. Then as CNAs need/want more options we ask them to make a proposal for new versions and we add them to the list.