From 4be8d9c4778c87b4024d7aa66b7a2a5efb07d025 Mon Sep 17 00:00:00 2001 From: Nicolas Agustin Guevara Pihen <42900763+Tostti@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:04:21 -0300 Subject: [PATCH] Merge 4.10.2 into master (#447) Signed-off-by: Nicolas Agustin Guevara Pihen <42900763+Tostti@users.noreply.github.com> Co-authored-by: Guido Modarelli <38738725+guidomodarelli@users.noreply.github.com> Co-authored-by: Federico Rodriguez --- .github/workflows/build_and_test_workflow.yml | 42 ++++++++++-------- .github/workflows/build_base.yml | 7 +-- .../build_wazuh_dashboard_with_plugins.yml | 43 ++++++++++++++----- .github/workflows/codeql.yml | 2 +- .github/workflows/cypress_workflow.yml | 21 +++++---- CHANGELOG.md | 12 +++++- 6 files changed, 84 insertions(+), 43 deletions(-) diff --git a/.github/workflows/build_and_test_workflow.yml b/.github/workflows/build_and_test_workflow.yml index ac1733ab24db..b2848dc09b58 100644 --- a/.github/workflows/build_and_test_workflow.yml +++ b/.github/workflows/build_and_test_workflow.yml @@ -62,7 +62,7 @@ jobs: disk-root: 'C:' - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup JDK (Windows only) if: matrix.os == 'windows-latest' @@ -72,7 +72,7 @@ jobs: distribution: 'adopt' - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' @@ -88,7 +88,7 @@ jobs: run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV - name: Initialize Yarn Cache - uses: actions/cache@v3 + uses: actions/cache@v4 if: matrix.os != 'windows-latest' with: path: ${{ env.YARN_CACHE_LOCATION }} @@ -203,7 +203,7 @@ jobs: disk-root: 'C:' - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup JDK (Windows only) if: matrix.os == 'windows-latest' @@ -213,7 +213,7 @@ jobs: distribution: 'adopt' - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' @@ -229,7 +229,7 @@ jobs: run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV - name: Initialize Yarn Cache - uses: actions/cache@v3 + uses: actions/cache@v4 if: matrix.os != 'windows-latest' with: path: ${{ env.YARN_CACHE_LOCATION }} @@ -282,13 +282,14 @@ jobs: JOB: ci${{ matrix.group }} CACHE_DIR: ciGroup${{ matrix.group }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: failure() with: name: failure-artifacts-ci${{ matrix.group }} path: | test/*/failure_debug/ test/*/screenshots/ + overwrite: true plugin-functional-tests: name: Run plugin functional tests on ${{ matrix.name }} @@ -319,7 +320,7 @@ jobs: disk-root: 'C:' - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup JDK (Windows only) if: matrix.os == 'windows-latest' @@ -329,7 +330,7 @@ jobs: distribution: 'adopt' - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' @@ -345,7 +346,7 @@ jobs: run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV - name: Initialize Yarn Cache - uses: actions/cache@v3 + uses: actions/cache@v4 if: matrix.os != 'windows-latest' with: path: ${{ env.YARN_CACHE_LOCATION }} @@ -393,13 +394,14 @@ jobs: id: plugin-ftr-tests run: node scripts/functional_tests.js --config test/plugin_functional/config.ts - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: failure() with: name: failure-artifacts-plugin-functional-${{ matrix.os }} path: | test/*/failure_debug/ test/*/screenshots/ + overwrite: true build-min-artifact-tests: name: Build min release artifacts on ${{ matrix.name }} @@ -451,12 +453,12 @@ jobs: disk-root: 'C:' - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: ./artifacts - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: './artifacts/.nvmrc' registry-url: 'https://registry.npmjs.org' @@ -472,7 +474,7 @@ jobs: run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV - name: Initialize Yarn Cache - uses: actions/cache@v3 + uses: actions/cache@v4 if: matrix.os != 'windows-latest' with: path: ${{ env.YARN_CACHE_LOCATION }} @@ -506,12 +508,13 @@ jobs: - name: Build `${{ matrix.name }}` run: yarn ${{ matrix.script }} --release - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: success() with: name: ${{ matrix.suffix }}-${{ env.VERSION }} path: ./artifacts/target/${{ env.ARTIFACT_BUILD_NAME }} retention-days: 1 + overwrite: true bwc-tests: needs: [build-min-artifact-tests] @@ -540,7 +543,7 @@ jobs: ] steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: ./artifacts @@ -548,7 +551,7 @@ jobs: - run: echo [NOTE] These tests will be ran using Linux x64 release builds without security - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: './artifacts/.nvmrc' registry-url: 'https://registry.npmjs.org' @@ -583,7 +586,7 @@ jobs: run: echo "BWC_VERSIONS=${{ matrix.version }}" >> $GITHUB_ENV - name: Download OpenSearch Dashboards - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 id: download with: name: linux-x64-${{ env.VERSION }} @@ -595,7 +598,7 @@ jobs: run: | yarn test:bwc -s false -o ${{ env.OPENSEARCH_URL }} -d ${{ steps.download.outputs.download-path }}/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz -v ${{ matrix.version }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: ${{ failure() && steps.verify-opensearch-exists.outputs.version-exists == 'true' }} with: name: ${{ matrix.version }}-test-failures @@ -604,3 +607,4 @@ jobs: ./artifacts/bwc_tmp/test/cypress/screenshots/* ./artifacts/bwc_tmp/test/cypress/results/* retention-days: 1 + overwrite: true diff --git a/.github/workflows/build_base.yml b/.github/workflows/build_base.yml index 665a7e4f69f8..1d98475c4b81 100644 --- a/.github/workflows/build_base.yml +++ b/.github/workflows/build_base.yml @@ -48,7 +48,7 @@ jobs: ref: ${{ inputs.CHECKOUT_TO }} - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: './artifacts/.nvmrc' registry-url: 'https://registry.npmjs.org' @@ -63,7 +63,7 @@ jobs: run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV - name: Initialize Yarn Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.YARN_CACHE_LOCATION }} key: yarn-${{ hashFiles('**/yarn.lock') }} @@ -89,9 +89,10 @@ jobs: - name: Rename artifact run: mv /home/runner/work/wazuh-dashboard/wazuh-dashboard/artifacts/target/opensearch-dashboards-${{ env.VERSION }}-linux-${{ (inputs.ARCHITECTURE == 'x86_64' || inputs.ARCHITECTURE == 'amd64') && 'x64' || 'arm64' }}.${{ matrix.DISTRIBUTION }} /home/runner/work/wazuh-dashboard/wazuh-dashboard/artifacts/target/${{ env.ARTIFACT_BUILD_NAME }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: success() with: name: ${{ env.ARTIFACT_BUILD_NAME }} path: ./artifacts/target/${{ env.ARTIFACT_BUILD_NAME }} retention-days: 30 + overwrite: true diff --git a/.github/workflows/build_wazuh_dashboard_with_plugins.yml b/.github/workflows/build_wazuh_dashboard_with_plugins.yml index 3fddf70ea598..2ef82708e5c6 100644 --- a/.github/workflows/build_wazuh_dashboard_with_plugins.yml +++ b/.github/workflows/build_wazuh_dashboard_with_plugins.yml @@ -115,7 +115,9 @@ jobs: WAZUH_DASHBOARD_SLIM: ${{ steps.setup-variables.outputs.WAZUH_DASHBOARD_SLIM }} WAZUH_SECURITY_PLUGIN: ${{ steps.setup-variables.outputs.WAZUH_SECURITY_PLUGIN }} WAZUH_REPORT_PLUGIN: ${{ steps.setup-variables.outputs.WAZUH_REPORT_PLUGIN }} - WAZUH_PLUGINS: ${{ steps.setup-variables.outputs.WAZUH_PLUGINS }} + WAZUH_PLUGINS_WAZUH: ${{ steps.setup-variables.outputs.WAZUH_PLUGINS_WAZUH }} + WAZUH_PLUGINS_CORE: ${{ steps.setup-variables.outputs.WAZUH_PLUGINS_CORE }} + WAZUH_PLUGINS_CHECK_UPDATES: ${{ steps.setup-variables.outputs.WAZUH_PLUGINS_CHECK_UPDATES }} PACKAGE_NAME: ${{ steps.setup-variables.outputs.PACKAGE_NAME }} FINAL_NAME: ${{ steps.setup-variables.outputs.FINAL_NAME }} ARCHITECTURE_FLAG: ${{ steps.setup-variables.outputs.ARCHITECTURE_FLAG }} @@ -142,6 +144,12 @@ jobs: cd wzrp echo "WAZUH_REPORTING_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + registry-url: 'https://registry.npmjs.org' + - name: Setup variables id: setup-variables run: | @@ -160,7 +168,9 @@ jobs: WAZUH_DASHBOARD_SLIM=wazuh-dashboard_${VERSION}-${REVISION}_${{ (inputs.ARCHITECTURE == 'x86_64' || inputs.ARCHITECTURE == 'amd64') && 'x64' || 'arm64' }}.tar.gz WAZUH_SECURITY_PLUGIN=wazuh-security-dashboards-plugin_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_security_plugins }} | sed 's/\//-/g').zip WAZUH_REPORT_PLUGIN=reports-dashboards_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_report_plugins }} | sed 's/\//-/g').zip - WAZUH_PLUGINS=wazuh-dashboard-plugins_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_wazuh_plugins }} | sed 's/\//-/g').zip + WAZUH_PLUGINS_WAZUH=wazuh-dashboard-plugins_wazuh_${VERSION}-${REVISION}_${{ inputs.reference_wazuh_plugins }}.zip + WAZUH_PLUGINS_CORE=wazuh-dashboard-plugins_wazuh-core_${VERSION}-${REVISION}_${{ inputs.reference_wazuh_plugins }}.zip + WAZUH_PLUGINS_CHECK_UPDATES=wazuh-dashboard-plugins_wazuh-check-updates_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_wazuh_plugins }} | sed 's/\//-/g').zip if [ "${{ inputs.system }}" = "deb" ]; then if [ "${{ inputs.is_stage }}" = "true" ]; then PACKAGE_NAME=wazuh-dashboard_${VERSION}-${{ inputs.revision }}_${{ inputs.architecture }}.deb @@ -191,7 +201,9 @@ jobs: echo "WAZUH_DASHBOARD_SLIM=$WAZUH_DASHBOARD_SLIM" >> $GITHUB_OUTPUT echo "WAZUH_SECURITY_PLUGIN=$WAZUH_SECURITY_PLUGIN" >> $GITHUB_OUTPUT echo "WAZUH_REPORT_PLUGIN=$WAZUH_REPORT_PLUGIN" >> $GITHUB_OUTPUT - echo "WAZUH_PLUGINS=$WAZUH_PLUGINS" >> $GITHUB_OUTPUT + echo "WAZUH_PLUGINS_WAZUH=$WAZUH_PLUGINS_WAZUH" >> $GITHUB_OUTPUT + echo "WAZUH_PLUGINS_CORE=$WAZUH_PLUGINS_CORE" >> $GITHUB_OUTPUT + echo "WAZUH_PLUGINS_CHECK_UPDATES=$WAZUH_PLUGINS_CHECK_UPDATES" >> $GITHUB_OUTPUT echo "PACKAGE_NAME=$PACKAGE_NAME" >> $GITHUB_OUTPUT echo "FINAL_NAME=$FINAL_NAME" >> $GITHUB_OUTPUT echo "ARCHITECTURE_FLAG=$ARCHITECTURE_FLAG" >> $GITHUB_OUTPUT @@ -257,30 +269,40 @@ jobs: uses: actions/checkout@v4 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' - name: Download dashboard artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ needs.setup-variables.outputs.WAZUH_DASHBOARD_SLIM }} path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/dashboard - name: Download security plugin artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ needs.setup-variables.outputs.WAZUH_SECURITY_PLUGIN }} path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/security-plugin - name: Download plugins artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 + with: + name: ${{ needs.setup-variables.outputs.WAZUH_PLUGINS_WAZUH }} + path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/plugins + - name: Download plugins artifacts + uses: actions/download-artifact@v4 + with: + name: ${{ needs.setup-variables.outputs.WAZUH_PLUGINS_CORE }} + path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/plugins + - name: Download plugins artifacts + uses: actions/download-artifact@v4 with: - name: ${{ needs.setup-variables.outputs.WAZUH_PLUGINS }} + name: ${{ needs.setup-variables.outputs.WAZUH_PLUGINS_CHECK_UPDATES }} path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/plugins - name: Download report plugin artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ needs.setup-variables.outputs.WAZUH_REPORT_PLUGIN }} path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/report-plugin @@ -307,6 +329,7 @@ jobs: - name: Test package run: | cd ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/test-packages + ls -laR ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages/output cp ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages/output/${{needs.setup-variables.outputs.PACKAGE_NAME}} ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/test-packages/${{ inputs.system }} bash ./test-packages.sh \ -p ${{needs.setup-variables.outputs.PACKAGE_NAME}} @@ -319,7 +342,7 @@ jobs: run: | mv ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages/output/${{needs.setup-variables.outputs.PACKAGE_NAME}}.sha512 ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages/output/${{needs.setup-variables.outputs.FINAL_NAME}}.sha512 - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: success() with: name: ${{ needs.setup-variables.outputs.FINAL_NAME }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 092c298a32e4..8c7e91460365 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -41,7 +41,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/cypress_workflow.yml b/.github/workflows/cypress_workflow.yml index 03547e89fcf8..6820c727a876 100644 --- a/.github/workflows/cypress_workflow.yml +++ b/.github/workflows/cypress_workflow.yml @@ -64,7 +64,7 @@ jobs: - name: Get source information from PR number if: ${{ github.event_name == 'workflow_dispatch' && inputs.pr_number != '' }} id: get_pr_info - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | const { data: result } = await github.rest.pulls.get({ @@ -82,13 +82,13 @@ jobs: echo "SOURCE_BRANCH=${{ steps.get_pr_info.outputs.head_ref }}" >> $GITHUB_ENV - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: repository: ${{ env.SOURCE_REPO }} ref: '${{ env.SOURCE_BRANCH }}' - name: Setup Node - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' @@ -105,7 +105,7 @@ jobs: run: node scripts/build_opensearch_dashboards_platform_plugins --no-examples --workers 12 - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: path: ${{ env.FTR_PATH }} repository: ${{ env.TEST_REPO }} @@ -135,7 +135,7 @@ jobs: - name: Cache Cypress id: cache-cypress - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.cache/Cypress key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package.json') }} @@ -145,7 +145,7 @@ jobs: - run: npx cypress cache path - name: Run tests - uses: cypress-io/github-action@v2 + uses: cypress-io/github-action@v6 with: working-directory: ${{ env.FTR_PATH }} start: ${{ env.OPENSEARCH_SNAPSHOT_CMD }}, ${{ env.START_CMD }} @@ -153,26 +153,29 @@ jobs: command: yarn cypress:run-without-security --browser ${{ env.CYPRESS_BROWSER }} --config ignoreTestFiles="dashboard_sanity_test_spec.js" --spec ${{ env.SPEC }} # Screenshots are only captured on failure, will change this once we do visual regression tests - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: failure() with: name: ftr-cypress-screenshots path: ${{ env.FTR_PATH }}/cypress/screenshots retention-days: 1 + overwrite: true - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: ftr-cypress-videos path: ${{ env.FTR_PATH }}/cypress/videos retention-days: 1 + overwrite: true - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: ftr-cypress-results path: ${{ env.FTR_PATH }}/cypress/results retention-days: 1 + overwrite: true add-comment: needs: [cypress-tests] if: ${{ always() && github.event_name == 'workflow_dispatch' && inputs.pr_number != '' }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f82d4b28818..d91979d26d30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,12 +20,22 @@ All notable changes to the Wazuh app project will be documented in this file. - Support for Wazuh 4.10.1 -## Wazuh dashboard v4.10.0 - OpenSearch Dashboards 2.16.0 - Revision 02 +## Wazuh dashboard v4.10.0 - OpenSearch Dashboards 2.16.0 - Revision 06 + +### Changed + +- Reduced the size of the loading logo [#373](https://github.com/wazuh/wazuh-dashboard/pull/373) ### Removed - Removed the setting home:useNewHomePage from the advanced settings because the views are not finished. [#282](https://github.com/wazuh/wazuh-dashboard/pull/282) +## Wazuh dashboard v4.9.2 - OpenSearch Dashboards 2.13.0 - Revision 01 + +### Added + +- Support for Wazuh 4.9.2 + ## Wazuh dashboard v4.9.1 - OpenSearch Dashboards 2.13.0 - Revision 04 ### Added