Skip to content

Commit b8882da

Browse files
authored
Fix/vulnerabilities (#707)
* fix: update composer dependencies to fix vulnerabilities * fix: update yarn dependencies to fix vulnerabilities * fix: lock api-platform/core to 4.1.30, the minimal patched version * fix: scope yarn resolutions to the packages that need them * chore(deps): remove vulnerability resolutions Fix vulnerabilities through in-range lockfile bumps instead. terser-webpack-plugin 5.6 no longer depends on serialize-javascript. * fix: bump react-admin to 5.15.6 to drop vulnerable decode-uri-component restDataProvider imported query-string without declaring it; use @marmelab/query-string like ra-data-simple-rest. * fix: move to react-router v7 and replace serve with http-server Drops the vulnerable react-router v6 and compression (pinned by serve). * fix: make dev Storybook reachable from the host Storybook 8.6.19 listens on 127.0.0.1 by default; bind to 0.0.0.0 in the container and publish the port on the host loopback only.
1 parent a36afb6 commit b8882da

8 files changed

Lines changed: 1871 additions & 1689 deletions

File tree

‎Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ COPY --link . ./
2828
# Development image
2929
FROM base as dev
3030

31-
CMD ["sh", "-c", "yarn storybook --no-open"]
31+
CMD ["sh", "-c", "yarn storybook --no-open --host 0.0.0.0"]
3232

3333
FROM base as ci
3434

‎api/composer.json‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"php": ">=8.2",
66
"ext-ctype": "*",
77
"ext-iconv": "*",
8-
"api-platform/core": "^4.0.6",
8+
"api-platform/core": "^4.1.30",
99
"doctrine/doctrine-bundle": "^2.7",
1010
"doctrine/doctrine-migrations-bundle": "^3.2",
1111
"doctrine/orm": "^3.0",
@@ -46,6 +46,9 @@
4646
"allow-plugins": {
4747
"symfony/flex": true,
4848
"symfony/runtime": true
49+
},
50+
"platform": {
51+
"php": "8.2.0"
4952
}
5053
},
5154
"autoload": {

‎api/composer.lock‎

Lines changed: 1160 additions & 888 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/symfony.lock‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
"src/ApiResource/.gitignore"
1414
]
1515
},
16+
"doctrine/deprecations": {
17+
"version": "1.1",
18+
"recipe": {
19+
"repo": "github.com/symfony/recipes",
20+
"branch": "main",
21+
"version": "1.0",
22+
"ref": "fdd756167454623e21f1d769c5b814b243782a67"
23+
}
24+
},
1625
"doctrine/doctrine-bundle": {
1726
"version": "2.11",
1827
"recipe": {

‎compose.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ services:
6868
ports:
6969
- target: 3000
7070
published: ${PWA_PORT:-3000}
71+
host_ip: 127.0.0.1
7172

7273
###> doctrine/doctrine-bundle ###
7374
database:

‎package.json‎

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"sideEffects": false,
2020
"dependencies": {
2121
"@api-platform/api-doc-parser": "^0.16.12",
22+
"@marmelab/query-string": "^7.1.4",
2223
"jsonld": "^8.3.3",
2324
"lodash.isplainobject": "^4.0.6",
2425
"react-admin": "^5.15.5"
@@ -27,16 +28,16 @@
2728
"@babel/preset-env": "^7.23.3",
2829
"@babel/preset-react": "^7.23.3",
2930
"@babel/preset-typescript": "^7.23.3",
30-
"@storybook/addon-essentials": "^8.6.15",
31-
"@storybook/addon-interactions": "^8.6.15",
32-
"@storybook/addon-links": "^8.6.15",
33-
"@storybook/addon-mdx-gfm": "^8.6.15",
34-
"@storybook/addon-onboarding": "^8.6.15",
31+
"@storybook/addon-essentials": "^8.6.19",
32+
"@storybook/addon-interactions": "^8.6.19",
33+
"@storybook/addon-links": "^8.6.19",
34+
"@storybook/addon-mdx-gfm": "^8.6.19",
35+
"@storybook/addon-onboarding": "^8.6.19",
3536
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
36-
"@storybook/blocks": "^8.6.15",
37-
"@storybook/react": "^8.6.15",
38-
"@storybook/react-webpack5": "^8.6.15",
39-
"@storybook/test": "^8.6.15",
37+
"@storybook/blocks": "^8.6.19",
38+
"@storybook/react": "^8.6.19",
39+
"@storybook/react-webpack5": "^8.6.19",
40+
"@storybook/test": "^8.6.19",
4041
"@storybook/test-runner": "^0.17.0",
4142
"@tanstack/react-query-devtools": "^5.80.6",
4243
"@testing-library/jest-dom": "^6.1.0",
@@ -62,6 +63,7 @@
6263
"eslint-plugin-react-hooks": "^4.2.0",
6364
"eslint-plugin-storybook": "^0.6.15",
6465
"eslint-plugin-tree-shaking": "^1.10.0",
66+
"http-server": "^14.1.1",
6567
"jest": "^29.0.0",
6668
"jest-environment-jsdom": "^29.0.0",
6769
"jest-fetch-mock": "^3.0.3",
@@ -71,9 +73,8 @@
7173
"react": "^18.0.0",
7274
"react-dom": "^18.0.0",
7375
"react-test-renderer": "^18.0.0",
74-
"rimraf": "^5.0.0",
75-
"serve": "^14.2.1",
76-
"storybook": "^8.6.15",
76+
"rimraf": "^6.1.4",
77+
"storybook": "^8.6.19",
7778
"ts-jest": "^29.0.0",
7879
"ts-node": "^10.4.0",
7980
"typescript": "^5.2.0"
@@ -92,12 +93,8 @@
9293
"watch": "tsc --watch",
9394
"storybook": "storybook dev -p 3000",
9495
"storybook:build": "storybook build",
95-
"storybook:serve": "serve storybook-static",
96+
"storybook:serve": "http-server storybook-static",
9697
"storybook:test": "test-storybook"
9798
},
98-
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
99-
"resolutions": {
100-
"react-router-dom": "^6",
101-
"react-router": "^6"
102-
}
99+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
103100
}

‎src/dataProvider/restDataProvider.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { stringify } from 'query-string';
1+
import { stringify } from '@marmelab/query-string';
22
import { fetchUtils } from 'react-admin';
33
import type { DataProvider } from 'react-admin';
44
import { removeTrailingSlash } from '../removeTrailingSlash.js';

0 commit comments

Comments
 (0)