-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent leading and trailing whitespace in string values, and whitespace-only string values #238
base: 5.0.1
Are you sure you want to change the base?
Prevent leading and trailing whitespace in string values, and whitespace-only string values #238
Conversation
e2641ea
to
ebc9ccf
Compare
On the 6/22/2023 QWG call we had a passionate conversation about allowing or preventing leading and trailing whitespace, as well as, whitespace-only values. The current JSON schemas allow lwhitespace-only values. Generally, there was strong consensus that whitespace-only values should not be allowed. This can be enforced with the pattern The current JSON schemas allow leading whitespace. There was fairly good consensus around not allowing leading whitespace going forward. This can be enforced with the pattern The current JSON schemas allow trailing whitespace. Consensus around trailing whitespace was difficult. With valid arguments for and against. No decision was made regarding addressing this in v5.0.1. Arguments for allowing trailing whitespace revolve around the impact to content producers when restricting it.
Arguments for disallowing trailing whitespace revolve around the impact to consumers having to deal with it.
A middle ground could be to have the CVE services strip leading and trailing whitespace when the record is published. Need to discuss this with the AWG. Open Questions:
|
Re: To what extent does leading/trailing whitespace appear in the CVE list? How small or large is the problem? "whitespace" here is space, tabs, newlines, form feeds, and any character in the Unicode Z Category (which includes a variety of space characters and other separators.) containers.cna.descriptions.value:
containers.cna.title (23,287 records):
containers.cna.affected.vendor (128,812 records):
containers.cna.references.url (814403 records):
containers.cna.references.name (494,228 records):
containers.cna.references.refsource (80 records):
containers.cna.references.tags (1,278,641 records):
containers.cna.problemTypes.cweId (34861 records):
containers.cna.problemTypes.description (78180 records):
containers.cna.metrics.[*].vectorString (37534 records):
|
Given this can be a disruptive change, we will target it for 5.1.0. |
Added patterns to prevent string values from start or ending with whitespace. These strings cannot just contain whitespace either,
Resolves #232