Skip to content

Commit de720d6

Browse files
spawniaclaude
andauthored
Fix security vulnerabilities 311 (#312)
* fix: update @mll-lab/js-utils to fix lodash vulnerabilities Updates @mll-lab/js-utils from 2.36.1 to 2.41.0, which includes lodash 4.17.21 instead of the vulnerable 4.17.15. Fixes 3 HIGH severity vulnerabilities: - Command Injection (GHSA-35jh-r3h4-6jhm) - Prototype Pollution (GHSA-p6mc-m468-83gw) - ReDoS (GHSA-29mw-wpgm-hmr9) Part of issue #311 - Chunk 1 of 5 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: update jest-environment-jsdom to fix form-data vulnerability Updates jest-environment-jsdom from 29.7.0 to 30.2.0, which includes jsdom 26.x with patched dependencies. Fixes 1 CRITICAL severity vulnerability: - form-data unsafe random function (GHSA-fjxv-7rqg-78g4) Also fixes ws vulnerability in jsdom (moved to Storybook, will fix in next chunk). Tests pass with some expected jsdom warnings about window.getComputedStyle (known jsdom limitation, not a breaking issue). Part of issue #311 - Chunk 2 of 5 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: update Storybook packages to v8.6.14 Updated Storybook packages from ^8.0.0 to ^8.2.10 (resolved to 8.6.14): - @storybook/addon-essentials - @storybook/react - @storybook/react-webpack5 - storybook Also removed deprecated @storybook/addons package. Note: ws (HIGH) vulnerability persists via @storybook/core@8.6.14 → ws@8.14.2. The vulnerability requires ws@8.17.1+, but Storybook 8.6.14 uses ws@8.14.2. Further action needed to resolve this. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: replace storybook-deployer with GitHub Pages Actions Replaced deprecated @storybook/storybook-deployer with GitHub's native Pages deployment actions. This removes the CRITICAL parse-url vulnerability (CVE-2024-XXXXX via git-url-parse → git-up → parse-url). Changes: - Updated .github/workflows/show.yml to use GitHub Pages Actions: - actions/configure-pages@v4 - actions/upload-pages-artifact@v3 - actions/deploy-pages@v4 - Removed @storybook/storybook-deployer from devDependencies - Added required permissions and concurrency controls - Added workflow_dispatch for manual triggers BREAKING CHANGE: Requires one-time manual setup in GitHub Pages settings. After merging, change Pages source from "Deploy from a branch" to "GitHub Actions" at: Settings → Pages → Build and deployment → Source Security impact: - Eliminates 1 CRITICAL vulnerability (parse-url SSRF) - Reduces total vulnerabilities from 25 to ~16 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * simplify show --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 963f70b commit de720d6

3 files changed

Lines changed: 537 additions & 811 deletions

File tree

.github/workflows/show.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,22 @@ on:
33
push:
44
branches:
55
- master
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
616

717
jobs:
818
storybook:
19+
environment:
20+
name: github-pages
21+
url: ${{ steps.deployment.outputs.page_url }}
922
runs-on: ubuntu-latest
1023
steps:
1124
- uses: actions/checkout@v5
@@ -14,6 +27,10 @@ jobs:
1427
node-version: 22
1528
- run: corepack enable
1629
- run: yarn install
17-
- run: yarn run storybook-to-ghpages --ci --script=storybook:build
18-
env:
19-
GH_TOKEN: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}
30+
- run: yarn storybook:build
31+
- uses: actions/configure-pages@v4
32+
- uses: actions/upload-pages-artifact@v3
33+
with:
34+
path: ./storybook-static
35+
- uses: actions/deploy-pages@v4
36+
id: deployment

package.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"dependencies": {
5757
"@ant-design/icons": "^5.0.1",
5858
"@dnd-kit/core": "^6.0.8",
59-
"@mll-lab/js-utils": "^2.36.1",
59+
"@mll-lab/js-utils": "^2.41.0",
6060
"antd": "4.20.5",
6161
"date-fns": "^2.29.3",
6262
"lodash": "^4.17.21",
@@ -79,11 +79,9 @@
7979
"@rollup/plugin-typescript": "^11.1.6",
8080
"@semantic-release/changelog": "^6.0.3",
8181
"@semantic-release/git": "^10.0.1",
82-
"@storybook/addon-essentials": "^8.0.0",
83-
"@storybook/addons": "^7.6.17",
84-
"@storybook/react": "^8.0.0",
85-
"@storybook/react-webpack5": "^8.0.0",
86-
"@storybook/storybook-deployer": "^2.8.16",
82+
"@storybook/addon-essentials": "^8.2.10",
83+
"@storybook/react": "^8.2.10",
84+
"@storybook/react-webpack5": "^8.2.10",
8785
"@testing-library/dom": "^9.3.3",
8886
"@testing-library/jest-dom": "^6.6.4",
8987
"@testing-library/react": "^14.1.2",
@@ -109,7 +107,7 @@
109107
"eslint-plugin-testing-library": "^6.2.2",
110108
"identity-obj-proxy": "^3.0.0",
111109
"jest": "^29.7.0",
112-
"jest-environment-jsdom": "^29.7.0",
110+
"jest-environment-jsdom": "^30.2.0",
113111
"less": "^4.2.0",
114112
"less-loader": "^11.1.3",
115113
"prettier": "^3.1.0",
@@ -124,7 +122,7 @@
124122
"rollup-plugin-peer-deps-external": "^2.2.4",
125123
"rollup-plugin-styles": "^4.0.0",
126124
"semantic-release": "^25.0.1",
127-
"storybook": "^8.0.0",
125+
"storybook": "^8.2.10",
128126
"style-loader": "^3.3.3",
129127
"styled-components": "^6.1.1",
130128
"ts-jest": "^29.1.1",

0 commit comments

Comments
 (0)