Open kaiyoma opened 1 year ago
@ndelangen can we get rid of this in 8.0? even if it's not a real security issue, it looks like one and i don't think it's useful to serialize functions over the channel anyway.
correct, I'll remove this functionality from telejson in a new major.
We should plan that work as part of storybook 8.0. It won't be much, but there's little point (or in fact counter productive) in doing in right now, when SB 8.0 is still far away.
Hello @shilman @ndelangen , I hope you are doing well.
Is it possible to remove this from version 7 as well?
Thank you, Taras
The default channelOptions
in telejson.stringify
has been set to { allowFunction: false }
in #25564 and this fix will go out with 8.0. Since this is a breaking change, we cannot backport it to 7.x.
We are leaving this issue open as a reminder to remove the unsafe eval
call from @storybook/telejson
properly in 9.0.
It seems like this issue has not been resolved in 8.1.11
../../node_modules/.pnpm/telejson@7.2.0/node_modules/telejson/dist/index.mjs (1416:18): Use of eval in "../../node_modules/.pnpm/telejson@7.2.0/node_modules/telejson/dist/index.mjs" is strongly discouraged as it poses security risks and may cause issues with minification.
seeing in 8.2.5
Also coming from manager-api
node_modules/.pnpm/telejson@7.2.0/node_modules/telejson/dist/index.mjs (1413:15): Use of eval in "node_modules/.pnpm/telejson@7.2.0/node_modules/telejson/dist/index.mjs" is strongly discouraged as it poses security risks and may cause issues with minification.
node_modules/.pnpm/telejson@7.2.0/node_modules/telejson/dist/index.mjs (1416:18): Use of eval in "node_modules/.pnpm/telejson@7.2.0/node_modules/telejson/dist/index.mjs" is strongly discouraged as it poses security risks and may cause issues with minification.
node_modules/.pnpm/@storybook+core@8.2.5/node_modules/@storybook/core/dist/manager-api/index.js (4764:15): Use of eval in "node_modules/.pnpm/@storybook+core@8.2.5/node_modules/@storybook/core/dist/manager-api/index.js" is strongly discouraged as it poses security risks and may cause issues with minification.
node_modules/.pnpm/@storybook+core@8.2.5/node_modules/@storybook/core/dist/manager-api/index.js (4766:16): Use of eval in "node_modules/.pnpm/@storybook+core@8.2.5/node_modules/@storybook/core/dist/manager-api/index.js" is strongly discouraged as it poses security risks and may cause issues with minification.
By default this code is not executed anymore in Storybook. We had a chance to remove it in 8.0, but unfortunately this got lost in the shuffle. We will definitely remove it in 9.0. Apologies in the meantime.
Describe the bug
When building Storybook, I see these messages:
I've never heard of this package, and when I run
pnpm why telejson
it tells me that Storybook itself is the only reason this dependency exists.To Reproduce
No response
System
Additional context