From cccd01538b49cc61c60a763c6aa5dd856dec7fd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20CHARBONNEL?= <121117838+remic-alma@users.noreply.github.com> Date: Fri, 24 May 2024 10:58:57 +0200 Subject: [PATCH 1/2] [Security] Update deprecated Aqua scanner options Misconguration engine activation option move from `config` to `misconfig`. --- .github/workflows/aqua.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/aqua.yml b/.github/workflows/aqua.yml index 97fbda0..633e7bc 100644 --- a/.github/workflows/aqua.yml +++ b/.github/workflows/aqua.yml @@ -16,7 +16,7 @@ jobs: - name: Run Aqua scanner uses: docker://aquasec/aqua-scanner with: - args: trivy fs --sast --reachability --scanners config,vuln,secret . + args: trivy fs --sast --reachability --scanners misconfig,vuln,secret . # To customize which severities add the following flag: --severity UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL # To enable SAST scanning, add: --sast # To enable reachability scanning, add: --reachability From 8b6696d35420cad2fbc9c372a687122332f47945 Mon Sep 17 00:00:00 2001 From: joyet simon <43644110+joyet-simon@users.noreply.github.com> Date: Fri, 14 Jun 2024 14:24:26 +0200 Subject: [PATCH 2/2] delete condition for cart data --- .../scripts/helpers/almaPaymentHelper.js | 28 +++++++++---------- test/mocks/helpers/almaPaymentHelpers.js | 3 ++ 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/cartridges/int_alma/cartridge/scripts/helpers/almaPaymentHelper.js b/cartridges/int_alma/cartridge/scripts/helpers/almaPaymentHelper.js index 6a9151d..2863fb9 100644 --- a/cartridges/int_alma/cartridge/scripts/helpers/almaPaymentHelper.js +++ b/cartridges/int_alma/cartridge/scripts/helpers/almaPaymentHelper.js @@ -410,20 +410,20 @@ function buildPaymentData(installmentsCount, deferredDays, locale, isManualCaptu paymentData.payment.capture_method = 'manual'; } - if (installmentsCount >= 5) { - var products = currentBasket.getAllProductLineItems(); - var items = []; - - products.toArray() - .forEach(function (productLineItem) { - var product = productLineItem.getProduct(); - items.push(almaHelper.formatItem(product, productLineItem, locale)); - }); - - paymentData.payment.cart = { - items: items - }; - } + + var products = currentBasket.getAllProductLineItems(); + var items = []; + + products.toArray() + .forEach(function (productLineItem) { + var product = productLineItem.getProduct(); + items.push(almaHelper.formatItem(product, productLineItem, locale)); + }); + + paymentData.payment.cart = { + items: items + }; + return paymentData; } diff --git a/test/mocks/helpers/almaPaymentHelpers.js b/test/mocks/helpers/almaPaymentHelpers.js index 24b5956..e920eda 100644 --- a/test/mocks/helpers/almaPaymentHelpers.js +++ b/test/mocks/helpers/almaPaymentHelpers.js @@ -99,6 +99,9 @@ function resolvedPaymentData(installmentsCount, defferedDays, locale, origin, ha }, deferred: '', deferred_description: '', + cart: { + items: [] + }, custom_data: { cms_name: 'SFCC', cms_version: '4.0.0',