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

Investigate lint checks used by @exodus/schemasafe #167

Open
michaelmior opened this issue Oct 1, 2024 · 0 comments
Open

Investigate lint checks used by @exodus/schemasafe #167

michaelmior opened this issue Oct 1, 2024 · 0 comments

Comments

@michaelmior
Copy link

The checks below come from the @exodus/schemasafe docs.

Options for enforcing additional checks
All these options are false by default in 'default' and 'lax/'spec' modes and true by default in 'strong' mode.

requireSchema — refuse to use schemas with missing $schema.

requireValidation — refuse to use schemas which do not perform validation of all items or properties.

requireStringValidation — refuse to use schemas which do not perform validation of all string properties against a format, pattern, or a contentSchema.

complexityChecks — refuse to use schemas that might be missing required checks to avoid potential DoS, e.g. require maxLength on complex regexps and maxItems on complex uniqueItems. Note that it will pass if those are present but have a very high value, the only intent is to prevent a mistake when those checks are missed. If they are present, it is assumed that the shema author chose an appropriate value corresponding to the regex complexity.

forbidNoopValues — refuse to compile schemas with certain noop keywords that make no sense.
Currently, that is only $recursiveAnchor: false.
This option is overridable even in 'strong' mode.

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

No branches or pull requests

1 participant