You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's required to define a validation schema for each route added via core router, with an option to allow unknown keys. In theory it makes sense for all routes to use strict validation schemes. But that's not always possible (e.g. when piping through Elasticsearch dsl) - for these cases there's no protection at all at the moment for prototype pollution. It would be helpful to introduce a new option as part of @kbn/config-schema:
schema.object({}, { unknowns: 'allowSafe' })
This would do the recursive check for prototype pollution keys, failing the validation when encountering them. It's somewhere between the security of an actual schema and an unknown object payload.
It's required to define a validation schema for each route added via core router, with an option to allow unknown keys. In theory it makes sense for all routes to use strict validation schemes. But that's not always possible (e.g. when piping through Elasticsearch dsl) - for these cases there's no protection at all at the moment for prototype pollution. It would be helpful to introduce a new option as part of @kbn/config-schema:
schema.object({}, { unknowns: 'allowSafe' })
This would do the recursive check for prototype pollution keys, failing the validation when encountering them. It's somewhere between the security of an actual schema and an unknown object payload.
This could be used by TSVB: #78908
The text was updated successfully, but these errors were encountered: