From 2af9eacc0f2c1a50b899624eb24f785b9a193752 Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Fri, 5 Apr 2024 10:07:01 +0900 Subject: [PATCH 1/4] Use fakerphp/faker --- composer.json | 4 +- composer.lock | 180 ++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 156 insertions(+), 28 deletions(-) diff --git a/composer.json b/composer.json index 4ae78d48ea..5235d35d24 100644 --- a/composer.json +++ b/composer.json @@ -23,9 +23,9 @@ }, "require-dev": { "doctrine/instantiator": "~1.0.5", - "fzaninotto/faker": "^1.8", + "fakerphp/faker": "^1.23", "nanasess/ec-cube2-class-extends-stubs": "^1.0", - "nanasess/eccube2-fixture-generator": "^1.2", + "nanasess/eccube2-fixture-generator": "^2.0", "php5friends/phpunit48": ">=4.8.41", "phpdocumentor/reflection-docblock": "~2.0.5", "phpstan/phpstan": "^1.10", diff --git a/composer.lock b/composer.lock index f36f0c768d..ca7efc8b67 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0224e4b0021428d8b0873acedf754cb2", + "content-hash": "7fbcc88d7d9d2b25ee19311bc8d5dd54", "packages": [ { "name": "mobiledetect/mobiledetectlib", @@ -866,33 +866,42 @@ "time": "2015-06-14T21:17:01+00:00" }, { - "name": "fzaninotto/faker", - "version": "v1.9.2", + "name": "fakerphp/faker", + "version": "v1.23.1", "source": { "type": "git", - "url": "https://github.com/fzaninotto/Faker.git", - "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e" + "url": "https://github.com/FakerPHP/Faker.git", + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/848d8125239d7dbf8ab25cb7f054f1a630e68c2e", - "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/bfb4fe148adbf78eff521199619b93a52ae3554b", + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.4 || ^8.0", + "psr/container": "^1.0 || ^2.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "conflict": { + "fzaninotto/faker": "*" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "doctrine/persistence": "^1.3 || ^2.0", "ext-intl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7", - "squizlabs/php_codesniffer": "^2.9.2" + "phpunit/phpunit": "^9.5.26", + "symfony/phpunit-bridge": "^5.4.16" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9-dev" - } + "suggest": { + "doctrine/orm": "Required to use Faker\\ORM\\Doctrine", + "ext-curl": "Required by Faker\\Provider\\Image to download images.", + "ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.", + "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", + "ext-mbstring": "Required for multibyte Unicode string functionality." }, + "type": "library", "autoload": { "psr-4": { "Faker\\": "src/Faker/" @@ -914,11 +923,10 @@ "fixtures" ], "support": { - "issues": "https://github.com/fzaninotto/Faker/issues", - "source": "https://github.com/fzaninotto/Faker/tree/v1.9.2" + "issues": "https://github.com/FakerPHP/Faker/issues", + "source": "https://github.com/FakerPHP/Faker/tree/v1.23.1" }, - "abandoned": true, - "time": "2020-12-11T09:56:16+00:00" + "time": "2024-01-02T13:46:09+00:00" }, { "name": "nanasess/ec-cube2-class-extends-stubs", @@ -956,20 +964,20 @@ }, { "name": "nanasess/eccube2-fixture-generator", - "version": "1.2.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/nanasess/eccube2-fixture-generator.git", - "reference": "c1e89014c77f830f3e6fb8d69ef16b10a3c50791" + "reference": "59546afe58352a486f32ef6b2db8c07169e9b5f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nanasess/eccube2-fixture-generator/zipball/c1e89014c77f830f3e6fb8d69ef16b10a3c50791", - "reference": "c1e89014c77f830f3e6fb8d69ef16b10a3c50791", + "url": "https://api.github.com/repos/nanasess/eccube2-fixture-generator/zipball/59546afe58352a486f32ef6b2db8c07169e9b5f9", + "reference": "59546afe58352a486f32ef6b2db8c07169e9b5f9", "shasum": "" }, "require": { - "fzaninotto/faker": "^1.8" + "fakerphp/faker": "^1.23" }, "require-dev": { "symfony/console": "^2.8 || ^3.4 || ^4.4 || ^5.4 || ^6.4" @@ -998,9 +1006,9 @@ ], "support": { "issues": "https://github.com/nanasess/eccube2-fixture-generator/issues", - "source": "https://github.com/nanasess/eccube2-fixture-generator/tree/1.2.0" + "source": "https://github.com/nanasess/eccube2-fixture-generator/tree/2.0.0" }, - "time": "2024-03-14T13:26:46+00:00" + "time": "2024-04-05T00:58:13+00:00" }, { "name": "php5friends/global-state11", @@ -1655,6 +1663,59 @@ "abandoned": true, "time": "2015-10-02T06:51:40+00:00" }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, { "name": "sebastian/comparator", "version": "1.2.4", @@ -2000,6 +2061,73 @@ }, "time": "2015-06-21T13:59:46+00:00" }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.5.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "80d075412b557d41002320b96a096ca65aa2c98d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d", + "reference": "80d075412b557d41002320b96a096ca65aa2c98d", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-24T14:02:46+00:00" + }, { "name": "symfony/polyfill-ctype", "version": "v1.29.0", From a83b3add5745608a1e173c806a0abce94b9e24f9 Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Fri, 5 Apr 2024 10:49:16 +0900 Subject: [PATCH 2/4] =?UTF-8?q?GitHub=20Actions=20=E3=81=8C=E5=A4=B1?= =?UTF-8?q?=E6=95=97=E3=81=99=E3=82=8B=E3=81=9F=E3=82=81=E3=83=98=E3=83=AB?= =?UTF-8?q?=E3=82=B9=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF=E3=81=AE=E3=83=AA?= =?UTF-8?q?=E3=83=88=E3=83=A9=E3=82=A4=E5=9B=9E=E6=95=B0=E3=82=92=E5=A2=97?= =?UTF-8?q?=E3=82=84=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.owaspzap.daemon.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.owaspzap.daemon.yml b/docker-compose.owaspzap.daemon.yml index 352fc8a744..db7e0547ac 100644 --- a/docker-compose.owaspzap.daemon.yml +++ b/docker-compose.owaspzap.daemon.yml @@ -5,7 +5,7 @@ services: command: bash -c "zap.sh -daemon -addonupdate -addoninstall help_ja_JP -addoninstall wappalyzer -addoninstall sequence -addonuninstall hud -configfile /zap/wrk/options.properties -certpubdump /zap/wrk/owasp_zap_root_ca.cer -host 0.0.0.0 -port 8090 -config api.addrs.addr.name=.* -config api.addrs.addr.regex=true" healthcheck: interval: 1m30s - retries: 3 + retries: 5 test: - CMD - curl From 037d84776e0a8862890829c964c62c22ba4331d1 Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Fri, 5 Apr 2024 11:40:56 +0900 Subject: [PATCH 3/4] =?UTF-8?q?--ignore-platform-req=3Dphp=20=E3=81=AF=20P?= =?UTF-8?q?HP5=20=E5=90=91=E3=81=91=E3=81=AE=E5=AF=BE=E5=BF=9C=E3=81=AA?= =?UTF-8?q?=E3=81=AE=E3=81=A7=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/e2e-tests.yml | 4 ++-- .github/workflows/penetration-tests.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index f9617ffb2f..004fea853b 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -73,8 +73,8 @@ jobs: sudo chmod -R g+w zap docker compose up -d --wait docker compose exec -T ec-cube composer install - docker compose exec -T ec-cube composer require ec-cube2/cli "dev-master@dev" --ignore-platform-req=php -W - docker compose exec -T ec-cube composer update 'symfony/*' --ignore-platform-req=php -W + docker compose exec -T ec-cube composer require ec-cube2/cli "dev-master@dev" -W + docker compose exec -T ec-cube composer update 'symfony/*' -W docker compose exec -T ec-cube php data/vendor/bin/eccube eccube:fixtures:generate --products=5 --customers=1 --orders=5 - if: ${{ matrix.db == 'pgsql' }} diff --git a/.github/workflows/penetration-tests.yml b/.github/workflows/penetration-tests.yml index 84e8ab692a..9b5a0c8c4a 100644 --- a/.github/workflows/penetration-tests.yml +++ b/.github/workflows/penetration-tests.yml @@ -49,8 +49,8 @@ jobs: sudo chmod -R g+w zap docker-compose up -d docker-compose exec -T ec-cube composer install - docker-compose exec -T ec-cube composer require ec-cube2/cli "dev-master@dev" --ignore-platform-req=php -W - docker-compose exec -T ec-cube composer update 'symfony/*' --ignore-platform-req=php -W + docker-compose exec -T ec-cube composer require ec-cube2/cli "dev-master@dev" -W + docker-compose exec -T ec-cube composer update 'symfony/*' -W docker-compose exec -T ec-cube php data/vendor/bin/eccube eccube:fixtures:generate --products=5 --customers=1 --orders=5 docker-compose exec -T postgres psql --user=eccube_db_user eccube_db -c "UPDATE dtb_customer SET email = 'zap_user@example.com' WHERE customer_id = (SELECT MAX(customer_id) FROM dtb_customer WHERE status = 2 AND del_flg = 0);" From 2aef8cb9f14f89649b38e75eebb4f733213793ef Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Tue, 16 Apr 2024 00:11:15 +0900 Subject: [PATCH 4/4] Fix baseimage see https://github.com/zaproxy/zaproxy/issues/8450#issuecomment-2057092058 --- zap/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zap/Dockerfile b/zap/Dockerfile index 10833bc889..9f5eff0056 100644 --- a/zap/Dockerfile +++ b/zap/Dockerfile @@ -1,4 +1,4 @@ -FROM owasp/zap2docker-stable +FROM ghcr.io/zaproxy/zaproxy:stable USER root RUN apt-get update \