Skip to content

Commit 5d29b24

Browse files
committed
schema/v5.0: require at least one English-language description
Per CNA rules, descriptions must contain at least one English-language description, which we take to mean a BCP 47 language tag beginning with "en". Fixes #112.
1 parent ed3fe00 commit 5d29b24

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

schema/v5.0/CVE_JSON_5.0.schema

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,13 +739,22 @@
739739
],
740740
"additionalProperties": false
741741
},
742+
"englishLanguageDescription": {
743+
"type": "object",
744+
"description": "A description with lang set to an English language (en, en_US, en_UK, and so on).",
745+
"properties": {"lang": {"$ref": "#/definitions/englishLanguage"}},
746+
"required": ["lang"]
747+
},
742748
"descriptions": {
743749
"type": "array",
744750
"description": "A list of multi-lingual descriptions of the vulnerability. E.g., [PROBLEMTYPE] in [COMPONENT] in [VENDOR] [PRODUCT] [VERSION] on [PLATFORMS] allows [ATTACKER] to [IMPACT] via [VECTOR]. OR [COMPONENT] in [VENDOR] [PRODUCT] [VERSION] [ROOT CAUSE], which allows [ATTACKER] to [IMPACT] via [VECTOR].",
745751
"minItems": 1,
746752
"uniqueItems": true,
747753
"items": {
748754
"$ref": "#/definitions/description"
755+
},
756+
"contains": {
757+
"$ref": "#/definitions/englishLanguageDescription"
749758
}
750759
},
751760
"problemTypes": {
@@ -1028,6 +1037,11 @@
10281037
"default": "en",
10291038
"pattern": "^[A-Za-z]{2,4}([_-][A-Za-z]{4})?([_-]([A-Za-z]{2}|[0-9]{3}))?$"
10301039
},
1040+
"englishLanguage": {
1041+
"type": "string",
1042+
"description": "BCP 47 language code, language-region, required to be English",
1043+
"pattern": "^en([_-][A-Za-z]{4})?([_-]([A-Za-z]{2}|[0-9]{3}))?$"
1044+
},
10311045
"taxonomyMappings": {
10321046
"type": "array",
10331047
"description": "List of taxonomy items related to the vulnerability",

0 commit comments

Comments
 (0)