Skip to content

Commit f541f35

Browse files
authored
Merge pull request #153 from convenient/poc-composer-audit-handling
POC for composer audit handling
2 parents 6b32110 + 082a037 commit f541f35

29 files changed

Lines changed: 117 additions & 5 deletions

File tree

magento-integration-tests/7.0/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ inputs:
3636
magento_post_install_script:
3737
description: 'Relative path to an optional script after Magento installation is run. Leave empty to use the default.'
3838
required: false
39+
block_insecure:
40+
description: 'Whether Composer should block insecure packages during audit. Set to false to allow insecure packages.'
41+
required: false
42+
default: 'true'
3943
runs:
4044
using: 'docker'
4145
image: 'docker://extdn/magento-integration-tests-action:7.0-latest'

magento-integration-tests/7.1/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ inputs:
3636
magento_post_install_script:
3737
description: 'Relative path to an optional script after Magento installation is run. Leave empty to use the default.'
3838
required: false
39+
block_insecure:
40+
description: 'Whether Composer should block insecure packages during audit. Set to false to allow insecure packages.'
41+
required: false
42+
default: 'true'
3943
runs:
4044
using: 'docker'
4145
image: 'docker://extdn/magento-integration-tests-action:7.1-latest'

magento-integration-tests/7.2/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ inputs:
3636
magento_post_install_script:
3737
description: 'Relative path to an optional script after Magento installation is run. Leave empty to use the default.'
3838
required: false
39+
block_insecure:
40+
description: 'Whether Composer should block insecure packages during audit. Set to false to allow insecure packages.'
41+
required: false
42+
default: 'true'
3943
runs:
4044
using: 'docker'
4145
image: 'docker://extdn/magento-integration-tests-action:7.2-latest'

magento-integration-tests/7.3/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ inputs:
3636
magento_post_install_script:
3737
description: 'Relative path to an optional script after Magento installation is run. Leave empty to use the default.'
3838
required: false
39+
block_insecure:
40+
description: 'Whether Composer should block insecure packages during audit. Set to false to allow insecure packages.'
41+
required: false
42+
default: 'true'
3943
runs:
4044
using: 'docker'
4145
image: 'docker://extdn/magento-integration-tests-action:7.3-latest'

magento-integration-tests/7.4/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ inputs:
4040
description: 'DEPREACATED. Composer v2 is now always used.'
4141
required: false
4242
default: '1'
43+
block_insecure:
44+
description: 'Whether Composer should block insecure packages during audit. Set to false to allow insecure packages.'
45+
required: false
46+
default: 'true'
4347
runs:
4448
using: 'docker'
4549
image: 'docker://extdn/magento-integration-tests-action:7.4-latest'

magento-integration-tests/8.1/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ inputs:
4040
description: 'DEPREACATED. Composer v2 is now always used.'
4141
required: false
4242
default: '1'
43+
block_insecure:
44+
description: 'Whether Composer should block insecure packages during audit. Set to false to allow insecure packages.'
45+
required: false
46+
default: 'true'
4347
runs:
4448
using: 'docker'
4549
image: 'docker://extdn/magento-integration-tests-action:8.1-latest'

magento-integration-tests/8.2/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ inputs:
4040
description: 'DEPREACATED. Composer v2 is now always used.'
4141
required: false
4242
default: '2'
43+
block_insecure:
44+
description: 'Whether Composer should block insecure packages during audit. Set to false to allow insecure packages.'
45+
required: false
46+
default: 'true'
4347
runs:
4448
using: 'docker'
4549
image: 'docker://extdn/magento-integration-tests-action:8.2-latest'

magento-integration-tests/8.3/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ inputs:
4040
description: 'DEPREACATED. Composer v2 is now always used.'
4141
required: false
4242
default: '2'
43+
block_insecure:
44+
description: 'Whether Composer should block insecure packages during audit. Set to false to allow insecure packages.'
45+
required: false
46+
default: 'true'
4347
runs:
4448
using: 'docker'
4549
image: 'docker://extdn/magento-integration-tests-action:8.3-latest'

magento-integration-tests/8.4/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ inputs:
4040
description: 'DEPREACATED. Composer v2 is now always used.'
4141
required: false
4242
default: '2'
43+
block_insecure:
44+
description: 'Whether Composer should block insecure packages during audit. Set to false to allow insecure packages.'
45+
required: false
46+
default: 'true'
4347
runs:
4448
using: 'docker'
4549
image: 'docker://extdn/magento-integration-tests-action:8.4-latest'

magento-integration-tests/entrypoint.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ test -z "${PROJECT_NAME}" && PROJECT_NAME=$INPUT_PROJECT_NAME
1010
test -z "${ELASTICSEARCH}" && ELASTICSEARCH=$INPUT_ELASTICSEARCH
1111
test -z "${PHPUNIT_FILE}" && PHPUNIT_FILE=$INPUT_PHPUNIT_FILE
1212
test -z "${REPOSITORY_URL}" && REPOSITORY_URL=$INPUT_REPOSITORY_URL
13+
test -z "${BLOCK_INSECURE}" && BLOCK_INSECURE=$INPUT_BLOCK_INSECURE
1314

1415
# Maintain backwards-compatibility with old 'ce_version' input.
1516
test -z "${MAGENTO_VERSION}" && MAGENTO_VERSION=$INPUT_CE_VERSION
@@ -19,6 +20,7 @@ test -z "$MAGENTO_VERSION" && MAGENTO_VERSION="2.4.3-p1"
1920
test -z "$PROJECT_NAME" && PROJECT_NAME="magento/project-community-edition"
2021
test -z "${REPOSITORY_URL}" && REPOSITORY_URL="https://repo-magento-mirror.fooman.co.nz/"
2122
test -z "$DISABLE_DATABASE_DUMP" && DISABLE_DATABASE_DUMP="1"
23+
test -z "${BLOCK_INSECURE}" && BLOCK_INSECURE="true"
2224

2325
if [[ "$MAGENTO_VERSION" == "2.4."* ]]; then
2426
ELASTICSEARCH=1
@@ -85,8 +87,11 @@ if [[ "$MAGENTO_VERSION" == "2.4.4" ]]; then
8587
composer require monolog/monolog:2.6.0 --no-update
8688
fi
8789

90+
echo "Configure Composer audit.block-insecure"
91+
composer config audit.block-insecure "$BLOCK_INSECURE"
92+
8893
echo "Ignore known security advisories"
89-
composer config --json audit.ignore '{"PKSA-z3gr-8qht-p93v": "Ignored for CI", "PKSA-rkkf-636k-qjb3": "Ignored for CI", "PKSA-wws7-mr54-jsny": "Ignored for CI"}'
94+
composer config --json audit.ignore '{"PKSA-z3gr-8qht-p93v": "Ignored for CI", "PKSA-rkkf-636k-qjb3": "Ignored for CI", "PKSA-wws7-mr54-jsny": "Ignored for CI", "PKSA-db8d-773v-rd1n": "Ignored for CI"}'
9095

9196
echo "Run installation"
9297
COMPOSER_MEMORY_LIMIT=-1 composer install --no-interaction --no-progress

0 commit comments

Comments
 (0)