-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Upgrade Joi version or remove dependency on it #84624
Comments
Pinging @elastic/kibana-core (Team:Core) |
Our old 13.x version of Joi depends on a version of hoek that is now vulnerable to a prototype pollution attack. Fortunately, we are not impacted, but this appears on our scanners now, and is something we'll have to continue to monitor: snyk.io/vuln/SNYK-JS-HAPIHOEK-548452 The upgrade to newer versions of Joi is non-trivial. There are a lot of breaking changes from 13.x -> 17.x, and my very brief look into this suggests that we'll require extensive changes to @kbn/config-schema in order to function correctly. The bulk of the breaking changes appear to have happened at 16.0: the release notes indicate that this will not be an easy transition. |
AFAIK, @pgayvallet has almost completed the upgrade. Apart from the security benefits mentioned by @legrego, we also noticed considerable improvements in performance (gcanti/io-ts-benchmarks#6) |
Added link to the upgrade PR: #99899 |
Besides joi 13 there's a few other dependencies that depend on hoek. I've just created two PRs that should get rid of them all (besides joi which is dealt with in #99899). With these we'll be 100% free of any non-
|
Btw, in case anybody needs this in the future, I have been using a regex to find non- (yar|wreck|vision|vise|topo|teamwork|subtext|statehood|somever|shot|scooter|podium|pez|oppsy|nigel|nes|mimos|lab|iron|inert|hoek|heavy|h2o2|glue|eslint-plugin-hapi|cryptiles|crumb|hapi-auth-cookie|content|code|catbox-redis|catbox-memory|catbox-memcached|catbox|call|bourne|bounce|bossy|boom|bell|hapi-auth-basic|b64|ammo|accept|hapi) For searching in ^(yar|wreck|vision|vise|topo|teamwork|subtext|statehood|somever|shot|scooter|podium|pez|oppsy|nigel|nes|mimos|lab|iron|inert|hoek|heavy|h2o2|glue|eslint-plugin-hapi|cryptiles|crumb|hapi-auth-cookie|content|code|catbox-redis|catbox-memory|catbox-memcached|catbox|call|bourne|bounce|bossy|boom|bell|hapi-auth-basic|b64|ammo|accept|hapi)@ |
I can confirm that after rebasing my PR, |
Fantastic, thanks @pgayvallet! |
@watson update Hapi to v18 in #54168 However, the core team code still relies on an old
joi
version. We should consider updating our code to use a newer version or get rid of the package.The text was updated successfully, but these errors were encountered: