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

Error handling on CVE rejection #134

Open
raboof opened this issue Mar 12, 2024 · 0 comments
Open

Error handling on CVE rejection #134

raboof opened this issue Mar 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@raboof
Copy link
Member

raboof commented Mar 12, 2024

When cve.org rejects our CVE, it tends to return something like INVALID_JSON_SCHEMA without further details.

It would be nice to show human-readable validation errors in this case. Until that time, it would be good to document how to get human-readable validation errors.

Currently I'm using check-jsonschema with the schema from https://github.com/CVEProject/cve-schema/tree/master/schema/v5.0, though that needs me to create a file:. directory with the tags as it appears to misinterpret a reference. Then it works nicely though:

$ check-jsonschema --schemafile CVE_JSON_5.0_schema.json ~/Downloads/CVE-2023-41313.json
(...)
  Best Match:
    $.cveMetadata.state: 'PUBLISHED' is not one of ['REJECTED']
  Best Deep Match:
    $.containers.cna.metrics[0].other: 'type' is a required property

  2 other errors were produced. Use '--verbose' to see all errors.
@raboof raboof added the enhancement New feature or request label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant