Skip to content

Commit 75f1029

Browse files
committed
Fix vulnerabilities
- Fix composer build - Upgrade packages
1 parent e13dba1 commit 75f1029

5 files changed

Lines changed: 417 additions & 332 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
3+
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
4+
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
5+
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
6+
7+
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]
8+
then
9+
>&2 echo 'ERROR: Invalid installer checksum'
10+
rm composer-setup.php
11+
exit 1
12+
fi
13+
14+
php composer-setup.php --quiet
15+
RESULT=$?
16+
rm composer-setup.php
17+
exit $RESULT

Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ RUN docker-php-ext-install intl \
1919
&& docker-php-ext-install zip \
2020
&& docker-php-ext-install pdo_mysql
2121

22-
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
23-
php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'.PHP_EOL; } else { echo 'Installer corrupt'.PHP_EOL; unlink('composer-setup.php'); exit(1); }" && \
24-
php composer-setup.php && \
25-
php -r "unlink('composer-setup.php');"
26-
RUN mv composer.phar /usr/local/bin/composer
2722

28-
# PROJECT
23+
2924
RUN mkdir -p $dir
3025
WORKDIR $dir
3126

3227
COPY .docker/php/bin bin/
28+
RUN bin/composer-install.sh
29+
30+
RUN mv composer.phar /usr/local/bin/composer
31+
32+
# PROJECT
3333
RUN chmod +x bin/entrypoint.sh
3434

3535
COPY composer.* ./

composer.lock

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"devDependencies": {
33
"@babel/preset-env": "^7.28.0",
4-
"webpack": "^5.100.2",
4+
"webpack": "^5.105.4",
55
"webpack-cli": "^6.0.1",
66
"yarn-audit-fix": "^10.1.1"
77
},
@@ -17,7 +17,7 @@
1717
"@babel/core": "^7.28.0",
1818
"@fortawesome/fontawesome-free": "^7.0.0",
1919
"@popperjs/core": "^2.11.8",
20-
"@symfony/webpack-encore": "^0.",
20+
"@symfony/webpack-encore": "^6.0.0",
2121
"bootstrap": "^5.2",
2222
"bootstrap-icons": "^1.13.1",
2323
"bootstrap-select": "^1.14.0-beta3",

0 commit comments

Comments
 (0)