Skip to content

fix: move @storybook/preset-scss to devDependencies - #74

Merged
lakhansamani merged 1 commit into
mainfrom
fix/storybook-preset-is-a-dev-dependency
Aug 7, 2026
Merged

fix: move @storybook/preset-scss to devDependencies#74
lakhansamani merged 1 commit into
mainfrom
fix/storybook-preset-is-a-dev-dependency

Conversation

@lakhansamani

Copy link
Copy Markdown
Contributor

Found while running a vulnerability sweep across the SDKs. npm audit --omit=dev flagged a high in the production tree:

fast-uri vulnerable to host confusion via failed IDN canonicalization
GHSA-4c8g-83qw-93j6

The trace explains it:

@authorizerdev/authorizer-react
└─┬ @storybook/addon-styling-webpack
  └─┬ webpack
    └─┬ schema-utils
      └─┬ ajv
        └── fast-uri@3.1.0

@storybook/preset-scss was in dependencies, not devDependencies, 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.

before after
production dep tree 162 entries 10
npm audit --omit=dev 1 high 0 vulnerabilities

npm run build (tsup) passes — ESM, CJS and DTS all emit as before, so nothing in src/ was relying on it.

The remaining 10 findings in the full npm audit are 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.

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.
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

size-limit report 📦

Path Size
dist/index.cjs 60.58 KB (0%)
dist/index.mjs 60.22 KB (0%)

@lakhansamani
lakhansamani merged commit 2f8110e into main Aug 7, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant