Skip to content
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

schema/v5.0: flatten affected into array of products #99

Merged
merged 1 commit into from
Aug 19, 2021

Conversation

rsc
Copy link
Contributor

@rsc rsc commented Aug 16, 2021

  • Changed affected from object with array of vendor objects
    with array of products to just plain array of products.
  • Added vendor string to product object.
  • Renamed productName to product in product object.
  • Added cpes array of string to product object,
    replacing affectsCpes inside old affected object.
  • Reordered property list in product object
    to put all identifying fields first.
  • Changed programRoutines to be array of objects, not array of strings.
  • Defined that product object:
    • Requires a product identification, at least one of:
      • vendor and product
      • collectionURL and packageName
      • cpes
    • Also requires versions.

Based on discussion on issue #86.

@rsc
Copy link
Contributor Author

rsc commented Aug 16, 2021

I have checked that this is a valid JSON file, but I didn't find any docs explaining additional tests that should be run, either to check that it's a valid JSON schema at all or to check that certain records validate against it.

Are there such tests?

@mprpic
Copy link
Contributor

mprpic commented Aug 18, 2021

Are there such tests?

None exist right now but there is a proposal to add that infra here: #55

+1 for the changes in this MR, nice work! They also resolve all of the problems raised in issue #41.

schema/v5.0/CVE_JSON_5.0.schema Outdated Show resolved Hide resolved
schema/v5.0/CVE_JSON_5.0.schema Show resolved Hide resolved
@rsc
Copy link
Contributor Author

rsc commented Aug 18, 2021

Will work on these edits.

@chandanbn, how does the mindmap get generated?
I wouldn't mind just regenerating it locally (not included in the PR) to check that the schema parses OK and looks right.

@rsc rsc force-pushed the computable-packages branch from 16347db to 44e3b28 Compare August 18, 2021 21:17
@rsc
Copy link
Contributor Author

rsc commented Aug 18, 2021

Changes made as suggested, except for fixing the CPE regexp.

@chandanbn
Copy link
Collaborator

@chandanbn, how does the mindmap get generated?

Currently done manually with this script in combination with https://markmap.js.org/repl/
https://gist.github.com/chandanbn/609cb2a9478c7190421bc86f8bff4dc8

Prefer to get this scripted/automated at some time.

@rsc rsc force-pushed the computable-packages branch from 44e3b28 to c6a70b2 Compare August 19, 2021 00:45
@rsc
Copy link
Contributor Author

rsc commented Aug 19, 2021

Looking over this again I noticed that I neglected to pull 'platforms' up out of versions and into the product array object as we discussed. I have done that now.

@rsc rsc force-pushed the computable-packages branch 2 times, most recently from 4322f63 to 7c5065b Compare August 19, 2021 00:48
- Changed affected from object with array of vendor objects
  with array of products to just plain array of products.
- Added vendor string to product object.
- Renamed productName to product in product object.
- Added cpes array of string to product object,
  replacing affectsCpes inside old affected object.
- Reordered property list in product object
  to put all identifying fields first.
- Changed programRoutines to be array of objects, not array of strings.
- Defined that product object:
  - Requires a product identification, at least one of:
    - vendor and product
    - collectionURL and packageName
  - Also requires versions.
  - Expands CPE definition (previously unspecified).

Based on discussion on issue CVEProject#86.
Fixes CVEProject#41.
Fixes CVEProject#86.
@rsc rsc force-pushed the computable-packages branch from 7c5065b to 3208d6d Compare August 19, 2021 20:29
@chandanbn chandanbn merged commit c8638e2 into CVEProject:master Aug 19, 2021
@tcullum-rh tcullum-rh mentioned this pull request Aug 20, 2021
@pombredanne
Copy link

@rsc you wrote in #86 (comment)

The upside is the ability to define clear references to vendor-less products, so that CVE can represent open source projects more clearly and not overfit as much to commercial products.

I agree ++... this has been one of the major issue with CPE/CVEs so far. Kudos and thank you for fixing this here; this as a major improvement!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants