fix: move @storybook/preset-scss to devDependencies - #74
Merged
Conversation
It is referenced only by .storybook/main.ts, but sat in dependencies, so every consumer of this package installed the Storybook + webpack chain into their production tree — including a vulnerable fast-uri (GHSA-4c8g-83qw-93j6, host confusion via failed IDN canonicalization). Production dependency tree drops from 162 entries to 10, and `npm audit --omit=dev` goes from 1 high to 0.
size-limit report 📦
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found while running a vulnerability sweep across the SDKs.
npm audit --omit=devflagged a high in the production tree:The trace explains it:
@storybook/preset-scsswas independencies, notdevDependencies, even though the only reference to it in the repo is.storybook/main.ts:12. Every consumer of this package was installing Storybook and webpack at runtime.npm audit --omit=devnpm run build(tsup) passes — ESM, CJS and DTS all emit as before, so nothing insrc/was relying on it.The remaining 10 findings in the full
npm auditare dev-only (brace-expansion,js-yaml,ws, and friends, via storybook/eslint) and do not reach consumers. Worth a separate pass, but they are not shipped.