-
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
Problem with outdated lodash isFunction #63239
Comments
Pinging @elastic/kibana-platform (Team:Platform) |
Pinging @elastic/kibana-operations (Team:Operations) |
@kobelb / @elastic/kibana-security I'm assuming we forked lodash for security reasons regarding prototype pollution? We are currently at
|
That is correct.
As soon as we can upgrade lodash, there's no reason to maintain the fork. It was intended to be a short-term stopgap.
Since we've only been using the fork to mitigate security vulnerabilities and I think we should keep it this way, the @elastic/kibana-security should own this.
There isn't one at the moment, it was meant to be a temporary solution which never was merged upstream. This is also being tracked in #62078 |
So the correct solution is 'just' to switch back to an up to date version of upstream then.
You mean #7537? This seems to be in operations backlog for 7.9 |
Correct.
Yup... my copy/paste failed me. Apologies. |
@pgayvallet @timroes FYI we have removed lodash@3 from our repo and upgraded everything to lodash@4 |
@timroes I guess this can be closed then? |
@sulemanof pointed out an interesting issue we have with our current outdated Lodash version, that will appear when moving over more applications to Kibana Platform. We currently use a fork of lodash, whose
isFunction
implementation (and we seem to use this in around 100 places around Kibana), is checking the type against the string[object Function]
. This worked fine as long as we're transpiling the code. Since code in Kibana Platform will be executed with less transpiling during development, we have seen cases while moving TSVB to KP, where suddenly code breaks, because we checkedasync
functions with_.isFunction
, who are stringifying to[object AsyncFunction]
.I am not sure if
_.isFunction
is the only problematic function in our outdated lodash, but since those errors can sometimes be really tricky to find or during moving to KP not appear at all and create buggy releases, I think we should consider: Updating Lodash (at least for isFunction) in our fork, and maybe to an evaluation if any of the other functions we're using could be effected by the switch in compilation.The newer lodash version doesn't have this problems anymore, because it now also checks for stringified versions of async functions and Proxies.
The text was updated successfully, but these errors were encountered: