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

Embed an AJV validator for latest CNA container sub-schema validation prior to submission #192

Open
chandanbn opened this issue Mar 2, 2024 · 0 comments

Comments

@chandanbn
Copy link
Contributor

This allows for a dry run validation to closely match the validation done by CVE services.

  1. embed the AJV lib https://ajv.js.org/guide/environments.html#browsers
  2. load the CNA container subschema from upstream cve-schema site
  3. validate the CNA container object
  4. transform AJV errors to JSONEditor errors
  5. return the errors.

May be this could be added as a new validator to conf.js, but only run if JSONEditor's inbuilt validators return no errors.

validators: [

scotluns added a commit to scotluns/Vulnogram that referenced this issue Apr 16, 2024
…rors to json-editor errors per request of Vulnogram#192. Doesn't appear to be useful because errors are duplicative. Could be useful with proper if-branching targeting specify data types if ajv finds errors json-editor doesn't.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant