# Risk map — storybookjs/storybook

> Canonical page: https://codevetter.com/unpack/storybook/risk-map

# Risk map — storybookjs/storybook

Scanned commit dc9b30e8fd8a71383ec01b9510f38bee51457e8a (2026-10-02). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The principal sensitive boundaries are dev-server access, source-file rewriting, output-directory deletion, package execution, and instance-token persistence. The source contains safeguards, including token comparison, Host checks, and owner-only registry permissions. Findings below are source observations or explicitly labeled hypotheses, not confirmed vulnerabilities. Partial inspection cannot establish whole-repository test gaps or the absence of additional protections.
- WebSocket upgrades validate a supplied Origin and token unless skipValidation is set; non-browser clients may omit Origin, and buildDevStandalone sets skipValidation for WebContainer environments. — [code/core/src/core-server/utils/get-server-channel.ts#L51-L80](https://github.com/storybookjs/storybook/blob/dc9b30e8fd8a71383ec01b9510f38bee51457e8a/code/core/src/core-server/utils/get-server-channel.ts#L51-L80) [code/core/src/core-server/build-dev.ts#L260-L263](https://github.com/storybookjs/storybook/blob/dc9b30e8fd8a71383ec01b9510f38bee51457e8a/code/core/src/core-server/build-dev.ts#L260-L263) [code/core/src/core-server/utils/validate-token.ts#L8-L18](https://github.com/storybookjs/storybook/blob/dc9b30e8fd8a71383ec01b9510f38bee51457e8a/code/core/src/core-server/utils/validate-token.ts#L8-L18)
- Host validation permits all hosts when allowedHosts is true or host is 0.0.0.0 with an empty allowlist; startup warns about the latter configuration. — [code/core/src/core-server/utils/getHostValidationMiddleware.ts#L25-L46](https://github.com/storybookjs/storybook/blob/dc9b30e8fd8a71383ec01b9510f38bee51457e8a/code/core/src/core-server/utils/getHostValidationMiddleware.ts#L25-L46) [code/core/src/core-server/build-dev.ts#L206-L216](https://github.com/storybookjs/storybook/blob/dc9b30e8fd8a71383ec01b9510f38bee51457e8a/code/core/src/core-server/build-dev.ts#L206-L216)
- Hypothesis requiring wider validation: SAVE_STORY_REQUEST accepts importPath and joins it to process.cwd() before reading and writing; the inspected handler does not bind that path to an indexed entry or check containment, making the upstream channel trust boundary consequential. (inferred) — [code/core/src/core-server/utils/save-story/save-story.ts#L52-L68](https://github.com/storybookjs/storybook/blob/dc9b30e8fd8a71383ec01b9510f38bee51457e8a/code/core/src/core-server/utils/save-story/save-story.ts#L52-L68) [code/core/src/core-server/utils/save-story/save-story.ts#L87-L105](https://github.com/storybookjs/storybook/blob/dc9b30e8fd8a71383ec01b9510f38bee51457e8a/code/core/src/core-server/utils/save-story/save-story.ts#L87-L105) [code/core/src/core-server/utils/get-server-channel.ts#L58-L87](https://github.com/storybookjs/storybook/blob/dc9b30e8fd8a71383ec01b9510f38bee51457e8a/code/core/src/core-server/utils/get-server-channel.ts#L58-L87)
- buildStaticStandalone recursively removes the resolved outputDir before loading configuration; its visible guards reject empty input and '/', so output-path handling has a filesystem-wide potential blast radius. — [code/core/src/core-server/build-static.ts#L40-L57](https://github.com/storybookjs/storybook/blob/dc9b30e8fd8a71383ec01b9510f38bee51457e8a/code/core/src/core-server/build-static.ts#L40-L57)
- Instance discovery persists the WebSocket token outside the project under .storybook/instances; records are written through a restricted temporary file and rename, with chmod and Windows icacls enforcement. — [code/core/src/core-server/utils/runtime-instance-registry.ts#L20-L50](https://github.com/storybookjs/storybook/blob/dc9b30e8fd8a71383ec01b9510f38bee51457e8a/code/core/src/core-server/utils/runtime-instance-registry.ts#L20-L50) [code/core/src/core-server/utils/runtime-instance-registry.ts#L65-L80](https://github.com/storybookjs/storybook/blob/dc9b30e8fd8a71383ec01b9510f38bee51457e8a/code/core/src/core-server/utils/runtime-instance-registry.ts#L65-L80) [code/core/src/core-server/utils/runtime-instance-registry.ts#L100-L102](https://github.com/storybookjs/storybook/blob/dc9b30e8fd8a71383ec01b9510f38bee51457e8a/code/core/src/core-server/utils/runtime-instance-registry.ts#L100-L102) [code/core/src/core-server/utils/runtime-instance-registry.ts#L185-L209](https://github.com/storybookjs/storybook/blob/dc9b30e8fd8a71383ec01b9510f38bee51457e8a/code/core/src/core-server/utils/runtime-instance-registry.ts#L185-L209)
- External CLI dispatch can execute an installed package binary or download/run a versioned package through the detected package manager, making command routing a process and package-supply boundary. — [code/core/src/bin/dispatcher.ts#L80-L118](https://github.com/storybookjs/storybook/blob/dc9b30e8fd8a71383ec01b9510f38bee51457e8a/code/core/src/bin/dispatcher.ts#L80-L118)
- Tools attachment depends on import order: STORYBOOK_ATTACHED_TOOLS must be set before loading runtime machinery so UniversalStore becomes a follower; cross-installation attachment spawns the recorded installation rather than mixing module copies. — [code/core/src/bin/dispatcher.ts#L39-L45](https://github.com/storybookjs/storybook/blob/dc9b30e8fd8a71383ec01b9510f38bee51457e8a/code/core/src/bin/dispatcher.ts#L39-L45) [code/core/src/cli/tools/README.md#L44-L49](https://github.com/storybookjs/storybook/blob/dc9b30e8fd8a71383ec01b9510f38bee51457e8a/code/core/src/cli/tools/README.md#L44-L49) [code/core/src/cli/tools/sdk/create-tools.ts#L160-L194](https://github.com/storybookjs/storybook/blob/dc9b30e8fd8a71383ec01b9510f38bee51457e8a/code/core/src/cli/tools/sdk/create-tools.ts#L160-L194)
- Accessibility results are not universally fatal: default addon parameters use todo, checks skip several configured cases, and caught errors are rethrown only for standalone Vitest runs. — [code/addons/a11y/src/preview.tsx#L23-L39](https://github.com/storybookjs/storybook/blob/dc9b30e8fd8a71383ec01b9510f38bee51457e8a/code/addons/a11y/src/preview.tsx#L23-L39) [code/addons/a11y/src/preview.tsx#L82-L94](https://github.com/storybookjs/storybook/blob/dc9b30e8fd8a71383ec01b9510f38bee51457e8a/code/addons/a11y/src/preview.tsx#L82-L94) [code/addons/a11y/src/preview.tsx#L106-L109](https://github.com/storybookjs/storybook/blob/dc9b30e8fd8a71383ec01b9510f38bee51457e8a/code/addons/a11y/src/preview.tsx#L106-L109)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
