Skip to content

additionalProperties is needed in other places to prevent stray field names #217

@ElectricNroff

Description

@ElectricNroff

CNAs are submitting data with unofficial field names that were not intended when the JSON 5 schema is designed. For example:

field names that were only intended for use in JSON 4

"references": [{"refsource": "MyCompanyName", "url": "https://example.com/advisory123.html"}]
typo of collectionURL

"affected": [
	{
		"collectionUrl": "https://registry.npmjs.org",
		"packageName": "left-pad",
		"versions": [ ... ]
	}
]

To prevent these anomalies,

"patternProperties": {
                "^x_[^.]*$": {}
            },
"additionalProperties": false

should be added in several additional places.

Metadata

Metadata

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions