Commit ddc4796
fix: upgrade Storybook to 9.1.17 to address security vulnerability (#868)
## **Description**
This PR upgrades Storybook from version 9.0.17 to 9.1.17 to address a
critical security vulnerability (CVE) in Storybook's environment
variable handling. The vulnerability could lead to `.env` file contents
being unexpectedly bundled into publicly accessible build artifacts.
This security patch is recommended for all Storybook 7+ users.
Additionally, this PR adds `@storybook/*` and `storybook` packages to
the `npmPreapprovedPackages` list in `.yarnrc.yml` to bypass the 3-day
minimum age gate for critical security patches, allowing the project to
quickly adopt security fixes.
**Key changes:**
- Upgraded all Storybook packages from 9.0.17 → 9.1.17
- Added Storybook packages to npm preapproved list for faster security
patch adoption
- Verified build process works correctly with the new version
**Reference:** https://storybook.js.org/blog/security-advisory/
## **Related issues**
Fixes: N/A (Security patch - proactive upgrade)
## **Manual testing steps**
1. Pull the branch and run `yarn install`
2. Start the Storybook development server:
```bash
yarn storybook
```
3. Verify Storybook loads correctly on http://localhost:6006
4. Navigate through various component stories to ensure functionality
5. Build Storybook for production:
```bash
yarn workspace @metamask/storybook-react build-storybook
```
6. Verify the build completes successfully without errors
7. Check that all components render correctly in the built version
## **Screenshots/Recordings**
N/A - Infrastructure/security update with no visual changes
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs)
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable (build test performed)
- [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable (not applicable - configuration change)
- [ ] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Upgrades all Storybook packages to 9.1.17 and adds Storybook to Yarn's
npmPreapprovedPackages age-gate bypass.
>
> - **Dependencies**:
> - Bump Storybook packages from `9.0.17` → `9.1.17` in
`apps/storybook-react` and
`packages/{design-system-react,design-tokens}` (`@storybook/react`,
`@storybook/react-vite`, `@storybook/addon-*`, and `storybook`).
> - **Tooling/Config**:
> - Add `@storybook/*` and `storybook` to `.yarnrc.yml`
`npmPreapprovedPackages` to bypass the minimal age gate.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
07232ba. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Claude <[email protected]>1 parent 9548bbc commit ddc4796
File tree
5 files changed
+77
-71
lines changed- apps/storybook-react
- packages
- design-system-react
- design-tokens
5 files changed
+77
-71
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3207 | 3207 | | |
3208 | 3208 | | |
3209 | 3209 | | |
3210 | | - | |
| 3210 | + | |
3211 | 3211 | | |
3212 | 3212 | | |
3213 | 3213 | | |
| |||
3305 | 3305 | | |
3306 | 3306 | | |
3307 | 3307 | | |
3308 | | - | |
| 3308 | + | |
3309 | 3309 | | |
3310 | 3310 | | |
3311 | 3311 | | |
| |||
3492 | 3492 | | |
3493 | 3493 | | |
3494 | 3494 | | |
3495 | | - | |
3496 | | - | |
3497 | | - | |
3498 | | - | |
3499 | | - | |
| 3495 | + | |
| 3496 | + | |
| 3497 | + | |
| 3498 | + | |
| 3499 | + | |
3500 | 3500 | | |
3501 | 3501 | | |
3502 | 3502 | | |
| |||
3512 | 3512 | | |
3513 | 3513 | | |
3514 | 3514 | | |
3515 | | - | |
| 3515 | + | |
3516 | 3516 | | |
3517 | 3517 | | |
3518 | 3518 | | |
| |||
4490 | 4490 | | |
4491 | 4491 | | |
4492 | 4492 | | |
4493 | | - | |
4494 | | - | |
4495 | | - | |
| 4493 | + | |
| 4494 | + | |
| 4495 | + | |
4496 | 4496 | | |
4497 | 4497 | | |
4498 | 4498 | | |
4499 | 4499 | | |
4500 | | - | |
4501 | | - | |
| 4500 | + | |
| 4501 | + | |
4502 | 4502 | | |
4503 | 4503 | | |
4504 | 4504 | | |
| |||
4565 | 4565 | | |
4566 | 4566 | | |
4567 | 4567 | | |
4568 | | - | |
4569 | | - | |
4570 | | - | |
| 4568 | + | |
| 4569 | + | |
| 4570 | + | |
4571 | 4571 | | |
4572 | 4572 | | |
4573 | | - | |
4574 | | - | |
4575 | | - | |
| 4573 | + | |
| 4574 | + | |
| 4575 | + | |
4576 | 4576 | | |
4577 | 4577 | | |
4578 | 4578 | | |
4579 | 4579 | | |
4580 | | - | |
4581 | | - | |
| 4580 | + | |
| 4581 | + | |
4582 | 4582 | | |
4583 | 4583 | | |
4584 | 4584 | | |
| |||
4621 | 4621 | | |
4622 | 4622 | | |
4623 | 4623 | | |
4624 | | - | |
4625 | | - | |
4626 | | - | |
| 4624 | + | |
| 4625 | + | |
| 4626 | + | |
4627 | 4627 | | |
4628 | 4628 | | |
4629 | 4629 | | |
4630 | 4630 | | |
4631 | 4631 | | |
4632 | 4632 | | |
4633 | | - | |
4634 | | - | |
4635 | | - | |
4636 | | - | |
| 4633 | + | |
| 4634 | + | |
| 4635 | + | |
| 4636 | + | |
| 4637 | + | |
4637 | 4638 | | |
4638 | 4639 | | |
4639 | 4640 | | |
| 4641 | + | |
| 4642 | + | |
4640 | 4643 | | |
4641 | 4644 | | |
4642 | 4645 | | |
4643 | 4646 | | |
4644 | | - | |
| 4647 | + | |
4645 | 4648 | | |
4646 | 4649 | | |
4647 | 4650 | | |
| |||
4695 | 4698 | | |
4696 | 4699 | | |
4697 | 4700 | | |
4698 | | - | |
4699 | | - | |
4700 | | - | |
| 4701 | + | |
| 4702 | + | |
| 4703 | + | |
4701 | 4704 | | |
4702 | | - | |
| 4705 | + | |
4703 | 4706 | | |
4704 | 4707 | | |
4705 | | - | |
| 4708 | + | |
4706 | 4709 | | |
4707 | | - | |
| 4710 | + | |
4708 | 4711 | | |
4709 | 4712 | | |
4710 | 4713 | | |
| |||
4915 | 4918 | | |
4916 | 4919 | | |
4917 | 4920 | | |
4918 | | - | |
4919 | | - | |
4920 | | - | |
| 4921 | + | |
| 4922 | + | |
| 4923 | + | |
4921 | 4924 | | |
4922 | 4925 | | |
4923 | 4926 | | |
4924 | | - | |
4925 | | - | |
| 4927 | + | |
| 4928 | + | |
4926 | 4929 | | |
4927 | 4930 | | |
4928 | 4931 | | |
| |||
4942 | 4945 | | |
4943 | 4946 | | |
4944 | 4947 | | |
4945 | | - | |
| 4948 | + | |
4946 | 4949 | | |
4947 | 4950 | | |
4948 | 4951 | | |
| |||
4992 | 4995 | | |
4993 | 4996 | | |
4994 | 4997 | | |
4995 | | - | |
4996 | | - | |
4997 | | - | |
| 4998 | + | |
| 4999 | + | |
| 5000 | + | |
4998 | 5001 | | |
4999 | 5002 | | |
5000 | 5003 | | |
5001 | | - | |
5002 | | - | |
| 5004 | + | |
| 5005 | + | |
5003 | 5006 | | |
5004 | 5007 | | |
5005 | 5008 | | |
| |||
5047 | 5050 | | |
5048 | 5051 | | |
5049 | 5052 | | |
5050 | | - | |
5051 | | - | |
5052 | | - | |
| 5053 | + | |
| 5054 | + | |
| 5055 | + | |
5053 | 5056 | | |
5054 | 5057 | | |
5055 | 5058 | | |
5056 | | - | |
5057 | | - | |
| 5059 | + | |
| 5060 | + | |
5058 | 5061 | | |
5059 | 5062 | | |
5060 | 5063 | | |
| |||
5063 | 5066 | | |
5064 | 5067 | | |
5065 | 5068 | | |
5066 | | - | |
| 5069 | + | |
5067 | 5070 | | |
5068 | | - | |
| 5071 | + | |
5069 | 5072 | | |
5070 | 5073 | | |
5071 | 5074 | | |
5072 | | - | |
5073 | | - | |
5074 | | - | |
| 5075 | + | |
| 5076 | + | |
| 5077 | + | |
5075 | 5078 | | |
5076 | 5079 | | |
5077 | | - | |
| 5080 | + | |
5078 | 5081 | | |
5079 | 5082 | | |
5080 | 5083 | | |
5081 | | - | |
| 5084 | + | |
5082 | 5085 | | |
5083 | 5086 | | |
5084 | 5087 | | |
5085 | 5088 | | |
5086 | | - | |
| 5089 | + | |
5087 | 5090 | | |
5088 | 5091 | | |
5089 | 5092 | | |
| |||
19454 | 19457 | | |
19455 | 19458 | | |
19456 | 19459 | | |
19457 | | - | |
19458 | | - | |
19459 | | - | |
| 19460 | + | |
| 19461 | + | |
| 19462 | + | |
19460 | 19463 | | |
19461 | 19464 | | |
19462 | 19465 | | |
19463 | 19466 | | |
19464 | 19467 | | |
| 19468 | + | |
19465 | 19469 | | |
19466 | 19470 | | |
19467 | 19471 | | |
| |||
19476 | 19480 | | |
19477 | 19481 | | |
19478 | 19482 | | |
19479 | | - | |
| 19483 | + | |
19480 | 19484 | | |
19481 | 19485 | | |
19482 | 19486 | | |
| |||
0 commit comments