From 43d86dd5c8f84fe660a6dbd992a948487d58e19e Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 3 May 2022 15:51:38 -0300 Subject: [PATCH 001/178] add variables from wazuh version --- build-docker-images/build.sh | 15 +++++++++++++ build-docker-images/docker-compose.yml | 21 +++++++++++++------ build-docker-images/env | 2 ++ .../wazuh-dashboard/Dockerfile | 7 ++++--- .../config/install_wazuh_app.sh | 14 +++++++++++++ build-docker-images/wazuh-indexer/Dockerfile | 2 ++ .../wazuh-indexer/config/config.sh | 2 +- build-docker-images/wazuh-manager/Dockerfile | 15 ++++++++----- .../wazuh-manager/config/check_repository.sh | 13 ++++++++++++ 9 files changed, 76 insertions(+), 15 deletions(-) create mode 100755 build-docker-images/build.sh create mode 100644 build-docker-images/env create mode 100644 build-docker-images/wazuh-dashboard/config/install_wazuh_app.sh create mode 100644 build-docker-images/wazuh-manager/config/check_repository.sh diff --git a/build-docker-images/build.sh b/build-docker-images/build.sh new file mode 100755 index 00000000..2c1af5bd --- /dev/null +++ b/build-docker-images/build.sh @@ -0,0 +1,15 @@ +WAZUH_IMAGE_VERSION=4.3.0 +WAZUH_VERSION=$(echo $WAZUH_IMAGE_VERSION | sed -e 's/\.//g') +WAZUH_ACTUAL_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g') + +## If wazuh manager exists in apt dev repository, change variables, if not exit 1 +if [ "$WAZUH_VERSION" -le "$WAZUH_ACTUAL_VERSION" ]; then + IMAGE_VERSION=${WAZUH_IMAGE_VERSION} +else + IMAGE_VERSION=${WAZUH_IMAGE_VERSION}-dev +fi + +echo WAZUH_VERSION=$WAZUH_IMAGE_VERSION > env +echo WAZUH_IMAGE_VERSION=$IMAGE_VERSION >> env + +docker-compose --env-file env build --no-cache \ No newline at end of file diff --git a/build-docker-images/docker-compose.yml b/build-docker-images/docker-compose.yml index 0d9b9524..bf7a8f29 100644 --- a/build-docker-images/docker-compose.yml +++ b/build-docker-images/docker-compose.yml @@ -3,8 +3,11 @@ version: '3.7' services: wazuh.manager: - build: wazuh-manager/ - image: wazuh/wazuh-manager:4.3.0 + build: + context: wazuh-manager/ + args: + - WAZUH_VERSION=${WAZUH_VERSION} + image: wazuh/wazuh-manager:${WAZUH_IMAGE_VERSION} hostname: wazuh.manager restart: always ports: @@ -31,8 +34,11 @@ services: - filebeat_var:/var/lib/filebeat wazuh.indexer: - build: wazuh-indexer/ - image: wazuh/wazuh-indexer:4.3.0 + build: + context: wazuh-indexer/ + args: + - WAZUH_VERSION=${WAZUH_VERSION} + image: wazuh/wazuh-indexer:${WAZUH_IMAGE_VERSION} hostname: wazuh.indexer restart: always ports: @@ -48,8 +54,11 @@ services: hard: 65536 wazuh.dashboard: - build: wazuh-dashboard/ - image: wazuh/wazuh-dashboard:4.3.0 + build: + context: wazuh-dashboard/ + args: + - WAZUH_VERSION=${WAZUH_VERSION} + image: wazuh/wazuh-dashboard:${WAZUH_IMAGE_VERSION} hostname: wazuh.dashboard restart: always ports: diff --git a/build-docker-images/env b/build-docker-images/env new file mode 100644 index 00000000..45d8be19 --- /dev/null +++ b/build-docker-images/env @@ -0,0 +1,2 @@ +WAZUH_VERSION=4.3.0 +WAZUH_IMAGE_VERSION=4.3.0-dev diff --git a/build-docker-images/wazuh-dashboard/Dockerfile b/build-docker-images/wazuh-dashboard/Dockerfile index 3853f180..ff381476 100644 --- a/build-docker-images/wazuh-dashboard/Dockerfile +++ b/build-docker-images/wazuh-dashboard/Dockerfile @@ -1,7 +1,7 @@ # Wazuh Docker Copyright (C) 2021 Wazuh Inc. (License GPLv2) FROM ubuntu:focal AS builder -ARG WAZUH_VERSION=4.3.0 +ARG WAZUH_VERSION ARG INSTALL_DIR=/usr/share/wazuh-dashboard # Update and install dependencies @@ -24,8 +24,9 @@ RUN $INSTALL_DIR/bin/opensearch-dashboards-keystore create --allow-root && \ echo kibanaserver | $INSTALL_DIR/bin/opensearch-dashboards-keystore add opensearch.username --stdin --allow-root && \ echo kibanaserver | $INSTALL_DIR/bin/opensearch-dashboards-keystore add opensearch.password --stdin --allow-root -# Install Wazuh App -RUN $INSTALL_DIR/bin/opensearch-dashboards-plugin install https://packages.wazuh.com/4.x/ui/dashboard/wazuh-${WAZUH_VERSION}.zip --allow-root +COPY config/install_wazuh_app.sh / +RUN chmod 775 /install_wazuh_app.sh +RUN bash /install_wazuh_app.sh # Copy and set permissions to config files COPY config/opensearch_dashboards.yml $INSTALL_DIR/config/ diff --git a/build-docker-images/wazuh-dashboard/config/install_wazuh_app.sh b/build-docker-images/wazuh-dashboard/config/install_wazuh_app.sh new file mode 100644 index 00000000..c4f0d5d5 --- /dev/null +++ b/build-docker-images/wazuh-dashboard/config/install_wazuh_app.sh @@ -0,0 +1,14 @@ +## Variables +WAZUH_IMAGE_VERSION=$(echo $WAZUH_VERSION | sed -e 's/\.//g') +WAZUH_ACTUAL_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g') +echo $WAZUH_IMAGE_VERSION +echo $WAZUH_ACTUAL_VERSION +## If wazuh manager exists in apt dev repository, change variables, if not exit 1 +if [ "$WAZUH_IMAGE_VERSION" -le "$WAZUH_ACTUAL_VERSION" ]; then + WAZUH_APP=https://packages.wazuh.com/4.x/ui/dashboard/wazuh-${WAZUH_VERSION}.zip +else + WAZUH_APP=https://packages-dev.wazuh.com/pre-release/ui/dashboard/wazuh-${WAZUH_VERSION}.zip +fi + +# Install Wazuh App +$INSTALL_DIR/bin/opensearch-dashboards-plugin install $WAZUH_APP --allow-root \ No newline at end of file diff --git a/build-docker-images/wazuh-indexer/Dockerfile b/build-docker-images/wazuh-indexer/Dockerfile index a09d9e56..8955e274 100644 --- a/build-docker-images/wazuh-indexer/Dockerfile +++ b/build-docker-images/wazuh-indexer/Dockerfile @@ -1,6 +1,8 @@ # Wazuh Docker Copyright (C) 2021 Wazuh Inc. (License GPLv2) FROM ubuntu:focal AS builder +ARG WAZUH_VERSION + RUN apt-get update -y && apt-get install curl openssl xz-utils -y COPY config/opensearch.yml / diff --git a/build-docker-images/wazuh-indexer/config/config.sh b/build-docker-images/wazuh-indexer/config/config.sh index a598ecf8..3ba9b8d5 100644 --- a/build-docker-images/wazuh-indexer/config/config.sh +++ b/build-docker-images/wazuh-indexer/config/config.sh @@ -8,7 +8,7 @@ export TARGET_DIR=${CURDIR}/debian/${NAME} # Package build options export USER=${NAME} export GROUP=${NAME} -export VERSION=4.3.0 +export VERSION=${WAZUH_VERSION} export LOG_DIR=/var/log/${NAME} export LIB_DIR=/var/lib/${NAME} export PID_DIR=/run/${NAME} diff --git a/build-docker-images/wazuh-manager/Dockerfile b/build-docker-images/wazuh-manager/Dockerfile index 11a852e1..bd7a777a 100644 --- a/build-docker-images/wazuh-manager/Dockerfile +++ b/build-docker-images/wazuh-manager/Dockerfile @@ -1,17 +1,22 @@ # Wazuh Docker Copyright (C) 2021 Wazuh Inc. (License GPLv2) FROM ubuntu:focal -ARG WAZUH_VERSION=4.3.0 -ARG TEMPLATE_VERSION=4.3 +RUN rm /bin/sh && ln -s /bin/bash /bin/sh + +ARG WAZUH_VERSION +ARG TEMPLATE_VERSION=4.2 ARG FILEBEAT_CHANNEL=filebeat-oss ARG FILEBEAT_VERSION=7.10.2 ARG WAZUH_FILEBEAT_MODULE="wazuh-filebeat-0.1.tar.gz" RUN apt-get update && apt install curl apt-transport-https lsb-release gnupg -y -RUN apt-key adv --fetch-keys https://packages.wazuh.com/key/GPG-KEY-WAZUH && \ - echo "deb https://packages.wazuh.com/4.x/apt/ stable main" | tee -a /etc/apt/sources.list.d/wazuh.list && \ - apt-get update && \ +COPY config/check_repository.sh / + +RUN chmod 775 /check_repository.sh +RUN source /check_repository.sh + +RUN apt-get update && \ apt-get install wazuh-manager=${WAZUH_VERSION}-1 RUN curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/${FILEBEAT_CHANNEL}-${FILEBEAT_VERSION}-amd64.deb &&\ diff --git a/build-docker-images/wazuh-manager/config/check_repository.sh b/build-docker-images/wazuh-manager/config/check_repository.sh new file mode 100644 index 00000000..1a0763ce --- /dev/null +++ b/build-docker-images/wazuh-manager/config/check_repository.sh @@ -0,0 +1,13 @@ +## Variables +WAZUH_IMAGE_VERSION=$(echo $WAZUH_VERSION | sed -e 's/\.//g') +WAZUH_ACTUAL_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g') +## If wazuh manager exists in apt dev repository, change variables, if not exit 1 +if [ "$WAZUH_IMAGE_VERSION" -le "$WAZUH_ACTUAL_VERSION" ]; then + APT_KEY=https://packages.wazuh.com/key/GPG-KEY-WAZUH + REPOSITORY="deb https://packages.wazuh.com/4.x/apt/ stable main" +else + APT_KEY=https://packages-dev.wazuh.com/key/GPG-KEY-WAZUH + REPOSITORY="deb https://packages-dev.wazuh.com/pre-release/apt/ unstable main" +fi +apt-key adv --fetch-keys ${APT_KEY} +echo ${REPOSITORY} | tee -a /etc/apt/sources.list.d/wazuh.list \ No newline at end of file From c2712a3929892e4ac4f477b1355f6a28c6837ef0 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 17 May 2022 11:59:07 -0300 Subject: [PATCH 002/178] test ci actions --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 37b0a58f..e33a3348 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Build the docker-compose stack - run: docker-compose -f build-wazuh-images.yml up -d --build + run: build-docker-images/build.sh - name: Check running containers run: docker ps -a From e99476a99b149437e7ca03e5c415146690ded672 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 17 May 2022 12:22:32 -0300 Subject: [PATCH 003/178] test ci actions --- .gitignore | 1 + build-docker-images/env | 2 +- build-docker-images/build.sh => build.sh | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) rename build-docker-images/build.sh => build.sh (67%) diff --git a/.gitignore b/.gitignore index a2abaa56..b569f7a6 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ single-node/config/wazuh_indexer_ssl_certs/*.pem single-node/config/wazuh_indexer_ssl_certs/*.key multi-node/config/wazuh_indexer_ssl_certs/*.pem multi-node/config/wazuh_indexer_ssl_certs/*.key +build-docker-images/env \ No newline at end of file diff --git a/build-docker-images/env b/build-docker-images/env index 45d8be19..b13b2292 100644 --- a/build-docker-images/env +++ b/build-docker-images/env @@ -1,2 +1,2 @@ WAZUH_VERSION=4.3.0 -WAZUH_IMAGE_VERSION=4.3.0-dev +WAZUH_IMAGE_VERSION=4.3.0 diff --git a/build-docker-images/build.sh b/build.sh similarity index 67% rename from build-docker-images/build.sh rename to build.sh index 2c1af5bd..5e21f784 100755 --- a/build-docker-images/build.sh +++ b/build.sh @@ -9,7 +9,7 @@ else IMAGE_VERSION=${WAZUH_IMAGE_VERSION}-dev fi -echo WAZUH_VERSION=$WAZUH_IMAGE_VERSION > env -echo WAZUH_IMAGE_VERSION=$IMAGE_VERSION >> env +echo WAZUH_VERSION=$WAZUH_IMAGE_VERSION > build-docker-images/env +echo WAZUH_IMAGE_VERSION=$IMAGE_VERSION >> build-docker-images/env -docker-compose --env-file env build --no-cache \ No newline at end of file +docker-compose -f build-docker-images/docker-compose.yml --env-file build-docker-images/env build --no-cache \ No newline at end of file From 8b39bff31d8f86915633a811ca563f30d0586df9 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 17 May 2022 12:23:55 -0300 Subject: [PATCH 004/178] test ci actions --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index e33a3348..7c0db802 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Build the docker-compose stack - run: build-docker-images/build.sh + run: build.sh - name: Check running containers run: docker ps -a From 316db4f384b0c9fff4fbf002749315d263a22214 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 17 May 2022 12:24:48 -0300 Subject: [PATCH 005/178] test ci actions --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 7c0db802..3b3cfb81 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Build the docker-compose stack - run: build.sh + run: ./build.sh - name: Check running containers run: docker ps -a From e39f5a9ab5ba826d3e9f8a3381a116cdfae962cc Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 17 May 2022 12:35:25 -0300 Subject: [PATCH 006/178] test ci actions --- .github/.goss.yaml | 72 -------------------------------------- .github/workflows/push.yml | 3 -- 2 files changed, 75 deletions(-) diff --git a/.github/.goss.yaml b/.github/.goss.yaml index d0248b51..6c81a924 100644 --- a/.github/.goss.yaml +++ b/.github/.goss.yaml @@ -1,53 +1,3 @@ -file: - /etc/filebeat/filebeat.yml: - exists: true - mode: "0644" - owner: root - group: root - filetype: file - contains: [] - /var/ossec/bin/wazuh-control: - exists: true - mode: "0750" - owner: root - group: root - filetype: file - contains: [] - /var/ossec/etc/lists/audit-keys: - exists: true - mode: "0660" - owner: wazuh - group: wazuh - filetype: file - contains: [] - /var/ossec/etc/ossec.conf: - exists: true - mode: "0660" - owner: root - group: wazuh - filetype: file - contains: [] - /var/ossec/etc/rules/local_rules.xml: - exists: true - mode: "0660" - owner: wazuh - group: wazuh - filetype: file - contains: [] - /var/ossec/etc/sslmanager.cert: - exists: true - mode: "0640" - owner: root - group: root - filetype: file - contains: [] - /var/ossec/etc/sslmanager.key: - exists: true - mode: "0640" - owner: root - group: root - filetype: file - contains: [] package: filebeat: installed: true @@ -70,28 +20,6 @@ port: listening: true ip: - 0.0.0.0 -user: - wazuh: - exists: true - groups: - - wazuh - home: /var/ossec - shell: /sbin/nologin - wazuh: - exists: true - groups: - - wazuh - home: /var/ossec - shell: /sbin/nologin - wazuh: - exists: true - groups: - - wazuh - home: /var/ossec - shell: /sbin/nologin -group: - wazuh: - exists: true process: filebeat: running: true diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 3b3cfb81..7e0e57a0 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -16,9 +16,6 @@ jobs: - name: Check running containers run: docker ps -a - - name: Shutdown the stack - run: docker-compose -f build-wazuh-images.yml kill - - name: Install Goss uses: e1himself/goss-installation-action@v1.0.3 with: From 8746063177cdd539f1f054437d3486f4fd451c8a Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 17 May 2022 12:44:33 -0300 Subject: [PATCH 007/178] test ci actions --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 7e0e57a0..424190b6 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -22,7 +22,7 @@ jobs: version: v0.3.16 - name: Execute Goss tests (wazuh-odfe) - run: dgoss run wazuh/wazuh-manager:4.3.1 + run: dgoss run wazuh/wazuh-manager:4.3.1-dev env: GOSS_SLEEP: 30 GOSS_FILE: .github/.goss.yaml \ No newline at end of file From a40c870e78c86c09a709a1e8674759b058ae3a2c Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 17 May 2022 12:52:47 -0300 Subject: [PATCH 008/178] test ci actions --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 5e21f784..34e2a781 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ -WAZUH_IMAGE_VERSION=4.3.0 +WAZUH_IMAGE_VERSION=4.3.1 WAZUH_VERSION=$(echo $WAZUH_IMAGE_VERSION | sed -e 's/\.//g') WAZUH_ACTUAL_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g') From bbeb831cebe10d4ca56a78012dcf9c799e12f730 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Mon, 23 May 2022 12:16:07 -0300 Subject: [PATCH 009/178] change path for env file --- .gitignore | 2 +- build-docker-images/env | 2 -- build.sh | 6 +++--- 3 files changed, 4 insertions(+), 6 deletions(-) delete mode 100644 build-docker-images/env diff --git a/.gitignore b/.gitignore index b569f7a6..fc53a2b0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ single-node/config/wazuh_indexer_ssl_certs/*.pem single-node/config/wazuh_indexer_ssl_certs/*.key multi-node/config/wazuh_indexer_ssl_certs/*.pem multi-node/config/wazuh_indexer_ssl_certs/*.key -build-docker-images/env \ No newline at end of file +env \ No newline at end of file diff --git a/build-docker-images/env b/build-docker-images/env deleted file mode 100644 index b13b2292..00000000 --- a/build-docker-images/env +++ /dev/null @@ -1,2 +0,0 @@ -WAZUH_VERSION=4.3.0 -WAZUH_IMAGE_VERSION=4.3.0 diff --git a/build.sh b/build.sh index 34e2a781..53398eee 100755 --- a/build.sh +++ b/build.sh @@ -9,7 +9,7 @@ else IMAGE_VERSION=${WAZUH_IMAGE_VERSION}-dev fi -echo WAZUH_VERSION=$WAZUH_IMAGE_VERSION > build-docker-images/env -echo WAZUH_IMAGE_VERSION=$IMAGE_VERSION >> build-docker-images/env +echo WAZUH_VERSION=$WAZUH_IMAGE_VERSION > env +echo WAZUH_IMAGE_VERSION=$IMAGE_VERSION >> env -docker-compose -f build-docker-images/docker-compose.yml --env-file build-docker-images/env build --no-cache \ No newline at end of file +docker-compose -f build-docker-images/docker-compose.yml --env-file env build --no-cache \ No newline at end of file From 2d77063934d6d2e4450fcf7c389504cf7712ec16 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Mon, 23 May 2022 12:28:45 -0300 Subject: [PATCH 010/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 424190b6..7e0e57a0 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -22,7 +22,7 @@ jobs: version: v0.3.16 - name: Execute Goss tests (wazuh-odfe) - run: dgoss run wazuh/wazuh-manager:4.3.1-dev + run: dgoss run wazuh/wazuh-manager:4.3.1 env: GOSS_SLEEP: 30 GOSS_FILE: .github/.goss.yaml \ No newline at end of file From fe104c7ffb96590729a39612ed9428da81ee6333 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Mon, 23 May 2022 12:55:57 -0300 Subject: [PATCH 011/178] test CI --- .github/.goss.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/.goss.yaml b/.github/.goss.yaml index 6c81a924..3ce20140 100644 --- a/.github/.goss.yaml +++ b/.github/.goss.yaml @@ -6,7 +6,7 @@ package: wazuh-manager: installed: true versions: - - 4.3.1 + - 4.3.1-1 port: tcp:1514: listening: true From 5b03281631e739158f7b5cbcc46b43d2d7dee813 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Mon, 23 May 2022 16:53:35 -0300 Subject: [PATCH 012/178] test CI --- .github/workflows/push.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 7e0e57a0..37c716c4 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,6 +1,6 @@ name: Wazuh Docker pipeline -on: [push] +on: [pull_request, push] jobs: build-stack: @@ -14,15 +14,17 @@ jobs: run: ./build.sh - name: Check running containers - run: docker ps -a + run: docker ps -a >> $GITHUB_ENV - name: Install Goss uses: e1himself/goss-installation-action@v1.0.3 with: version: v0.3.16 - - name: Execute Goss tests (wazuh-odfe) - run: dgoss run wazuh/wazuh-manager:4.3.1 + - name: Execute Goss tests (wazuh-manager) + run: | + ./env + dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}}" env: GOSS_SLEEP: 30 GOSS_FILE: .github/.goss.yaml \ No newline at end of file From e1fc82af793a5b58590d45a8053a787c8f709b1b Mon Sep 17 00:00:00 2001 From: vcerenu Date: Mon, 23 May 2022 17:00:54 -0300 Subject: [PATCH 013/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 37c716c4..e8ee161b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -14,7 +14,7 @@ jobs: run: ./build.sh - name: Check running containers - run: docker ps -a >> $GITHUB_ENV + run: docker ps -a - name: Install Goss uses: e1himself/goss-installation-action@v1.0.3 From 4e975f8dd1d8d91178392b125861036ccca386ae Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 24 May 2022 12:24:20 -0300 Subject: [PATCH 014/178] test CI --- .github/workflows/push.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index e8ee161b..800a87c9 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -13,9 +13,6 @@ jobs: - name: Build the docker-compose stack run: ./build.sh - - name: Check running containers - run: docker ps -a - - name: Install Goss uses: e1himself/goss-installation-action@v1.0.3 with: From baa24a7614f279e4b158ec24fcbea4f568c7384e Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 24 May 2022 12:36:01 -0300 Subject: [PATCH 015/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 800a87c9..d126d2b6 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -20,7 +20,7 @@ jobs: - name: Execute Goss tests (wazuh-manager) run: | - ./env + bash ./env dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}}" env: GOSS_SLEEP: 30 From b1e13d3b72f0faf98daaa0316553a779843ea1a0 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 24 May 2022 12:58:52 -0300 Subject: [PATCH 016/178] test CI --- .github/workflows/push.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index d126d2b6..8aa3c134 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -8,7 +8,7 @@ jobs: steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Build the docker-compose stack run: ./build.sh @@ -20,8 +20,7 @@ jobs: - name: Execute Goss tests (wazuh-manager) run: | - bash ./env - dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}}" + bash ./env && dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}}" env: GOSS_SLEEP: 30 GOSS_FILE: .github/.goss.yaml \ No newline at end of file From db3d37aef6cc782f7a80c13f420e37b40f64696b Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 24 May 2022 13:00:10 -0300 Subject: [PATCH 017/178] test CI --- .github/workflows/push.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 8aa3c134..5a317b21 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -19,8 +19,7 @@ jobs: version: v0.3.16 - name: Execute Goss tests (wazuh-manager) - run: | - bash ./env && dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}}" + run: bash ./env && dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}}" env: GOSS_SLEEP: 30 GOSS_FILE: .github/.goss.yaml \ No newline at end of file From 65f499c04244840f296d9c2aaa80113b4c9345f8 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 24 May 2022 15:30:49 -0300 Subject: [PATCH 018/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 5a317b21..740f376a 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -19,7 +19,7 @@ jobs: version: v0.3.16 - name: Execute Goss tests (wazuh-manager) - run: bash ./env && dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}}" + run: bash ./env && dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} env: GOSS_SLEEP: 30 GOSS_FILE: .github/.goss.yaml \ No newline at end of file From 521140162052656bd7b75573b99b84a506498aa8 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 24 May 2022 15:38:28 -0300 Subject: [PATCH 019/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 740f376a..73564cab 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -19,7 +19,7 @@ jobs: version: v0.3.16 - name: Execute Goss tests (wazuh-manager) - run: bash ./env && dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} + run: bash ./env && dgoss run wazuh/wazuh-manager:${{WAZUH_IMAGE_VERSION}} env: GOSS_SLEEP: 30 GOSS_FILE: .github/.goss.yaml \ No newline at end of file From 894ba9df1208d8ae5d7bb176fdb86a438dca8090 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 26 May 2022 10:45:41 -0300 Subject: [PATCH 020/178] test CI --- .env | 2 ++ .github/workflows/push.yml | 2 +- build.sh | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100755 .env diff --git a/.env b/.env new file mode 100755 index 00000000..b13b2292 --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +WAZUH_VERSION=4.3.0 +WAZUH_IMAGE_VERSION=4.3.0 diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 73564cab..c9550626 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -19,7 +19,7 @@ jobs: version: v0.3.16 - name: Execute Goss tests (wazuh-manager) - run: bash ./env && dgoss run wazuh/wazuh-manager:${{WAZUH_IMAGE_VERSION}} + run: dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} env: GOSS_SLEEP: 30 GOSS_FILE: .github/.goss.yaml \ No newline at end of file diff --git a/build.sh b/build.sh index 53398eee..def889e8 100755 --- a/build.sh +++ b/build.sh @@ -9,7 +9,7 @@ else IMAGE_VERSION=${WAZUH_IMAGE_VERSION}-dev fi -echo WAZUH_VERSION=$WAZUH_IMAGE_VERSION > env -echo WAZUH_IMAGE_VERSION=$IMAGE_VERSION >> env +echo WAZUH_VERSION=$WAZUH_IMAGE_VERSION > .env +echo WAZUH_IMAGE_VERSION=$IMAGE_VERSION >> .env -docker-compose -f build-docker-images/docker-compose.yml --env-file env build --no-cache \ No newline at end of file +docker-compose -f build-docker-images/docker-compose.yml --env-file .env build --no-cache \ No newline at end of file From 59ad1b171cf7eaef388ca45a877c312e2930a1be Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 26 May 2022 10:58:42 -0300 Subject: [PATCH 021/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index c9550626..1a6f3489 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -19,7 +19,7 @@ jobs: version: v0.3.16 - name: Execute Goss tests (wazuh-manager) - run: dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} + run: dgoss run wazuh/wazuh-manager:$WAZUH_IMAGE_VERSION env: GOSS_SLEEP: 30 GOSS_FILE: .github/.goss.yaml \ No newline at end of file From 79ac17ddbd2c86174f3ea1f2a277ab73e0548913 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 26 May 2022 11:07:42 -0300 Subject: [PATCH 022/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 1a6f3489..1a1b2fbc 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -19,7 +19,7 @@ jobs: version: v0.3.16 - name: Execute Goss tests (wazuh-manager) - run: dgoss run wazuh/wazuh-manager:$WAZUH_IMAGE_VERSION + run: dgoss run wazuh/wazuh-manager:${WAZUH_IMAGE_VERSION} env: GOSS_SLEEP: 30 GOSS_FILE: .github/.goss.yaml \ No newline at end of file From bb11f13e86350ef103b4be70f84d3c1ef56f53cf Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 26 May 2022 11:18:06 -0300 Subject: [PATCH 023/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 1a1b2fbc..c9550626 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -19,7 +19,7 @@ jobs: version: v0.3.16 - name: Execute Goss tests (wazuh-manager) - run: dgoss run wazuh/wazuh-manager:${WAZUH_IMAGE_VERSION} + run: dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} env: GOSS_SLEEP: 30 GOSS_FILE: .github/.goss.yaml \ No newline at end of file From d22547b9c578e210ffd6955d38f0185a0362cb60 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 26 May 2022 11:24:38 -0300 Subject: [PATCH 024/178] test CI --- .github/workflows/push.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index c9550626..9fbd0abb 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -13,6 +13,9 @@ jobs: - name: Build the docker-compose stack run: ./build.sh + - name: Create enviroment variables + run: cat .env > $GITHUB_ENV + - name: Install Goss uses: e1himself/goss-installation-action@v1.0.3 with: From 3a87d83debe50b441df3401049a3e78392bdb151 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 26 May 2022 12:26:15 -0300 Subject: [PATCH 025/178] test CI --- .github/workflows/push.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 9fbd0abb..efa2f6e4 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -25,4 +25,18 @@ jobs: run: dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} env: GOSS_SLEEP: 30 - GOSS_FILE: .github/.goss.yaml \ No newline at end of file + GOSS_FILE: .github/.goss.yaml + + - name: Create single node certficates + run: docker-compose -f single-node/generate-indexer-certs.yml run --rm generator + + - name: Start single node stack + run: docker-compose -f single-node/docker-compose.yml up -d + + - name: Sleep for 60 seconds + uses: jakejarvis/wait-action@master + with: + time: '60s' + + - name: Check Wazuh indexer start + run: curl -XGET curl https://0.0.0.0:9200/_cluster/health -u admin:SecretPassword -k \ No newline at end of file From 3d3a3d1274b830d6c4f6ff47a2b5d2837d0c8b9e Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 26 May 2022 12:36:30 -0300 Subject: [PATCH 026/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index efa2f6e4..582a746d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -39,4 +39,4 @@ jobs: time: '60s' - name: Check Wazuh indexer start - run: curl -XGET curl https://0.0.0.0:9200/_cluster/health -u admin:SecretPassword -k \ No newline at end of file + run: curl -XGET https://0.0.0.0:9200/_cluster/health -u admin:SecretPassword -k \ No newline at end of file From b10a00cade465f566e24e46a234bd8a71f5dede9 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 26 May 2022 13:03:41 -0300 Subject: [PATCH 027/178] test CI --- .github/workflows/push.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 582a746d..466e7d78 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -39,4 +39,9 @@ jobs: time: '60s' - name: Check Wazuh indexer start - run: curl -XGET https://0.0.0.0:9200/_cluster/health -u admin:SecretPassword -k \ No newline at end of file + run: curl -XGET https://0.0.0.0:9200/_cluster/health -u admin:SecretPassword -k + + - name: Check Wazuh indexer start + run: | + TOKEN=$(curl -u $API_USER:$API_PASSWORD -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") + curl -k -X GET "https://0.0.0.0:55000/agents/outdated?pretty=true" -H "Authorization: Bearer $TOKEN" \ No newline at end of file From 9fdf342fa32156049d240ec1d1abd035d7ff5131 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 26 May 2022 13:15:56 -0300 Subject: [PATCH 028/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 466e7d78..7d762b26 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -43,5 +43,5 @@ jobs: - name: Check Wazuh indexer start run: | - TOKEN=$(curl -u $API_USER:$API_PASSWORD -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") + TOKEN=$(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") curl -k -X GET "https://0.0.0.0:55000/agents/outdated?pretty=true" -H "Authorization: Bearer $TOKEN" \ No newline at end of file From 5f063fc445974652965110a14445d41c386dc1c5 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 26 May 2022 14:22:32 -0300 Subject: [PATCH 029/178] test CI --- .github/workflows/push.yml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 7d762b26..6a9599eb 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -38,10 +38,36 @@ jobs: with: time: '60s' + - name: Check Wazuh manager start + run: | + curl -XGET https://0.0.0.0:9200/_cluster/health?wait_for_status=green&timeout=120s -u admin:SecretPassword -k + curl -XGET https://0.0.0.0:9200/_cluster/nodes -u admin:SecretPassword -k + - name: Check Wazuh indexer start - run: curl -XGET https://0.0.0.0:9200/_cluster/health -u admin:SecretPassword -k + run: | + TOKEN=$(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") + curl -k -X GET "https://0.0.0.0:55000/agents/outdated?pretty=true" -H "Authorization: Bearer $TOKEN" + + - name: Stop single node stack + run: docker-compose -f single-node/docker-compose.yml down + + - name: Create multi node certficates + run: docker-compose -f multi-node/generate-indexer-certs.yml run --rm generator + + - name: Start multi node stack + run: docker-compose -f multi-node/docker-compose.yml up -d + + - name: Sleep for 60 seconds + uses: jakejarvis/wait-action@master + with: + time: '60s' - name: Check Wazuh indexer start + run: | + curl -XGET https://0.0.0.0:9200/_cluster/health?wait_for_status=green&timeout=120s -u admin:SecretPassword -k + curl -XGET https://0.0.0.0:9200/_cluster/nodes -u admin:SecretPassword -k + + - name: Check Wazuh manager start run: | TOKEN=$(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") curl -k -X GET "https://0.0.0.0:55000/agents/outdated?pretty=true" -H "Authorization: Bearer $TOKEN" \ No newline at end of file From ec6bfa962da64cbdcf6163c0c54465ff9f6b5b90 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 26 May 2022 14:27:59 -0300 Subject: [PATCH 030/178] test CI --- .github/workflows/push.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 6a9599eb..69801cd9 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -38,15 +38,15 @@ jobs: with: time: '60s' - - name: Check Wazuh manager start + - name: Check Wazuh indexer start run: | curl -XGET https://0.0.0.0:9200/_cluster/health?wait_for_status=green&timeout=120s -u admin:SecretPassword -k curl -XGET https://0.0.0.0:9200/_cluster/nodes -u admin:SecretPassword -k - - name: Check Wazuh indexer start + - name: Check Wazuh manager start run: | TOKEN=$(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") - curl -k -X GET "https://0.0.0.0:55000/agents/outdated?pretty=true" -H "Authorization: Bearer $TOKEN" + curl -k -X GET "https://0.0.0.0:55000" -H "Authorization: Bearer $TOKEN" - name: Stop single node stack run: docker-compose -f single-node/docker-compose.yml down @@ -70,4 +70,4 @@ jobs: - name: Check Wazuh manager start run: | TOKEN=$(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") - curl -k -X GET "https://0.0.0.0:55000/agents/outdated?pretty=true" -H "Authorization: Bearer $TOKEN" \ No newline at end of file + curl -k -X GET "https://0.0.0.0:55000" -H "Authorization: Bearer $TOKEN" \ No newline at end of file From 469f7db61a0934a4e2dec4c955c6020ed9f2fdb9 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 26 May 2022 15:02:49 -0300 Subject: [PATCH 031/178] test CI --- .github/workflows/push.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 69801cd9..61a9f453 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -40,8 +40,8 @@ jobs: - name: Check Wazuh indexer start run: | - curl -XGET https://0.0.0.0:9200/_cluster/health?wait_for_status=green&timeout=120s -u admin:SecretPassword -k - curl -XGET https://0.0.0.0:9200/_cluster/nodes -u admin:SecretPassword -k + curl -XGET "https://0.0.0.0:9200/_cluster/health?wait_for_status=green&timeout=120s" -u admin:SecretPassword -k + curl -XGET "https://0.0.0.0:9200/_cluster/nodes" -u admin:SecretPassword -k - name: Check Wazuh manager start run: | @@ -64,8 +64,8 @@ jobs: - name: Check Wazuh indexer start run: | - curl -XGET https://0.0.0.0:9200/_cluster/health?wait_for_status=green&timeout=120s -u admin:SecretPassword -k - curl -XGET https://0.0.0.0:9200/_cluster/nodes -u admin:SecretPassword -k + curl -XGET "https://0.0.0.0:9200/_cluster/health?wait_for_status=green&timeout=120s" -u admin:SecretPassword -k + curl -XGET "https://0.0.0.0:9200/_cluster/nodes" -u admin:SecretPassword -k - name: Check Wazuh manager start run: | From 7e8055f128dd7e61a8f4c6344f5446c556998719 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 26 May 2022 15:09:26 -0300 Subject: [PATCH 032/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 61a9f453..4a3f0c00 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -70,4 +70,4 @@ jobs: - name: Check Wazuh manager start run: | TOKEN=$(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") - curl -k -X GET "https://0.0.0.0:55000" -H "Authorization: Bearer $TOKEN" \ No newline at end of file + curl -k -X GET "https://0.0.0.0:55000" -H "Authorization: Bearer $TOKEN" From 872c121ba9fa4731261bfa7ec0f3ce99e1e47f28 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 26 May 2022 15:41:25 -0300 Subject: [PATCH 033/178] test CI --- .github/workflows/push.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 4a3f0c00..a4ac155f 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -41,7 +41,7 @@ jobs: - name: Check Wazuh indexer start run: | curl -XGET "https://0.0.0.0:9200/_cluster/health?wait_for_status=green&timeout=120s" -u admin:SecretPassword -k - curl -XGET "https://0.0.0.0:9200/_cluster/nodes" -u admin:SecretPassword -k + curl -XGET "https://0.0.0.0:9200/_cat/nodes?v" -u admin:SecretPassword -k - name: Check Wazuh manager start run: | @@ -51,6 +51,15 @@ jobs: - name: Stop single node stack run: docker-compose -f single-node/docker-compose.yml down + - name: Check Wazuh dashboard service URL + uses: jtalk/url-health-check-action@v2 + with: + url: https://0.0.0.0:443 + follow-redirect: true + max-attempts: 3 + retry-delay: 10s + retry-all: false + - name: Create multi node certficates run: docker-compose -f multi-node/generate-indexer-certs.yml run --rm generator @@ -65,9 +74,18 @@ jobs: - name: Check Wazuh indexer start run: | curl -XGET "https://0.0.0.0:9200/_cluster/health?wait_for_status=green&timeout=120s" -u admin:SecretPassword -k - curl -XGET "https://0.0.0.0:9200/_cluster/nodes" -u admin:SecretPassword -k + curl -XGET "https://0.0.0.0:9200/_cat/nodes?v" -u admin:SecretPassword -k - name: Check Wazuh manager start run: | TOKEN=$(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") curl -k -X GET "https://0.0.0.0:55000" -H "Authorization: Bearer $TOKEN" + + - name: Check Wazuh dashboard service URL + uses: jtalk/url-health-check-action@v2 + with: + url: https://0.0.0.0:443 + follow-redirect: true + max-attempts: 3 + retry-delay: 10s + retry-all: false From 182029155e0ba2e77b6a6a1b275ffe682faaac00 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 26 May 2022 15:59:21 -0300 Subject: [PATCH 034/178] test CI --- .github/workflows/push.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index a4ac155f..be6da63a 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -44,9 +44,9 @@ jobs: curl -XGET "https://0.0.0.0:9200/_cat/nodes?v" -u admin:SecretPassword -k - name: Check Wazuh manager start - run: | - TOKEN=$(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") - curl -k -X GET "https://0.0.0.0:55000" -H "Authorization: Bearer $TOKEN" + run: curl -k -X GET "https://0.0.0.0:55000" -H "Authorization: Bearer $TOKEN" + env: + TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") - name: Stop single node stack run: docker-compose -f single-node/docker-compose.yml down @@ -54,7 +54,7 @@ jobs: - name: Check Wazuh dashboard service URL uses: jtalk/url-health-check-action@v2 with: - url: https://0.0.0.0:443 + url: https://127.0.0.1:443 follow-redirect: true max-attempts: 3 retry-delay: 10s @@ -77,14 +77,15 @@ jobs: curl -XGET "https://0.0.0.0:9200/_cat/nodes?v" -u admin:SecretPassword -k - name: Check Wazuh manager start - run: | - TOKEN=$(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") - curl -k -X GET "https://0.0.0.0:55000" -H "Authorization: Bearer $TOKEN" + run: curl -k -X GET "https://0.0.0.0:55000/cluster/status" -H "Authorization: Bearer $TOKEN" + env: + TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") + - name: Check Wazuh dashboard service URL uses: jtalk/url-health-check-action@v2 with: - url: https://0.0.0.0:443 + url: https://127.0.0.1:443 follow-redirect: true max-attempts: 3 retry-delay: 10s From 7e26034e2207245cd1464591bdd0c14a957e3a5d Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 26 May 2022 16:01:52 -0300 Subject: [PATCH 035/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index be6da63a..76041e80 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -56,7 +56,7 @@ jobs: with: url: https://127.0.0.1:443 follow-redirect: true - max-attempts: 3 + max-attempts: 2 retry-delay: 10s retry-all: false From ccc781023d96bbb0edd617cd50be4c81d82430cc Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 26 May 2022 16:03:09 -0300 Subject: [PATCH 036/178] test CI --- .github/workflows/push.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 76041e80..211d25a4 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -44,7 +44,7 @@ jobs: curl -XGET "https://0.0.0.0:9200/_cat/nodes?v" -u admin:SecretPassword -k - name: Check Wazuh manager start - run: curl -k -X GET "https://0.0.0.0:55000" -H "Authorization: Bearer $TOKEN" + run: curl -k -X GET "https://0.0.0.0:55000" -H "Authorization: Bearer ${{env.TOKEN}}" env: TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") @@ -77,7 +77,7 @@ jobs: curl -XGET "https://0.0.0.0:9200/_cat/nodes?v" -u admin:SecretPassword -k - name: Check Wazuh manager start - run: curl -k -X GET "https://0.0.0.0:55000/cluster/status" -H "Authorization: Bearer $TOKEN" + run: curl -k -X GET "https://0.0.0.0:55000/cluster/status" -H "Authorization: Bearer ${{env.TOKEN}}" env: TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") From 571fad7a083e8d7acb2b51097e0f1b9336d538c5 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 26 May 2022 16:04:03 -0300 Subject: [PATCH 037/178] test CI --- .github/workflows/push.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 211d25a4..32fbe407 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -44,7 +44,8 @@ jobs: curl -XGET "https://0.0.0.0:9200/_cat/nodes?v" -u admin:SecretPassword -k - name: Check Wazuh manager start - run: curl -k -X GET "https://0.0.0.0:55000" -H "Authorization: Bearer ${{env.TOKEN}}" + run: | + curl -k -X GET "https://0.0.0.0:55000" -H "Authorization: Bearer ${{env.TOKEN}}" env: TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") @@ -77,7 +78,8 @@ jobs: curl -XGET "https://0.0.0.0:9200/_cat/nodes?v" -u admin:SecretPassword -k - name: Check Wazuh manager start - run: curl -k -X GET "https://0.0.0.0:55000/cluster/status" -H "Authorization: Bearer ${{env.TOKEN}}" + run: | + curl -k -X GET "https://0.0.0.0:55000/cluster/status" -H "Authorization: Bearer ${{env.TOKEN}}" env: TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") From 330763bcb01bb312694c538212d6b03ab6c29f45 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 26 May 2022 16:13:04 -0300 Subject: [PATCH 038/178] test CI --- .github/workflows/push.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 32fbe407..a54fca0d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -49,18 +49,18 @@ jobs: env: TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") - - name: Stop single node stack - run: docker-compose -f single-node/docker-compose.yml down - - name: Check Wazuh dashboard service URL uses: jtalk/url-health-check-action@v2 with: - url: https://127.0.0.1:443 + url: https://0.0.0.0:443 follow-redirect: true - max-attempts: 2 + max-attempts: 3 retry-delay: 10s retry-all: false + - name: Stop single node stack + run: docker-compose -f single-node/docker-compose.yml down + - name: Create multi node certficates run: docker-compose -f multi-node/generate-indexer-certs.yml run --rm generator From ceb920e87a3eca52897dc7e6f24a8de1e36c5cf4 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 26 May 2022 17:13:29 -0300 Subject: [PATCH 039/178] test CI --- .github/workflows/push.yml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index a54fca0d..a5581603 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -41,7 +41,7 @@ jobs: - name: Check Wazuh indexer start run: | curl -XGET "https://0.0.0.0:9200/_cluster/health?wait_for_status=green&timeout=120s" -u admin:SecretPassword -k - curl -XGET "https://0.0.0.0:9200/_cat/nodes?v" -u admin:SecretPassword -k + curl -XGET "https://0.0.0.0:9200/_cat/nodes?v" -u admin:SecretPassword -k | wc -l - name: Check Wazuh manager start run: | @@ -50,13 +50,7 @@ jobs: TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") - name: Check Wazuh dashboard service URL - uses: jtalk/url-health-check-action@v2 - with: - url: https://0.0.0.0:443 - follow-redirect: true - max-attempts: 3 - retry-delay: 10s - retry-all: false + run: curl -XGET --silent https://0.0.0.0:443/app/status -k -u admin:SecretPassword -I | grep -E "^HTTP" | awk '{print $2}' - name: Stop single node stack run: docker-compose -f single-node/docker-compose.yml down @@ -75,7 +69,7 @@ jobs: - name: Check Wazuh indexer start run: | curl -XGET "https://0.0.0.0:9200/_cluster/health?wait_for_status=green&timeout=120s" -u admin:SecretPassword -k - curl -XGET "https://0.0.0.0:9200/_cat/nodes?v" -u admin:SecretPassword -k + curl -XGET "https://0.0.0.0:9200/_cat/nodes?v" -u admin:SecretPassword -k | wc -l - name: Check Wazuh manager start run: | @@ -85,10 +79,4 @@ jobs: - name: Check Wazuh dashboard service URL - uses: jtalk/url-health-check-action@v2 - with: - url: https://127.0.0.1:443 - follow-redirect: true - max-attempts: 3 - retry-delay: 10s - retry-all: false + run: curl -XGET --silent https://0.0.0.0:443/app/status -k -u admin:SecretPassword -I | grep -E "^HTTP" | awk '{print $2}' From dfa11c08a48ebd070d5ce7d65abca90489550a15 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 26 May 2022 17:22:26 -0300 Subject: [PATCH 040/178] test CI --- .github/workflows/push.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index a5581603..224ca1b9 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -33,11 +33,6 @@ jobs: - name: Start single node stack run: docker-compose -f single-node/docker-compose.yml up -d - - name: Sleep for 60 seconds - uses: jakejarvis/wait-action@master - with: - time: '60s' - - name: Check Wazuh indexer start run: | curl -XGET "https://0.0.0.0:9200/_cluster/health?wait_for_status=green&timeout=120s" -u admin:SecretPassword -k @@ -61,11 +56,6 @@ jobs: - name: Start multi node stack run: docker-compose -f multi-node/docker-compose.yml up -d - - name: Sleep for 60 seconds - uses: jakejarvis/wait-action@master - with: - time: '60s' - - name: Check Wazuh indexer start run: | curl -XGET "https://0.0.0.0:9200/_cluster/health?wait_for_status=green&timeout=120s" -u admin:SecretPassword -k From 579fa1055191864d4e4dc05dc655f90b69358167 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 11:33:26 -0300 Subject: [PATCH 041/178] test CI --- .github/workflows/push.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 224ca1b9..8134b400 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -36,11 +36,14 @@ jobs: - name: Check Wazuh indexer start run: | curl -XGET "https://0.0.0.0:9200/_cluster/health?wait_for_status=green&timeout=120s" -u admin:SecretPassword -k + + - name: Check Wazuh indexer nodes + run: | curl -XGET "https://0.0.0.0:9200/_cat/nodes?v" -u admin:SecretPassword -k | wc -l - name: Check Wazuh manager start run: | - curl -k -X GET "https://0.0.0.0:55000" -H "Authorization: Bearer ${{env.TOKEN}}" + curl -k -X GET "https://0.0.0.0:55000/cluster/status" -H "Authorization: Bearer ${{env.TOKEN}}" env: TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") @@ -59,6 +62,9 @@ jobs: - name: Check Wazuh indexer start run: | curl -XGET "https://0.0.0.0:9200/_cluster/health?wait_for_status=green&timeout=120s" -u admin:SecretPassword -k + + - name: Check Wazuh indexer nodes + run: | curl -XGET "https://0.0.0.0:9200/_cat/nodes?v" -u admin:SecretPassword -k | wc -l - name: Check Wazuh manager start From 704b183002d3bee76c413070802176b1146e8dec Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 11:44:22 -0300 Subject: [PATCH 042/178] test CI --- .github/workflows/push.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 8134b400..14c7bf30 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -35,7 +35,8 @@ jobs: - name: Check Wazuh indexer start run: | - curl -XGET "https://0.0.0.0:9200/_cluster/health?wait_for_status=green&timeout=120s" -u admin:SecretPassword -k + sleep 60 + curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k - name: Check Wazuh indexer nodes run: | @@ -61,7 +62,8 @@ jobs: - name: Check Wazuh indexer start run: | - curl -XGET "https://0.0.0.0:9200/_cluster/health?wait_for_status=green&timeout=120s" -u admin:SecretPassword -k + sleep 60 + curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k - name: Check Wazuh indexer nodes run: | From 111cfca50c1e51ba5e94b71c2e3d634a2d5756c0 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 11:57:47 -0300 Subject: [PATCH 043/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 14c7bf30..03b72d8e 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -62,7 +62,7 @@ jobs: - name: Check Wazuh indexer start run: | - sleep 60 + sleep 120 curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k - name: Check Wazuh indexer nodes From b7a55ab174c434e05361da1fe9e51d3c511670b1 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 12:17:16 -0300 Subject: [PATCH 044/178] test CI --- .github/workflows/push.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 03b72d8e..8941e029 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -10,8 +10,8 @@ jobs: - name: Check out code uses: actions/checkout@v3 - - name: Build the docker-compose stack - run: ./build.sh +## - name: Build Wazuh images +## run: ./build.sh - name: Create enviroment variables run: cat .env > $GITHUB_ENV @@ -44,7 +44,7 @@ jobs: - name: Check Wazuh manager start run: | - curl -k -X GET "https://0.0.0.0:55000/cluster/status" -H "Authorization: Bearer ${{env.TOKEN}}" + curl -k -X GET "https://0.0.0.0:55000/cluster/info" -H "Authorization: Bearer ${{env.TOKEN}}" env: TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") @@ -71,7 +71,7 @@ jobs: - name: Check Wazuh manager start run: | - curl -k -X GET "https://0.0.0.0:55000/cluster/status" -H "Authorization: Bearer ${{env.TOKEN}}" + curl -k -X GET "https://0.0.0.0:55000/cluster/info" -H "Authorization: Bearer ${{env.TOKEN}}" env: TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") From 19e5c24a2ebca19b101c3bbd0cfb68cf23e27028 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 12:25:00 -0300 Subject: [PATCH 045/178] test CI --- .github/workflows/push.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 8941e029..faa2c278 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -21,11 +21,11 @@ jobs: with: version: v0.3.16 - - name: Execute Goss tests (wazuh-manager) - run: dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} - env: - GOSS_SLEEP: 30 - GOSS_FILE: .github/.goss.yaml +## - name: Execute Goss tests (wazuh-manager) +## run: dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} +## env: +## GOSS_SLEEP: 30 +## GOSS_FILE: .github/.goss.yaml - name: Create single node certficates run: docker-compose -f single-node/generate-indexer-certs.yml run --rm generator From ba3409acee17b23263649c7ce75c742e951ee43e Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 13:20:44 -0300 Subject: [PATCH 046/178] test CI --- .github/workflows/push.yml | 10 ++++++++-- single-node/prueba.sh | 6 ++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100755 single-node/prueba.sh diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index faa2c278..60f2f843 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -40,7 +40,13 @@ jobs: - name: Check Wazuh indexer nodes run: | - curl -XGET "https://0.0.0.0:9200/_cat/nodes?v" -u admin:SecretPassword -k | wc -l + nodes="`curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k | grep -E "indexer" | wc -l`" + if [[ $nodes -eq 1 ]]; then + echo "Cantidad de nodos: ${nodes}" + else + echo "Cantidad de nodos: ${nodes}" + exit 1 + fi - name: Check Wazuh manager start run: | @@ -67,7 +73,7 @@ jobs: - name: Check Wazuh indexer nodes run: | - curl -XGET "https://0.0.0.0:9200/_cat/nodes?v" -u admin:SecretPassword -k | wc -l + curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k | wc -l - name: Check Wazuh manager start run: | diff --git a/single-node/prueba.sh b/single-node/prueba.sh new file mode 100755 index 00000000..7393163e --- /dev/null +++ b/single-node/prueba.sh @@ -0,0 +1,6 @@ +nodes="`curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k | grep -E "indexer" | wc -l`" +if [[ $nodes -eq 1 ]]; then + echo "bien" +else + echo "mal" +fi From e0c7194444322b6bb5003c2a23bfe26ce4f63d14 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 13:31:08 -0300 Subject: [PATCH 047/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 60f2f843..09c7ca91 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -41,7 +41,7 @@ jobs: - name: Check Wazuh indexer nodes run: | nodes="`curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k | grep -E "indexer" | wc -l`" - if [[ $nodes -eq 1 ]]; then + if [[ $nodes -eq 2 ]]; then echo "Cantidad de nodos: ${nodes}" else echo "Cantidad de nodos: ${nodes}" From 54756054bcd5224b981dd8212549c2011dfdf1af Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 13:36:35 -0300 Subject: [PATCH 048/178] test CI --- .github/workflows/push.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 09c7ca91..72d7e9bd 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -41,7 +41,7 @@ jobs: - name: Check Wazuh indexer nodes run: | nodes="`curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k | grep -E "indexer" | wc -l`" - if [[ $nodes -eq 2 ]]; then + if [[ $nodes -eq 1 ]]; then echo "Cantidad de nodos: ${nodes}" else echo "Cantidad de nodos: ${nodes}" @@ -73,7 +73,13 @@ jobs: - name: Check Wazuh indexer nodes run: | - curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k | wc -l + nodes="`curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k | grep -E "indexer" | wc -l`" + if [[ $nodes -eq 1 ]]; then + echo "Cantidad de nodos: ${nodes}" + else + echo "Cantidad de nodos: ${nodes}" + exit 1 + fi - name: Check Wazuh manager start run: | From bb7723d6bee008a095f1b39aada744215e3235f6 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 13:42:32 -0300 Subject: [PATCH 049/178] test CI --- .github/workflows/push.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 72d7e9bd..990d86d0 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -42,9 +42,9 @@ jobs: run: | nodes="`curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k | grep -E "indexer" | wc -l`" if [[ $nodes -eq 1 ]]; then - echo "Cantidad de nodos: ${nodes}" + echo "Wazuh manager nodes: ${nodes}" else - echo "Cantidad de nodos: ${nodes}" + echo "Wazuh manager nodes: ${nodes}" exit 1 fi @@ -74,10 +74,10 @@ jobs: - name: Check Wazuh indexer nodes run: | nodes="`curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k | grep -E "indexer" | wc -l`" - if [[ $nodes -eq 1 ]]; then - echo "Cantidad de nodos: ${nodes}" + if [[ $nodes -eq 3 ]]; then + echo "Wazuh manager nodes: ${nodes}" else - echo "Cantidad de nodos: ${nodes}" + echo "Wazuh manager nodes: ${nodes}" exit 1 fi From 11b3160aa40066e95bb6d7ad3f8c9636d492834e Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 13:55:14 -0300 Subject: [PATCH 050/178] test CI --- .github/workflows/push.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 990d86d0..31c77609 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -42,15 +42,15 @@ jobs: run: | nodes="`curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k | grep -E "indexer" | wc -l`" if [[ $nodes -eq 1 ]]; then - echo "Wazuh manager nodes: ${nodes}" + echo "Wazuh indexer nodes: ${nodes}" else - echo "Wazuh manager nodes: ${nodes}" + echo "Wazuh indexer nodes: ${nodes}" exit 1 fi - name: Check Wazuh manager start run: | - curl -k -X GET "https://0.0.0.0:55000/cluster/info" -H "Authorization: Bearer ${{env.TOKEN}}" + curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}" env: TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") @@ -75,9 +75,9 @@ jobs: run: | nodes="`curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k | grep -E "indexer" | wc -l`" if [[ $nodes -eq 3 ]]; then - echo "Wazuh manager nodes: ${nodes}" + echo "Wazuh indexer nodes: ${nodes}" else - echo "Wazuh manager nodes: ${nodes}" + echo "Wazuh indexer nodes: ${nodes}" exit 1 fi From cacc8fc3d3df9a6460e867401e1d025b96fccb58 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 14:01:47 -0300 Subject: [PATCH 051/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 31c77609..13c06933 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -83,7 +83,7 @@ jobs: - name: Check Wazuh manager start run: | - curl -k -X GET "https://0.0.0.0:55000/cluster/info" -H "Authorization: Bearer ${{env.TOKEN}}" + curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}" env: TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") From 66dda69a91fdf59e1a6dbcae910c4ee07938f249 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 16:20:39 -0300 Subject: [PATCH 052/178] test CI --- .github/workflows/push.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 13c06933..f41a59a5 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -83,7 +83,11 @@ jobs: - name: Check Wazuh manager start run: | - curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}" + wget https://packages-dev.wazuh.com/4.3/wazuh-certs-tool.sh -u wazuh-certs-tool.sh + source wazuh-certs-tool.sh >> /dev/null + nodes="`curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}"`" + cert_parseYaml $nodes + env: TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") From 2e0a7b7c3d4936c4a432e37998d0a7a604f7e4c3 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 16:31:17 -0300 Subject: [PATCH 053/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index f41a59a5..cf408b1d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -83,7 +83,7 @@ jobs: - name: Check Wazuh manager start run: | - wget https://packages-dev.wazuh.com/4.3/wazuh-certs-tool.sh -u wazuh-certs-tool.sh + wget https://packages-dev.wazuh.com/4.3/wazuh-certs-tool.sh -o wazuh-certs-tool.sh source wazuh-certs-tool.sh >> /dev/null nodes="`curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}"`" cert_parseYaml $nodes From 9ef724b46ce14801676b37bf4884320f6d9a4d52 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 16:37:02 -0300 Subject: [PATCH 054/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index cf408b1d..13a51393 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -83,7 +83,7 @@ jobs: - name: Check Wazuh manager start run: | - wget https://packages-dev.wazuh.com/4.3/wazuh-certs-tool.sh -o wazuh-certs-tool.sh + wget https://packages.wazuh.com/4.3/wazuh-certs-tool.sh -o wazuh-certs-tool.sh source wazuh-certs-tool.sh >> /dev/null nodes="`curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}"`" cert_parseYaml $nodes From 19fdf939429155041444a4dc08199ee19491e5d1 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 16:42:37 -0300 Subject: [PATCH 055/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 13a51393..9ffde528 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -84,7 +84,7 @@ jobs: - name: Check Wazuh manager start run: | wget https://packages.wazuh.com/4.3/wazuh-certs-tool.sh -o wazuh-certs-tool.sh - source wazuh-certs-tool.sh >> /dev/null + source ./wazuh-certs-tool.sh >> /dev/null nodes="`curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}"`" cert_parseYaml $nodes From 3ab210f8c0c04d7e1c6258bce5cce5dfc2af513e Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 16:58:21 -0300 Subject: [PATCH 056/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 9ffde528..f7d4f45d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -84,7 +84,7 @@ jobs: - name: Check Wazuh manager start run: | wget https://packages.wazuh.com/4.3/wazuh-certs-tool.sh -o wazuh-certs-tool.sh - source ./wazuh-certs-tool.sh >> /dev/null + source ./wazuh-certs-tool.sh | true nodes="`curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}"`" cert_parseYaml $nodes From 30ed0e6bb411de5f9f93291a02b2582b5d0e0bb3 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 17:24:12 -0300 Subject: [PATCH 057/178] test CI --- .github/workflows/push.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index f7d4f45d..a67f0d73 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -83,11 +83,14 @@ jobs: - name: Check Wazuh manager start run: | - wget https://packages.wazuh.com/4.3/wazuh-certs-tool.sh -o wazuh-certs-tool.sh - source ./wazuh-certs-tool.sh | true - nodes="`curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}"`" - cert_parseYaml $nodes - + apt install jq -y + nodes=curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer $TOKEN" | jq -r ".data.affected_items[].name" | wc -l + if [[ $nodes -eq 2 ]]; then + echo "Wazuh indexer nodes: ${nodes}" + else + echo "Wazuh indexer nodes: ${nodes}" + exit 1 + fi env: TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") From 111f04fb0b226c4d72f2f0af7615b87f01cc34c2 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 17:30:28 -0300 Subject: [PATCH 058/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index a67f0d73..da85683d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -83,7 +83,7 @@ jobs: - name: Check Wazuh manager start run: | - apt install jq -y + sudo apt install jq -y nodes=curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer $TOKEN" | jq -r ".data.affected_items[].name" | wc -l if [[ $nodes -eq 2 ]]; then echo "Wazuh indexer nodes: ${nodes}" From 77520d56ea797c278240ec667703f2a345d78689 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 17:35:42 -0300 Subject: [PATCH 059/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index da85683d..056217e3 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -82,8 +82,8 @@ jobs: fi - name: Check Wazuh manager start + # uses: sergeysova/jq-action@v2 run: | - sudo apt install jq -y nodes=curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer $TOKEN" | jq -r ".data.affected_items[].name" | wc -l if [[ $nodes -eq 2 ]]; then echo "Wazuh indexer nodes: ${nodes}" From 613dc9fbb7fa8be6301ecf1d18d6fb38f895ca16 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 17:44:02 -0300 Subject: [PATCH 060/178] test CI --- .github/workflows/push.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 056217e3..d71610d7 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -84,11 +84,11 @@ jobs: - name: Check Wazuh manager start # uses: sergeysova/jq-action@v2 run: | - nodes=curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer $TOKEN" | jq -r ".data.affected_items[].name" | wc -l + nodes=$(curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer $TOKEN" | jq -r ".data.affected_items[].name" | wc -l) if [[ $nodes -eq 2 ]]; then - echo "Wazuh indexer nodes: ${nodes}" + echo "Wazuh manager nodes: ${nodes}" else - echo "Wazuh indexer nodes: ${nodes}" + echo "Wazuh manager nodes: ${nodes}" exit 1 fi env: From d1499136f60ab4f76d3ddbc5c0e8290d0212fc02 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 17:52:25 -0300 Subject: [PATCH 061/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index d71610d7..d663b470 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -84,7 +84,7 @@ jobs: - name: Check Wazuh manager start # uses: sergeysova/jq-action@v2 run: | - nodes=$(curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer $TOKEN" | jq -r ".data.affected_items[].name" | wc -l) + curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer $TOKEN" | jq -r ".data.affected_items[].name" if [[ $nodes -eq 2 ]]; then echo "Wazuh manager nodes: ${nodes}" else From 290affdaa3a2eb81907d5cdff9bdb4e027e44626 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 17:58:19 -0300 Subject: [PATCH 062/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index d663b470..1f391cdb 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -84,7 +84,7 @@ jobs: - name: Check Wazuh manager start # uses: sergeysova/jq-action@v2 run: | - curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer $TOKEN" | jq -r ".data.affected_items[].name" + nodes=$(curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r ".data.affected_items[].name" | wc -l) if [[ $nodes -eq 2 ]]; then echo "Wazuh manager nodes: ${nodes}" else From 8b2f64a3f8a40f85fafa45196e2d10d254e6df1d Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 18:03:25 -0300 Subject: [PATCH 063/178] test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 1f391cdb..4ee0f296 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -85,7 +85,7 @@ jobs: # uses: sergeysova/jq-action@v2 run: | nodes=$(curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r ".data.affected_items[].name" | wc -l) - if [[ $nodes -eq 2 ]]; then + if [[ $nodes -eq 3 ]]; then echo "Wazuh manager nodes: ${nodes}" else echo "Wazuh manager nodes: ${nodes}" From 5591833d2f05a0199ab68fcd101496659ce04783 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 18:21:37 -0300 Subject: [PATCH 064/178] test CI --- .github/workflows/push.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 4ee0f296..fae73f71 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -85,7 +85,7 @@ jobs: # uses: sergeysova/jq-action@v2 run: | nodes=$(curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r ".data.affected_items[].name" | wc -l) - if [[ $nodes -eq 3 ]]; then + if [[ $nodes -eq 2 ]]; then echo "Wazuh manager nodes: ${nodes}" else echo "Wazuh manager nodes: ${nodes}" @@ -96,4 +96,11 @@ jobs: - name: Check Wazuh dashboard service URL - run: curl -XGET --silent https://0.0.0.0:443/app/status -k -u admin:SecretPassword -I | grep -E "^HTTP" | awk '{print $2}' + run: | + status=$(curl -XGET --silent https://0.0.0.0:443/app/status -k -u admin:SecretPassword -I | grep -E "^HTTP" | awk '{print $2}') + if [[ $status -eq 200 ]]; then + echo "Wazuh dashboard status: ${nodes}" + else + echo "Wazuh dashboard status: ${nodes}" + exit 1 + fi \ No newline at end of file From de1e435e26dd0ad7e8f8d053a068998d01321cc4 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 18:27:50 -0300 Subject: [PATCH 065/178] test CI --- .github/workflows/push.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index fae73f71..a9707166 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -55,7 +55,14 @@ jobs: TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") - name: Check Wazuh dashboard service URL - run: curl -XGET --silent https://0.0.0.0:443/app/status -k -u admin:SecretPassword -I | grep -E "^HTTP" | awk '{print $2}' + run: | + status=$(curl -XGET --silent https://0.0.0.0:443/app/status -k -u admin:SecretPassword -I | grep -E "^HTTP" | awk '{print $2}') + if [[ $status -eq 200 ]]; then + echo "Wazuh dashboard status: ${status}" + else + echo "Wazuh dashboard status: ${status}" + exit 1 + fi - name: Stop single node stack run: docker-compose -f single-node/docker-compose.yml down @@ -99,8 +106,8 @@ jobs: run: | status=$(curl -XGET --silent https://0.0.0.0:443/app/status -k -u admin:SecretPassword -I | grep -E "^HTTP" | awk '{print $2}') if [[ $status -eq 200 ]]; then - echo "Wazuh dashboard status: ${nodes}" + echo "Wazuh dashboard status: ${status}" else - echo "Wazuh dashboard status: ${nodes}" + echo "Wazuh dashboard status: ${status}" exit 1 fi \ No newline at end of file From 8795763cd2a28190749fb5b814f8a3bd7441913b Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 18:50:10 -0300 Subject: [PATCH 066/178] test CI --- .github/workflows/push.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index a9707166..fd3b510d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -48,6 +48,16 @@ jobs: exit 1 fi + - name: Check documents into wazuh-alerts index + run: | + docs="`curl -XGET "https://0.0.0.0:9200/wazuh-alerts*/_doc/_search" -u admin:SecretPassword -k | jq -r ".hits.total.value"`" + if [[ $docs -gt 0 ]]; then + echo "wazuh-alerts index documents: ${docs}" + else + echo "wazuh-alerts index documents: ${docs}" + exit 1 + fi + - name: Check Wazuh manager start run: | curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}" @@ -88,8 +98,17 @@ jobs: exit 1 fi + - name: Check documents into wazuh-alerts index + run: | + docs="`curl -XGET "https://0.0.0.0:9200/wazuh-alerts*/_doc/_search" -u admin:SecretPassword -k | jq -r ".hits.total.value"`" + if [[ $docs -gt 0 ]]; then + echo "wazuh-alerts index documents: ${docs}" + else + echo "wazuh-alerts index documents: ${docs}" + exit 1 + fi + - name: Check Wazuh manager start - # uses: sergeysova/jq-action@v2 run: | nodes=$(curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r ".data.affected_items[].name" | wc -l) if [[ $nodes -eq 2 ]]; then @@ -101,7 +120,6 @@ jobs: env: TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") - - name: Check Wazuh dashboard service URL run: | status=$(curl -XGET --silent https://0.0.0.0:443/app/status -k -u admin:SecretPassword -I | grep -E "^HTTP" | awk '{print $2}') From de28f0babca1b51e5500948a74bea8c8af7873cc Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 19:13:15 -0300 Subject: [PATCH 067/178] test CI --- .github/workflows/push.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index fd3b510d..0a19ad70 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -58,6 +58,19 @@ jobs: exit 1 fi + - name: Check Wazuh templates + run: | + qty_templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k | grep "wazuh" | wc -l`" + templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k | grep "wazuh"`" + if [[ $qty_templates -gt 0 ]]; then + echo "wazuh templates:" + echo "${templates}" + else + echo "wazuh templates:" + echo "${templates}" + exit 1 + fi + - name: Check Wazuh manager start run: | curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}" @@ -108,6 +121,19 @@ jobs: exit 1 fi + - name: Check Wazuh templates + run: | + qty_templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k | grep "wazuh" | wc -l`" + templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k | grep "wazuh"`" + if [[ $qty_templates -gt 0 ]]; then + echo "wazuh templates:" + echo "${templates}" + else + echo "wazuh templates:" + echo "${templates}" + exit 1 + fi + - name: Check Wazuh manager start run: | nodes=$(curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r ".data.affected_items[].name" | wc -l) From 83400ba1e5257d55738f6d65e59ad749d7776084 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 2 Jun 2022 10:31:20 -0300 Subject: [PATCH 068/178] bump 4.3.3 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index b5d8eeef..f675ddc8 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ WAZUH-DOCKER_VERSION="4.3.3" -REVISION="40314" +REVISION="40315" From 437fbe63d1d30c1f17eda57b63f1764c8a4fd41b Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 2 Jun 2022 15:24:28 -0300 Subject: [PATCH 069/178] Test CI --- .github/workflows/push.yml | 14 +++++++------- build.sh => build-images.sh | 0 2 files changed, 7 insertions(+), 7 deletions(-) rename build.sh => build-images.sh (100%) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 0a19ad70..36025863 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -10,8 +10,8 @@ jobs: - name: Check out code uses: actions/checkout@v3 -## - name: Build Wazuh images -## run: ./build.sh + - name: Build Wazuh images + run: ./build-images.sh - name: Create enviroment variables run: cat .env > $GITHUB_ENV @@ -21,11 +21,11 @@ jobs: with: version: v0.3.16 -## - name: Execute Goss tests (wazuh-manager) -## run: dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} -## env: -## GOSS_SLEEP: 30 -## GOSS_FILE: .github/.goss.yaml + - name: Execute Goss tests (wazuh-manager) + run: dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} + env: + GOSS_SLEEP: 30 + GOSS_FILE: .github/.goss.yaml - name: Create single node certficates run: docker-compose -f single-node/generate-indexer-certs.yml run --rm generator diff --git a/build.sh b/build-images.sh similarity index 100% rename from build.sh rename to build-images.sh From 0f2fd8417342bef99b57152555bb50bcc84b6edc Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 2 Jun 2022 15:47:59 -0300 Subject: [PATCH 070/178] Test CI --- build-images.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-images.sh b/build-images.sh index def889e8..8f2de409 100755 --- a/build-images.sh +++ b/build-images.sh @@ -2,7 +2,7 @@ WAZUH_IMAGE_VERSION=4.3.1 WAZUH_VERSION=$(echo $WAZUH_IMAGE_VERSION | sed -e 's/\.//g') WAZUH_ACTUAL_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g') -## If wazuh manager exists in apt dev repository, change variables, if not exit 1 +## If wazuh manager exists in apt dev repository, change variables, if not, exit 1 if [ "$WAZUH_VERSION" -le "$WAZUH_ACTUAL_VERSION" ]; then IMAGE_VERSION=${WAZUH_IMAGE_VERSION} else From 0313563a0caa61dbf429828b76627b508815c8bc Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 2 Jun 2022 16:21:30 -0300 Subject: [PATCH 071/178] Test CI --- .github/workflows/push.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 36025863..13a623da 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -73,7 +73,15 @@ jobs: - name: Check Wazuh manager start run: | - curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}" + services="`curl -k -X GET "https://0.0.0.0:55000/manager/status?pretty=true" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r .data.affected_items | grep running | wc -l`" + if [[ $services -eg 10 ]]; then + echo "Wazuh Manager Services: ${services}" + echo "OK" + else + echo "Wazuh indexer nodes: ${nodes}" + curl -k -X GET "https://0.0.0.0:55000/manager/status?pretty=true" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r .data.affected_items + exit 1 + fi env: TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") @@ -136,6 +144,15 @@ jobs: - name: Check Wazuh manager start run: | + services="`curl -k -X GET "https://0.0.0.0:55000/manager/status?pretty=true" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r .data.affected_items | grep running | wc -l`" + if [[ $services -eg 11 ]]; then + echo "Wazuh Manager Services: ${services}" + echo "OK" + else + echo "Wazuh indexer nodes: ${nodes}" + curl -k -X GET "https://0.0.0.0:55000/manager/status?pretty=true" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r .data.affected_items + exit 1 + fi nodes=$(curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r ".data.affected_items[].name" | wc -l) if [[ $nodes -eq 2 ]]; then echo "Wazuh manager nodes: ${nodes}" From d7e937d2f80deebd9ae313d70c01a5da1301e1ab Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 2 Jun 2022 16:41:22 -0300 Subject: [PATCH 072/178] Test CI --- .github/workflows/push.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 13a623da..b2fb68fc 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -74,7 +74,7 @@ jobs: - name: Check Wazuh manager start run: | services="`curl -k -X GET "https://0.0.0.0:55000/manager/status?pretty=true" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r .data.affected_items | grep running | wc -l`" - if [[ $services -eg 10 ]]; then + if [[ $services -gt 9 ]]; then echo "Wazuh Manager Services: ${services}" echo "OK" else @@ -145,7 +145,7 @@ jobs: - name: Check Wazuh manager start run: | services="`curl -k -X GET "https://0.0.0.0:55000/manager/status?pretty=true" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r .data.affected_items | grep running | wc -l`" - if [[ $services -eg 11 ]]; then + if [[ $services -gt 10 ]]; then echo "Wazuh Manager Services: ${services}" echo "OK" else From d578dfbd39df348d78c9b2472e24355a0139a09c Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 3 Jun 2022 15:44:55 -0300 Subject: [PATCH 073/178] Test CI --- .github/workflows/push.yml | 4 ++-- build-images.sh => build-docker-images/build-images.sh | 2 +- build-docker-images/{docker-compose.yml => build-images.yml} | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename build-images.sh => build-docker-images/build-images.sh (87%) rename build-docker-images/{docker-compose.yml => build-images.yml} (100%) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index b2fb68fc..aeaac25c 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,6 +1,6 @@ name: Wazuh Docker pipeline -on: [pull_request, push] +on: [pull_request] jobs: build-stack: @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v3 - name: Build Wazuh images - run: ./build-images.sh + run: build-docker-images/build-images.sh - name: Create enviroment variables run: cat .env > $GITHUB_ENV diff --git a/build-images.sh b/build-docker-images/build-images.sh similarity index 87% rename from build-images.sh rename to build-docker-images/build-images.sh index 8f2de409..9218e49e 100755 --- a/build-images.sh +++ b/build-docker-images/build-images.sh @@ -12,4 +12,4 @@ fi echo WAZUH_VERSION=$WAZUH_IMAGE_VERSION > .env echo WAZUH_IMAGE_VERSION=$IMAGE_VERSION >> .env -docker-compose -f build-docker-images/docker-compose.yml --env-file .env build --no-cache \ No newline at end of file +docker-compose -f build-images.yml --env-file .env build --no-cache \ No newline at end of file diff --git a/build-docker-images/docker-compose.yml b/build-docker-images/build-images.yml similarity index 100% rename from build-docker-images/docker-compose.yml rename to build-docker-images/build-images.yml From 8f6d24de7705512e34010d29311ba14ef1e8c6c6 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 3 Jun 2022 16:24:26 -0300 Subject: [PATCH 074/178] Test CI --- .github/workflows/push.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index aeaac25c..6a0bae1d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -36,11 +36,11 @@ jobs: - name: Check Wazuh indexer start run: | sleep 60 - curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k + curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s | grep green - name: Check Wazuh indexer nodes run: | - nodes="`curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k | grep -E "indexer" | wc -l`" + nodes="`curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k -s | grep -E "indexer" | wc -l`" if [[ $nodes -eq 1 ]]; then echo "Wazuh indexer nodes: ${nodes}" else @@ -50,7 +50,7 @@ jobs: - name: Check documents into wazuh-alerts index run: | - docs="`curl -XGET "https://0.0.0.0:9200/wazuh-alerts*/_doc/_search" -u admin:SecretPassword -k | jq -r ".hits.total.value"`" + docs="`curl -XGET "https://0.0.0.0:9200/wazuh-alerts*/_doc/_search" -u admin:SecretPassword -k -s | jq -r ".hits.total.value"`" if [[ $docs -gt 0 ]]; then echo "wazuh-alerts index documents: ${docs}" else @@ -60,8 +60,8 @@ jobs: - name: Check Wazuh templates run: | - qty_templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k | grep "wazuh" | wc -l`" - templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k | grep "wazuh"`" + qty_templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep "wazuh" | wc -l`" + templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep "wazuh"`" if [[ $qty_templates -gt 0 ]]; then echo "wazuh templates:" echo "${templates}" @@ -73,7 +73,7 @@ jobs: - name: Check Wazuh manager start run: | - services="`curl -k -X GET "https://0.0.0.0:55000/manager/status?pretty=true" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r .data.affected_items | grep running | wc -l`" + services="`curl -k -s -X GET "https://0.0.0.0:55000/manager/status?pretty=true" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r .data.affected_items | grep running | wc -l`" if [[ $services -gt 9 ]]; then echo "Wazuh Manager Services: ${services}" echo "OK" @@ -83,11 +83,11 @@ jobs: exit 1 fi env: - TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") + TOKEN: $(curl -u -s wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") - name: Check Wazuh dashboard service URL run: | - status=$(curl -XGET --silent https://0.0.0.0:443/app/status -k -u admin:SecretPassword -I | grep -E "^HTTP" | awk '{print $2}') + status=$(curl -XGET --silent https://0.0.0.0:443/app/status -k -u admin:SecretPassword -I -s | grep -E "^HTTP" | awk '{print $2}') if [[ $status -eq 200 ]]; then echo "Wazuh dashboard status: ${status}" else @@ -111,7 +111,7 @@ jobs: - name: Check Wazuh indexer nodes run: | - nodes="`curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k | grep -E "indexer" | wc -l`" + nodes="`curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k -s | grep -E "indexer" | wc -l`" if [[ $nodes -eq 3 ]]; then echo "Wazuh indexer nodes: ${nodes}" else @@ -121,7 +121,7 @@ jobs: - name: Check documents into wazuh-alerts index run: | - docs="`curl -XGET "https://0.0.0.0:9200/wazuh-alerts*/_doc/_search" -u admin:SecretPassword -k | jq -r ".hits.total.value"`" + docs="`curl -XGET "https://0.0.0.0:9200/wazuh-alerts*/_doc/_search" -u admin:SecretPassword -k -s | jq -r ".hits.total.value"`" if [[ $docs -gt 0 ]]; then echo "wazuh-alerts index documents: ${docs}" else @@ -131,8 +131,8 @@ jobs: - name: Check Wazuh templates run: | - qty_templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k | grep "wazuh" | wc -l`" - templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k | grep "wazuh"`" + qty_templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep "wazuh" | wc -l`" + templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep "wazuh"`" if [[ $qty_templates -gt 0 ]]; then echo "wazuh templates:" echo "${templates}" @@ -144,16 +144,16 @@ jobs: - name: Check Wazuh manager start run: | - services="`curl -k -X GET "https://0.0.0.0:55000/manager/status?pretty=true" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r .data.affected_items | grep running | wc -l`" + services="`curl -k -s -X GET "https://0.0.0.0:55000/manager/status?pretty=true" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r .data.affected_items | grep running | wc -l`" if [[ $services -gt 10 ]]; then echo "Wazuh Manager Services: ${services}" echo "OK" else echo "Wazuh indexer nodes: ${nodes}" - curl -k -X GET "https://0.0.0.0:55000/manager/status?pretty=true" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r .data.affected_items + curl -k -s -X GET "https://0.0.0.0:55000/manager/status?pretty=true" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r .data.affected_items exit 1 fi - nodes=$(curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r ".data.affected_items[].name" | wc -l) + nodes=$(curl -k -s -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r ".data.affected_items[].name" | wc -l) if [[ $nodes -eq 2 ]]; then echo "Wazuh manager nodes: ${nodes}" else @@ -161,7 +161,7 @@ jobs: exit 1 fi env: - TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") + TOKEN: $(curl -u -s wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") - name: Check Wazuh dashboard service URL run: | From add81b07e402e29b9a852f59e649503c8c51d72f Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 3 Jun 2022 16:27:21 -0300 Subject: [PATCH 075/178] Test CI --- build-docker-images/build-images.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-docker-images/build-images.sh b/build-docker-images/build-images.sh index 11ac20bf..ee73bb5c 100755 --- a/build-docker-images/build-images.sh +++ b/build-docker-images/build-images.sh @@ -12,4 +12,4 @@ fi echo WAZUH_VERSION=$WAZUH_IMAGE_VERSION > .env echo WAZUH_IMAGE_VERSION=$IMAGE_VERSION >> .env -docker-compose -f build-images.yml --env-file .env build --no-cache \ No newline at end of file +docker-compose -f build-docker-images/build-images.yml --env-file .env build --no-cache \ No newline at end of file From 73c25e86d6c26b175612d739004115468b6fb369 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 3 Jun 2022 16:42:19 -0300 Subject: [PATCH 076/178] Test CI --- .github/.goss.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/.goss.yaml b/.github/.goss.yaml index d0953629..c7f51cb1 100644 --- a/.github/.goss.yaml +++ b/.github/.goss.yaml @@ -6,7 +6,7 @@ package: wazuh-manager: installed: true versions: - - 4.3.3 + - 4.3.3-1 port: tcp:1514: listening: true From 7d394698a7b069122b750d237e6cd9a3e91720f6 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 3 Jun 2022 17:00:32 -0300 Subject: [PATCH 077/178] Test CI --- .github/workflows/push.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 6a0bae1d..a64437b8 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -83,7 +83,7 @@ jobs: exit 1 fi env: - TOKEN: $(curl -u -s wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") + TOKEN: $(curl -s -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") - name: Check Wazuh dashboard service URL run: | @@ -161,7 +161,7 @@ jobs: exit 1 fi env: - TOKEN: $(curl -u -s wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") + TOKEN: $(curl -s -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") - name: Check Wazuh dashboard service URL run: | From 1645f8bac254141482005a2dfe0186b1cf740447 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Mon, 6 Jun 2022 11:03:34 -0300 Subject: [PATCH 078/178] Test CI --- .github/workflows/push.yml | 45 ++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index a64437b8..02255bbb 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -36,7 +36,23 @@ jobs: - name: Check Wazuh indexer start run: | sleep 60 - curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s | grep green + status="`curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s | wc -l`" + status-green="`curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s | grep green | wc -l`" + if [[ $status-green -eq $status ]]; then + curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s + else + curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s + exit 1 + fi + status-index="`curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s | wc -l`" + status-index-green="`curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s | grep -E "green" | wc -l`" + if [[ $status-index-green -eq $status-index ]]; then + curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s + else + curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s + exit 1 + fi + - name: Check Wazuh indexer nodes run: | @@ -51,7 +67,7 @@ jobs: - name: Check documents into wazuh-alerts index run: | docs="`curl -XGET "https://0.0.0.0:9200/wazuh-alerts*/_doc/_search" -u admin:SecretPassword -k -s | jq -r ".hits.total.value"`" - if [[ $docs -gt 0 ]]; then + if [[ $docs -gt 100 ]]; then echo "wazuh-alerts index documents: ${docs}" else echo "wazuh-alerts index documents: ${docs}" @@ -60,9 +76,9 @@ jobs: - name: Check Wazuh templates run: | - qty_templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep "wazuh" | wc -l`" - templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep "wazuh"`" - if [[ $qty_templates -gt 0 ]]; then + qty_templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep -E "wazuh ||wazuh-agent||wazuh-statistics" | wc -l`" + templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep -E "wazuh ||wazuh-agent||wazuh-statistics"`" + if [[ $qty_templates -eq 3 ]]; then echo "wazuh templates:" echo "${templates}" else @@ -107,7 +123,22 @@ jobs: - name: Check Wazuh indexer start run: | sleep 120 - curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k + status="`curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s | wc -l`" + status-green="`curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s | grep green | wc -l`" + if [[ $status-green -eq $status ]]; then + curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s + else + curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s + exit 1 + fi + status-index="`curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s | wc -l`" + status-index-green="`curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s | grep -E "green" | wc -l`" + if [[ $status-index-green -eq $status-index ]]; then + curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s + else + curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s + exit 1 + fi - name: Check Wazuh indexer nodes run: | @@ -122,7 +153,7 @@ jobs: - name: Check documents into wazuh-alerts index run: | docs="`curl -XGET "https://0.0.0.0:9200/wazuh-alerts*/_doc/_search" -u admin:SecretPassword -k -s | jq -r ".hits.total.value"`" - if [[ $docs -gt 0 ]]; then + if [[ $docs -gt 200 ]]; then echo "wazuh-alerts index documents: ${docs}" else echo "wazuh-alerts index documents: ${docs}" From f67f8d1d3bf344ab238c0e2bee9647f65e60035f Mon Sep 17 00:00:00 2001 From: vcerenu Date: Mon, 6 Jun 2022 11:15:35 -0300 Subject: [PATCH 079/178] Test CI --- .github/workflows/push.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 02255bbb..16450baa 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -37,16 +37,16 @@ jobs: run: | sleep 60 status="`curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s | wc -l`" - status-green="`curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s | grep green | wc -l`" - if [[ $status-green -eq $status ]]; then + status_green="`curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s | grep green | wc -l`" + if [[ $status_green -eq $status ]]; then curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s else curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s exit 1 fi - status-index="`curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s | wc -l`" - status-index-green="`curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s | grep -E "green" | wc -l`" - if [[ $status-index-green -eq $status-index ]]; then + status_index="`curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s | wc -l`" + status_index_green="`curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s | grep -E "green" | wc -l`" + if [[ $status_index_green -eq $status_index ]]; then curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s else curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s From 9fb941f3e59757d580ef31da4e7fd42465dd2295 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Mon, 6 Jun 2022 11:33:39 -0300 Subject: [PATCH 080/178] Test CI --- .github/workflows/push.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 16450baa..2f8ac962 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -10,22 +10,22 @@ jobs: - name: Check out code uses: actions/checkout@v3 - - name: Build Wazuh images - run: build-docker-images/build-images.sh + #- name: Build Wazuh images + # run: build-docker-images/build-images.sh - name: Create enviroment variables run: cat .env > $GITHUB_ENV - - name: Install Goss - uses: e1himself/goss-installation-action@v1.0.3 - with: - version: v0.3.16 + #- name: Install Goss + # uses: e1himself/goss-installation-action@v1.0.3 + # with: + # version: v0.3.16 - - name: Execute Goss tests (wazuh-manager) - run: dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} - env: - GOSS_SLEEP: 30 - GOSS_FILE: .github/.goss.yaml + #- name: Execute Goss tests (wazuh-manager) + # run: dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} + # env: + # GOSS_SLEEP: 30 + # GOSS_FILE: .github/.goss.yaml - name: Create single node certficates run: docker-compose -f single-node/generate-indexer-certs.yml run --rm generator @@ -36,9 +36,8 @@ jobs: - name: Check Wazuh indexer start run: | sleep 60 - status="`curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s | wc -l`" status_green="`curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s | grep green | wc -l`" - if [[ $status_green -eq $status ]]; then + if [[ $status_green -eq 1 ]]; then curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s else curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s From a8bd7cba316374120acba25bf5146a5202bdc7e6 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Mon, 6 Jun 2022 11:44:46 -0300 Subject: [PATCH 081/178] Test CI --- .github/workflows/push.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 2f8ac962..446c0273 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -122,17 +122,16 @@ jobs: - name: Check Wazuh indexer start run: | sleep 120 - status="`curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s | wc -l`" - status-green="`curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s | grep green | wc -l`" - if [[ $status-green -eq $status ]]; then + status_green="`curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s | grep green | wc -l`" + if [[ $status_green -eq 1 ]]; then curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s else curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s exit 1 fi - status-index="`curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s | wc -l`" - status-index-green="`curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s | grep -E "green" | wc -l`" - if [[ $status-index-green -eq $status-index ]]; then + status_index="`curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s | wc -l`" + status_index_green="`curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s | grep -E "green" | wc -l`" + if [[ $status_index_green -eq $status_index ]]; then curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s else curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s From 525bb0ca2c71732d0ddc90eda9d9b60fd2a859a2 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Mon, 6 Jun 2022 16:06:49 -0300 Subject: [PATCH 082/178] Test CI --- .github/workflows/push.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 446c0273..4af92a4f 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -10,22 +10,22 @@ jobs: - name: Check out code uses: actions/checkout@v3 - #- name: Build Wazuh images - # run: build-docker-images/build-images.sh + - name: Build Wazuh images + run: build-docker-images/build-images.sh - name: Create enviroment variables run: cat .env > $GITHUB_ENV - #- name: Install Goss - # uses: e1himself/goss-installation-action@v1.0.3 - # with: - # version: v0.3.16 + - name: Install Goss + uses: e1himself/goss-installation-action@v1.0.3 + with: + version: v0.3.16 - #- name: Execute Goss tests (wazuh-manager) - # run: dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} - # env: - # GOSS_SLEEP: 30 - # GOSS_FILE: .github/.goss.yaml + - name: Execute Goss tests (wazuh-manager) + run: dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} + env: + GOSS_SLEEP: 30 + GOSS_FILE: .github/.goss.yaml - name: Create single node certficates run: docker-compose -f single-node/generate-indexer-certs.yml run --rm generator From ec16fdf24ce43c7e00a7339cc8fcc7c5ef20b1e1 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Mon, 6 Jun 2022 16:29:41 -0300 Subject: [PATCH 083/178] Test CI --- .github/workflows/push.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 4af92a4f..d1228eee 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -110,6 +110,10 @@ jobs: exit 1 fi + - name: Check Wazuh dashboard service URL + run: | + docker exec -it single-node_wazuh.manager_1 tail -200 /var/ossec/logs/ossec.log | grep -E "ERR||WARN||CRIT" + - name: Stop single node stack run: docker-compose -f single-node/docker-compose.yml down From ac92c2f1c05465c33cc21654002c54aae9d42069 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Mon, 6 Jun 2022 17:03:17 -0300 Subject: [PATCH 084/178] Test CI --- .github/workflows/push.yml | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index d1228eee..ec6d249b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -100,6 +100,17 @@ jobs: env: TOKEN: $(curl -s -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") + - name: Check errors in ossec.log + run: | + log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT"') + if [[ -z $log ]]; then + echo "No errors in ossec.log" + else + echo "Errors in ossec.log:" + echo $log + exit 1 + fi + - name: Check Wazuh dashboard service URL run: | status=$(curl -XGET --silent https://0.0.0.0:443/app/status -k -u admin:SecretPassword -I -s | grep -E "^HTTP" | awk '{print $2}') @@ -110,10 +121,6 @@ jobs: exit 1 fi - - name: Check Wazuh dashboard service URL - run: | - docker exec -it single-node_wazuh.manager_1 tail -200 /var/ossec/logs/ossec.log | grep -E "ERR||WARN||CRIT" - - name: Stop single node stack run: docker-compose -f single-node/docker-compose.yml down @@ -196,6 +203,25 @@ jobs: env: TOKEN: $(curl -s -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") + - name: Check errors in ossec.log + run: | + log=$(docker exec multi-node_wazuh.master_1 -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT"') + if [[ -z $log ]]; then + echo "No errors in master ossec.log" + else + echo "Errors in ossec.log:" + echo $log + exit 1 + fi + log2=$(docker exec multi-node_wazuh.worker_1 -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT"') + if [[ -z $log2 ]]; then + echo "No errors in worker ossec.log" + else + echo "Errors in ossec.log:" + echo $log + exit 1 + fi + - name: Check Wazuh dashboard service URL run: | status=$(curl -XGET --silent https://0.0.0.0:443/app/status -k -u admin:SecretPassword -I | grep -E "^HTTP" | awk '{print $2}') From c1ca4986174e3e9517d8fe021b077c046549b4fb Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 7 Jun 2022 11:13:05 -0300 Subject: [PATCH 085/178] Test CI --- .github/workflows/push.yml | 53 +++++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index ec6d249b..26e4f707 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -103,11 +103,23 @@ jobs: - name: Check errors in ossec.log run: | log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT"') - if [[ -z $log ]]; then + if [[ -z "${log}" ]]; then echo "No errors in ossec.log" else echo "Errors in ossec.log:" - echo $log + echo "${log}" + exit 1 + fi + + - name: Check filebeat output + run: | + fbout1=$(docker exec single-node_wazuh.manager_1 sh -c 'filebeat test output') + fbstatus=$(echo "${fbout}" | grep OK | wc -l) + if [[ fbstatus -eq 7 ]]; then + echo "No errors in master filebeat" + else + echo "Errors in master filebeat" + echo "${fbout}" exit 1 fi @@ -205,20 +217,41 @@ jobs: - name: Check errors in ossec.log run: | - log=$(docker exec multi-node_wazuh.master_1 -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT"') - if [[ -z $log ]]; then + log1=$(docker exec multi-node_wazuh.master_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT"') + if [[ -z "$log1" ]]; then echo "No errors in master ossec.log" else - echo "Errors in ossec.log:" - echo $log + echo "Errors in master ossec.log:" + echo "${log1}" exit 1 fi - log2=$(docker exec multi-node_wazuh.worker_1 -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT"') - if [[ -z $log2 ]]; then + log2=$(docker exec multi-node_wazuh.worker_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT"') + if [[ -z "${log2}" ]]; then echo "No errors in worker ossec.log" else - echo "Errors in ossec.log:" - echo $log + echo "Errors in worker ossec.log:" + echo "${log2}" + exit 1 + fi + + - name: Check filebeat output + run: | + fbout1=$(docker exec multi-node_wazuh.master_1 sh -c 'filebeat test output') + fbstatus1=$(echo "${fbout1}" | grep OK | wc -l) + if [[ fbstatus1 -eq 7 ]]; then + echo "No errors in master filebeat" + else + echo "Errors in master filebeat" + echo "${fbout1}" + exit 1 + fi + fbout2=$(docker exec multi-node_wazuh.worker_1 sh -c 'filebeat test output') + fbstatus2=$(echo "${fbout2}" | grep OK | wc -l) + if [[ fbstatus2 -eq 7 ]]; then + echo "No errors in master filebeat" + else + echo "Errors in master filebeat" + echo "${fbout2}" exit 1 fi From 3d4a7073efc969f7503cc61bec21c5e63cd2b4c2 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 7 Jun 2022 11:37:31 -0300 Subject: [PATCH 086/178] Test CI --- .github/workflows/push.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 26e4f707..c079e53b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -10,8 +10,8 @@ jobs: - name: Check out code uses: actions/checkout@v3 - - name: Build Wazuh images - run: build-docker-images/build-images.sh + # - name: Build Wazuh images + # run: build-docker-images/build-images.sh - name: Create enviroment variables run: cat .env > $GITHUB_ENV @@ -113,6 +113,7 @@ jobs: - name: Check filebeat output run: | + docker ps fbout1=$(docker exec single-node_wazuh.manager_1 sh -c 'filebeat test output') fbstatus=$(echo "${fbout}" | grep OK | wc -l) if [[ fbstatus -eq 7 ]]; then From 4b1c420fddb6fbaeff140234b6a44bad6173851b Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 7 Jun 2022 11:40:01 -0300 Subject: [PATCH 087/178] Test CI --- .github/workflows/push.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index c079e53b..ebd10686 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -16,16 +16,16 @@ jobs: - name: Create enviroment variables run: cat .env > $GITHUB_ENV - - name: Install Goss - uses: e1himself/goss-installation-action@v1.0.3 - with: - version: v0.3.16 + # - name: Install Goss + # uses: e1himself/goss-installation-action@v1.0.3 + # with: + # version: v0.3.16 - - name: Execute Goss tests (wazuh-manager) - run: dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} - env: - GOSS_SLEEP: 30 - GOSS_FILE: .github/.goss.yaml + # - name: Execute Goss tests (wazuh-manager) + # run: dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} + # env: + # GOSS_SLEEP: 30 + # GOSS_FILE: .github/.goss.yaml - name: Create single node certficates run: docker-compose -f single-node/generate-indexer-certs.yml run --rm generator From 5d5f01ab45193b6b64b563a45b26e31e91f33ef8 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 7 Jun 2022 11:44:41 -0300 Subject: [PATCH 088/178] Test CI --- .github/workflows/push.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index ebd10686..a49800dd 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -100,6 +100,9 @@ jobs: env: TOKEN: $(curl -s -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") + - name: check docker ps + run: docker ps + - name: Check errors in ossec.log run: | log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT"') @@ -113,7 +116,6 @@ jobs: - name: Check filebeat output run: | - docker ps fbout1=$(docker exec single-node_wazuh.manager_1 sh -c 'filebeat test output') fbstatus=$(echo "${fbout}" | grep OK | wc -l) if [[ fbstatus -eq 7 ]]; then From c6314893f203c02644947d7d3e639b55cd70f973 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 7 Jun 2022 11:50:28 -0300 Subject: [PATCH 089/178] Test CI --- .github/workflows/push.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index a49800dd..5c09d179 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -105,6 +105,7 @@ jobs: - name: Check errors in ossec.log run: | + docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT"') if [[ -z "${log}" ]]; then echo "No errors in ossec.log" From 5418494f95209325ee2aca4039b76a9a72b6f1c5 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 7 Jun 2022 11:57:22 -0300 Subject: [PATCH 090/178] Test CI --- .github/workflows/push.yml | 7 ------- .gitignore | 3 +-- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 5c09d179..18dcfa0f 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -107,13 +107,6 @@ jobs: run: | docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT"') - if [[ -z "${log}" ]]; then - echo "No errors in ossec.log" - else - echo "Errors in ossec.log:" - echo "${log}" - exit 1 - fi - name: Check filebeat output run: | diff --git a/.gitignore b/.gitignore index fc53a2b0..6d7fadef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ single-node/config/wazuh_indexer_ssl_certs/*.pem single-node/config/wazuh_indexer_ssl_certs/*.key multi-node/config/wazuh_indexer_ssl_certs/*.pem -multi-node/config/wazuh_indexer_ssl_certs/*.key -env \ No newline at end of file +multi-node/config/wazuh_indexer_ssl_certs/*.key \ No newline at end of file From 281f74582a62ba5368afec5cc64dd5b6fcbf1268 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 7 Jun 2022 12:04:47 -0300 Subject: [PATCH 091/178] Test CI --- .github/workflows/push.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 18dcfa0f..71607ff9 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -105,7 +105,6 @@ jobs: - name: Check errors in ossec.log run: | - docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT"') - name: Check filebeat output From 3b740e5dce3fcaef05654bd12962734467eb59d6 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 7 Jun 2022 12:22:44 -0300 Subject: [PATCH 092/178] Test CI --- .env | 4 ++-- .github/workflows/push.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env b/.env index b13b2292..7986c42f 100755 --- a/.env +++ b/.env @@ -1,2 +1,2 @@ -WAZUH_VERSION=4.3.0 -WAZUH_IMAGE_VERSION=4.3.0 +WAZUH_VERSION=4.3.3 +WAZUH_IMAGE_VERSION=4.3.3 diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 71607ff9..d80cfae0 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -105,7 +105,7 @@ jobs: - name: Check errors in ossec.log run: | - log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT"') + docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT"' - name: Check filebeat output run: | From 7fdb1a91e585a490bd2c835bade89560ffc43141 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 7 Jun 2022 16:36:07 -0300 Subject: [PATCH 093/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index d80cfae0..a957e792 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -105,7 +105,7 @@ jobs: - name: Check errors in ossec.log run: | - docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT"' + docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT" - name: Check filebeat output run: | From a40c510bbacb8a9a4ff4f227f1306791972c7eb0 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 7 Jun 2022 16:39:25 -0300 Subject: [PATCH 094/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index a957e792..d80cfae0 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -105,7 +105,7 @@ jobs: - name: Check errors in ossec.log run: | - docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT" + docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT"' - name: Check filebeat output run: | From 95207b0777d7c4252af7b7447b534c11f896214c Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 7 Jun 2022 16:50:44 -0300 Subject: [PATCH 095/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index d80cfae0..0b1bc6a1 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -105,7 +105,7 @@ jobs: - name: Check errors in ossec.log run: | - docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT"' + docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' - name: Check filebeat output run: | From 637d5ccae1fb2d6764284b4795f14432937ff26a Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 7 Jun 2022 16:55:06 -0300 Subject: [PATCH 096/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 0b1bc6a1..b7a1b8f9 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -105,7 +105,7 @@ jobs: - name: Check errors in ossec.log run: | - docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' + docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -e "ERR|WARN|CRIT"' - name: Check filebeat output run: | From d5550caa261c0a36f3f3645b4161f626167792d3 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 7 Jun 2022 16:58:38 -0300 Subject: [PATCH 097/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index b7a1b8f9..7e432526 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -105,7 +105,7 @@ jobs: - name: Check errors in ossec.log run: | - docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -e "ERR|WARN|CRIT"' + docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -e "ERR||WARN||CRIT"' - name: Check filebeat output run: | From 0520a771fe6d927cb7676e30fb1d02af087fcd79 Mon Sep 17 00:00:00 2001 From: Alberto R Date: Wed, 8 Jun 2022 10:10:23 +0200 Subject: [PATCH 098/178] Bumped version --- .github/.goss.yaml | 2 +- .github/workflows/push.yml | 2 +- CHANGELOG.md | 5 +++++ README.md | 1 + VERSION | 4 ++-- build-docker-images/docker-compose.yml | 6 +++--- build-docker-images/wazuh-dashboard/Dockerfile | 2 +- build-docker-images/wazuh-indexer/config/config.sh | 2 +- build-docker-images/wazuh-manager/Dockerfile | 2 +- multi-node/docker-compose.yml | 12 ++++++------ single-node/docker-compose.yml | 6 +++--- 11 files changed, 25 insertions(+), 19 deletions(-) diff --git a/.github/.goss.yaml b/.github/.goss.yaml index 759b0c11..3dd8343b 100644 --- a/.github/.goss.yaml +++ b/.github/.goss.yaml @@ -56,7 +56,7 @@ package: wazuh-manager: installed: true versions: - - 4.3.3 + - 4.3.4 port: tcp:1514: listening: true diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 389ba791..0714dd98 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -25,7 +25,7 @@ jobs: version: v0.3.16 - name: Execute Goss tests (wazuh-odfe) - run: dgoss run wazuh/wazuh-manager:4.3.3 + run: dgoss run wazuh/wazuh-manager:4.3.4 env: GOSS_SLEEP: 30 GOSS_FILE: .github/.goss.yaml \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 25b6f14c..c782f4d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log All notable changes to this project will be documented in this file. +## Wazuh Docker v4.3.4 +### Added + +- Update Wazuh to version [4.3.4](https://github.com/wazuh/wazuh/blob/v4.3.4/CHANGELOG.md#v434) + ## Wazuh Docker v4.3.3 ### Added diff --git a/README.md b/README.md index 90647e15..575316b8 100644 --- a/README.md +++ b/README.md @@ -193,6 +193,7 @@ WAZUH_MONITORING_REPLICAS=0 # | Wazuh version | ODFE | XPACK | |---------------|---------|--------| +| v4.3.4 | | | | v4.3.3 | | | | v4.3.2 | | | | v4.3.1 | | | diff --git a/VERSION b/VERSION index f675ddc8..f344cc0e 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -WAZUH-DOCKER_VERSION="4.3.3" -REVISION="40315" +WAZUH-DOCKER_VERSION="4.3.4" +REVISION="40316" diff --git a/build-docker-images/docker-compose.yml b/build-docker-images/docker-compose.yml index e1e0f74f..6a07c63d 100644 --- a/build-docker-images/docker-compose.yml +++ b/build-docker-images/docker-compose.yml @@ -4,7 +4,7 @@ version: '3.7' services: wazuh.manager: build: wazuh-manager/ - image: wazuh/wazuh-manager:4.3.3 + image: wazuh/wazuh-manager:4.3.4 hostname: wazuh.manager restart: always ports: @@ -32,7 +32,7 @@ services: wazuh.indexer: build: wazuh-indexer/ - image: wazuh/wazuh-indexer:4.3.3 + image: wazuh/wazuh-indexer:4.3.4 hostname: wazuh.indexer restart: always ports: @@ -49,7 +49,7 @@ services: wazuh.dashboard: build: wazuh-dashboard/ - image: wazuh/wazuh-dashboard:4.3.3 + image: wazuh/wazuh-dashboard:4.3.4 hostname: wazuh.dashboard restart: always ports: diff --git a/build-docker-images/wazuh-dashboard/Dockerfile b/build-docker-images/wazuh-dashboard/Dockerfile index 245cee87..fb3cd544 100644 --- a/build-docker-images/wazuh-dashboard/Dockerfile +++ b/build-docker-images/wazuh-dashboard/Dockerfile @@ -1,7 +1,7 @@ # Wazuh Docker Copyright (C) 2017, Wazuh Inc. (License GPLv2) FROM ubuntu:focal AS builder -ARG WAZUH_VERSION=4.3.3 +ARG WAZUH_VERSION=4.3.4 ARG INSTALL_DIR=/usr/share/wazuh-dashboard # Update and install dependencies diff --git a/build-docker-images/wazuh-indexer/config/config.sh b/build-docker-images/wazuh-indexer/config/config.sh index 7bffca90..1d481cb3 100644 --- a/build-docker-images/wazuh-indexer/config/config.sh +++ b/build-docker-images/wazuh-indexer/config/config.sh @@ -8,7 +8,7 @@ export TARGET_DIR=${CURDIR}/debian/${NAME} # Package build options export USER=${NAME} export GROUP=${NAME} -export VERSION=4.3.3 +export VERSION=4.3.4 export LOG_DIR=/var/log/${NAME} export LIB_DIR=/var/lib/${NAME} export PID_DIR=/run/${NAME} diff --git a/build-docker-images/wazuh-manager/Dockerfile b/build-docker-images/wazuh-manager/Dockerfile index ed72ba9c..c975c883 100644 --- a/build-docker-images/wazuh-manager/Dockerfile +++ b/build-docker-images/wazuh-manager/Dockerfile @@ -1,7 +1,7 @@ # Wazuh Docker Copyright (C) 2017, Wazuh Inc. (License GPLv2) FROM ubuntu:focal -ARG WAZUH_VERSION=4.3.3 +ARG WAZUH_VERSION=4.3.4 ARG TEMPLATE_VERSION=4.3 ARG FILEBEAT_CHANNEL=filebeat-oss ARG FILEBEAT_VERSION=7.10.2 diff --git a/multi-node/docker-compose.yml b/multi-node/docker-compose.yml index 762fc883..ef52af64 100644 --- a/multi-node/docker-compose.yml +++ b/multi-node/docker-compose.yml @@ -3,7 +3,7 @@ version: '3.7' services: wazuh.master: - image: wazuh/wazuh-manager:4.3.3 + image: wazuh/wazuh-manager:4.3.4 hostname: wazuh.master restart: always ports: @@ -38,7 +38,7 @@ services: - ./config/wazuh_cluster/wazuh_manager.conf:/wazuh-config-mount/etc/ossec.conf wazuh.worker: - image: wazuh/wazuh-manager:4.3.3 + image: wazuh/wazuh-manager:4.3.4 hostname: wazuh.worker restart: always environment: @@ -67,7 +67,7 @@ services: - ./config/wazuh_cluster/wazuh_worker.conf:/wazuh-config-mount/etc/ossec.conf wazuh1.indexer: - image: wazuh/wazuh-indexer:4.3.3 + image: wazuh/wazuh-indexer:4.3.4 hostname: wazuh1.indexer restart: always ports: @@ -93,7 +93,7 @@ services: - ./config/wazuh_indexer/internal_users.yml:/usr/share/wazuh-indexer/plugins/opensearch-security/securityconfig/internal_users.yml wazuh2.indexer: - image: wazuh/wazuh-indexer:4.3.3 + image: wazuh/wazuh-indexer:4.3.4 hostname: wazuh2.indexer restart: always environment: @@ -115,7 +115,7 @@ services: - ./config/wazuh_indexer/internal_users.yml:/usr/share/wazuh-indexer/plugins/opensearch-security/securityconfig/internal_users.yml wazuh3.indexer: - image: wazuh/wazuh-indexer:4.3.3 + image: wazuh/wazuh-indexer:4.3.4 hostname: wazuh3.indexer restart: always environment: @@ -137,7 +137,7 @@ services: - ./config/wazuh_indexer/internal_users.yml:/usr/share/wazuh-indexer/plugins/opensearch-security/securityconfig/internal_users.yml wazuh.dashboard: - image: wazuh/wazuh-dashboard:4.3.3 + image: wazuh/wazuh-dashboard:4.3.4 hostname: wazuh.dashboard restart: always ports: diff --git a/single-node/docker-compose.yml b/single-node/docker-compose.yml index e506deb7..3bbd3a23 100644 --- a/single-node/docker-compose.yml +++ b/single-node/docker-compose.yml @@ -3,7 +3,7 @@ version: '3.7' services: wazuh.manager: - image: wazuh/wazuh-manager:4.3.3 + image: wazuh/wazuh-manager:4.3.4 hostname: wazuh.manager restart: always ports: @@ -39,7 +39,7 @@ services: - ./config/wazuh_cluster/wazuh_manager.conf:/wazuh-config-mount/etc/ossec.conf wazuh.indexer: - image: wazuh/wazuh-indexer:4.3.3 + image: wazuh/wazuh-indexer:4.3.4 hostname: wazuh.indexer restart: always ports: @@ -64,7 +64,7 @@ services: - ./config/wazuh_indexer/internal_users.yml:/usr/share/wazuh-indexer/plugins/opensearch-security/securityconfig/internal_users.yml wazuh.dashboard: - image: wazuh/wazuh-dashboard:4.3.3 + image: wazuh/wazuh-dashboard:4.3.4 hostname: wazuh.dashboard restart: always ports: From b3d576623e429e29b8f7e1ef264b8a4ede5ae129 Mon Sep 17 00:00:00 2001 From: Alberto R Date: Wed, 8 Jun 2022 15:11:54 +0200 Subject: [PATCH 099/178] Added UI revision --- build-docker-images/wazuh-dashboard/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-docker-images/wazuh-dashboard/Dockerfile b/build-docker-images/wazuh-dashboard/Dockerfile index fb3cd544..f07fbb64 100644 --- a/build-docker-images/wazuh-dashboard/Dockerfile +++ b/build-docker-images/wazuh-dashboard/Dockerfile @@ -2,6 +2,7 @@ FROM ubuntu:focal AS builder ARG WAZUH_VERSION=4.3.4 +ARG WAZUH_UI_REVISION=1 ARG INSTALL_DIR=/usr/share/wazuh-dashboard # Update and install dependencies @@ -20,7 +21,7 @@ COPY config/config.yml / RUN bash config.sh # Install Wazuh App -RUN $INSTALL_DIR/bin/opensearch-dashboards-plugin install https://packages.wazuh.com/4.x/ui/dashboard/wazuh-${WAZUH_VERSION}.zip --allow-root +RUN $INSTALL_DIR/bin/opensearch-dashboards-plugin install https://packages.wazuh.com/4.x/ui/dashboard/wazuh-${WAZUH_VERSION}-{WAZUH_UI_REVISION}.zip --allow-root # Copy and set permissions to config files COPY config/opensearch_dashboards.yml $INSTALL_DIR/config/ From 01a0e3dabd5dffa10f527d7518dc64f92ca7df26 Mon Sep 17 00:00:00 2001 From: Alberto R Date: Wed, 8 Jun 2022 15:37:50 +0200 Subject: [PATCH 100/178] Fixed typo defining variable --- build-docker-images/wazuh-dashboard/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-docker-images/wazuh-dashboard/Dockerfile b/build-docker-images/wazuh-dashboard/Dockerfile index f07fbb64..60b180c3 100644 --- a/build-docker-images/wazuh-dashboard/Dockerfile +++ b/build-docker-images/wazuh-dashboard/Dockerfile @@ -21,7 +21,7 @@ COPY config/config.yml / RUN bash config.sh # Install Wazuh App -RUN $INSTALL_DIR/bin/opensearch-dashboards-plugin install https://packages.wazuh.com/4.x/ui/dashboard/wazuh-${WAZUH_VERSION}-{WAZUH_UI_REVISION}.zip --allow-root +RUN $INSTALL_DIR/bin/opensearch-dashboards-plugin install https://packages.wazuh.com/4.x/ui/dashboard/wazuh-${WAZUH_VERSION}-${WAZUH_UI_REVISION}.zip --allow-root # Copy and set permissions to config files COPY config/opensearch_dashboards.yml $INSTALL_DIR/config/ From 237b180ff52fd7d5762edccac5cda36a24be4811 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 11:49:18 -0300 Subject: [PATCH 101/178] Test CI --- .github/workflows/push.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 7e432526..06f6dff7 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -100,12 +100,16 @@ jobs: env: TOKEN: $(curl -s -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") - - name: check docker ps - run: docker ps - - name: Check errors in ossec.log run: | - docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -e "ERR||WARN||CRIT"' + log=$(docker exec multi-node_wazuh.master_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR||WARN||CRIT"') + if [[ -z "$log" ]]; then + echo "No errors in master ossec.log" + else + echo "Errors in master ossec.log:" + echo "${log}" + exit 1 + fi - name: Check filebeat output run: | @@ -213,7 +217,7 @@ jobs: - name: Check errors in ossec.log run: | - log1=$(docker exec multi-node_wazuh.master_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT"') + log1=$(docker exec multi-node_wazuh.master_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR||WARN||CRIT"') if [[ -z "$log1" ]]; then echo "No errors in master ossec.log" else @@ -221,7 +225,7 @@ jobs: echo "${log1}" exit 1 fi - log2=$(docker exec multi-node_wazuh.worker_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT"') + log2=$(docker exec multi-node_wazuh.worker_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR||WARN||CRIT"') if [[ -z "${log2}" ]]; then echo "No errors in worker ossec.log" else From adfaab647d229830095c6806a1aab97c0cdff56c Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 11:50:15 -0300 Subject: [PATCH 102/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 06f6dff7..c5a92e3e 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,6 +1,6 @@ name: Wazuh Docker pipeline -on: [pull_request] +on: [pull_request, push] jobs: build-stack: From f711968c2f720b5569a8c3bd27b4dbba31204fb3 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 11:53:32 -0300 Subject: [PATCH 103/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index c5a92e3e..f8ee6387 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -102,7 +102,7 @@ jobs: - name: Check errors in ossec.log run: | - log=$(docker exec multi-node_wazuh.master_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR||WARN||CRIT"') + log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR||WARN||CRIT"') if [[ -z "$log" ]]; then echo "No errors in master ossec.log" else From fea54b3ca7e13250e71fd559e49d927cdb258751 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 12:24:11 -0300 Subject: [PATCH 104/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index f8ee6387..f6cce770 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -102,7 +102,7 @@ jobs: - name: Check errors in ossec.log run: | - log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR||WARN||CRIT"') + log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -e ERR -e CRIT -e WARN') if [[ -z "$log" ]]; then echo "No errors in master ossec.log" else From 27a74797742acd68985192f399c7981f7cc6af32 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 12:28:22 -0300 Subject: [PATCH 105/178] Test CI --- .github/workflows/push.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index f6cce770..169ee58b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -102,7 +102,8 @@ jobs: - name: Check errors in ossec.log run: | - log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -e ERR -e CRIT -e WARN') + docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -e "ERR" -e "CRIT" -e "WARN"' + log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -e "ERR" -e "CRIT" -e "WARN"') if [[ -z "$log" ]]; then echo "No errors in master ossec.log" else From 131c44ba63246709a00c3b56f8c9d4eaffc92da4 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 12:40:44 -0300 Subject: [PATCH 106/178] Test CI --- .github/workflows/push.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 169ee58b..d887e160 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -102,8 +102,7 @@ jobs: - name: Check errors in ossec.log run: | - docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -e "ERR" -e "CRIT" -e "WARN"' - log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -e "ERR" -e "CRIT" -e "WARN"') + log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | egrep "ERR|CRIT|WARN"') if [[ -z "$log" ]]; then echo "No errors in master ossec.log" else From 719dc7dd167621ec9bd0715ab4c10c3a6f6f2404 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 12:55:37 -0300 Subject: [PATCH 107/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index d887e160..0b57890e 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -102,7 +102,7 @@ jobs: - name: Check errors in ossec.log run: | - log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | egrep "ERR|CRIT|WARN"') + log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' | grep -E "ERR||WARN||CRIT") if [[ -z "$log" ]]; then echo "No errors in master ossec.log" else From 17389682a4a02a01f512553f85062145d60fbb43 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 13:01:30 -0300 Subject: [PATCH 108/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 0b57890e..c0d5d80f 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -102,7 +102,7 @@ jobs: - name: Check errors in ossec.log run: | - log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' | grep -E "ERR||WARN||CRIT") + log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' | grep -E "ERR|WARN|CRIT") if [[ -z "$log" ]]; then echo "No errors in master ossec.log" else From 439a3fe2523ec122108ace4959433ea0c7ce8cdb Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 15:45:48 -0300 Subject: [PATCH 109/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index c0d5d80f..98261d64 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -102,7 +102,7 @@ jobs: - name: Check errors in ossec.log run: | - log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' | grep -E "ERR|WARN|CRIT") + log="`docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' | egrep "ERR|WARN|CRIT"`" if [[ -z "$log" ]]; then echo "No errors in master ossec.log" else From 451e91e40735c0d7ec3c2e1967560dbd8c7393e6 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 15:57:13 -0300 Subject: [PATCH 110/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 98261d64..9a74b623 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -102,7 +102,7 @@ jobs: - name: Check errors in ossec.log run: | - log="`docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' | egrep "ERR|WARN|CRIT"`" + log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' | grep -e ERR -e CRIT -e WARN) if [[ -z "$log" ]]; then echo "No errors in master ossec.log" else From e9c2f59c94cc763c9f7e73f5e19699651db365ed Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 16:07:24 -0300 Subject: [PATCH 111/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 9a74b623..172be825 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -102,7 +102,7 @@ jobs: - name: Check errors in ossec.log run: | - log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' | grep -e ERR -e CRIT -e WARN) + log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' | grep -P "ERR|WARN|CRIT") if [[ -z "$log" ]]; then echo "No errors in master ossec.log" else From 1a60522c27dde23359ba275f5d7eca851eb72c00 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 16:11:00 -0300 Subject: [PATCH 112/178] Test CI --- .github/workflows/push.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 172be825..5022af8f 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -102,14 +102,8 @@ jobs: - name: Check errors in ossec.log run: | - log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' | grep -P "ERR|WARN|CRIT") - if [[ -z "$log" ]]; then - echo "No errors in master ossec.log" - else - echo "Errors in master ossec.log:" - echo "${log}" - exit 1 - fi + docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' | grep -P "ERR|WARN|CRIT" + - name: Check filebeat output run: | From 5e211d2b13e81d4ac06f4b9be8dec9c812851be9 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 16:20:25 -0300 Subject: [PATCH 113/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 5022af8f..eeec8619 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -102,7 +102,7 @@ jobs: - name: Check errors in ossec.log run: | - docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' | grep -P "ERR|WARN|CRIT" + docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' | grep ERR - name: Check filebeat output From 604232960b3fc84693f072f6b40e05aeb062f146 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 16:23:39 -0300 Subject: [PATCH 114/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index eeec8619..f0a7dfed 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -102,7 +102,7 @@ jobs: - name: Check errors in ossec.log run: | - docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' | grep ERR + docker exec single-node_wazuh.manager_1 cat /var/ossec/logs/ossec.log - name: Check filebeat output From 8748cd1ae2c44b285aa9041ba1f0e6cc082f8083 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 16:26:57 -0300 Subject: [PATCH 115/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index f0a7dfed..5724dc4b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -102,7 +102,7 @@ jobs: - name: Check errors in ossec.log run: | - docker exec single-node_wazuh.manager_1 cat /var/ossec/logs/ossec.log + docker exec single-node_wazuh.manager_1 cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT" - name: Check filebeat output From 0c2cb412fb9cf3d51debfb228463aadc2e10c0ff Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 16:29:57 -0300 Subject: [PATCH 116/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 5724dc4b..02404a73 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -102,7 +102,7 @@ jobs: - name: Check errors in ossec.log run: | - docker exec single-node_wazuh.manager_1 cat /var/ossec/logs/ossec.log | grep -E "ERR|WARN|CRIT" + docker exec single-node_wazuh.manager_1 cat /var/ossec/logs/ossec.log | grep ERR - name: Check filebeat output From 0e2d942666677a22c39ac6cf9b9d818966722dce Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 16:34:29 -0300 Subject: [PATCH 117/178] Test CI --- .github/workflows/push.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 02404a73..b19c33bb 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -102,7 +102,8 @@ jobs: - name: Check errors in ossec.log run: | - docker exec single-node_wazuh.manager_1 cat /var/ossec/logs/ossec.log | grep ERR + log=$(docker exec single-node_wazuh.manager_1 cat /var/ossec/logs/ossec.log) + errors=echo $log | grep ERR - name: Check filebeat output From 19a5a37bdf9cb2c3955358da4073a99de2012422 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 16:38:41 -0300 Subject: [PATCH 118/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index b19c33bb..888b245a 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -103,7 +103,7 @@ jobs: - name: Check errors in ossec.log run: | log=$(docker exec single-node_wazuh.manager_1 cat /var/ossec/logs/ossec.log) - errors=echo $log | grep ERR + errors=$(echo ${log} | grep ERR) - name: Check filebeat output From d4b0d60a54b2adad5d06d54a1442e59dc43e6b14 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 16:41:56 -0300 Subject: [PATCH 119/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 888b245a..bc8c6ef0 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -103,7 +103,7 @@ jobs: - name: Check errors in ossec.log run: | log=$(docker exec single-node_wazuh.manager_1 cat /var/ossec/logs/ossec.log) - errors=$(echo ${log} | grep ERR) + errors=$(echo "${log}" | grep ERR) - name: Check filebeat output From 35dfd868371a802b2f8597bb2018566267a577eb Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 16:47:02 -0300 Subject: [PATCH 120/178] Test CI --- .github/workflows/push.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index bc8c6ef0..be76fed5 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -102,8 +102,8 @@ jobs: - name: Check errors in ossec.log run: | - log=$(docker exec single-node_wazuh.manager_1 cat /var/ossec/logs/ossec.log) - errors=$(echo "${log}" | grep ERR) + log="`docker exec single-node_wazuh.manager_1 cat /var/ossec/logs/ossec.log`" + errors="`echo "${log}" | grep ERR`" - name: Check filebeat output From 22958aaf5e4bd7164df999cd58c98637172f94c9 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 16:52:10 -0300 Subject: [PATCH 121/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index be76fed5..76b00d84 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -102,7 +102,7 @@ jobs: - name: Check errors in ossec.log run: | - log="`docker exec single-node_wazuh.manager_1 cat /var/ossec/logs/ossec.log`" + log="`docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log'`" errors="`echo "${log}" | grep ERR`" From 426670017f92abf697d2fcbec7a17d48f40ec92f Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 16:55:56 -0300 Subject: [PATCH 122/178] Test CI --- .github/workflows/push.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 76b00d84..2cc24bf6 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -102,8 +102,7 @@ jobs: - name: Check errors in ossec.log run: | - log="`docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log'`" - errors="`echo "${log}" | grep ERR`" + docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' - name: Check filebeat output From 3656850b56d965ea5594934d1d084f11d001f871 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 17:00:01 -0300 Subject: [PATCH 123/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 2cc24bf6..1f46f16d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -102,7 +102,7 @@ jobs: - name: Check errors in ossec.log run: | - docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' + docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | egrep ERR' - name: Check filebeat output From f06a7ec96190070fd5ac6e01ecace38e746f0b5b Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 17:02:53 -0300 Subject: [PATCH 124/178] Test CI --- .github/workflows/push.yml | 3 +-- .github/workflows/single-node-check.sh | 8 ++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/single-node-check.sh diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 1f46f16d..d77e47a0 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -101,8 +101,7 @@ jobs: TOKEN: $(curl -s -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") - name: Check errors in ossec.log - run: | - docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log | egrep ERR' + run: .github/single-node-check.sh - name: Check filebeat output diff --git a/.github/workflows/single-node-check.sh b/.github/workflows/single-node-check.sh new file mode 100644 index 00000000..5da10d96 --- /dev/null +++ b/.github/workflows/single-node-check.sh @@ -0,0 +1,8 @@ +log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' | grep -P "ERR|WARN|CRIT") +if [[ -z "$log" ]]; then + echo "No errors in master ossec.log" +else + echo "Errors in master ossec.log:" + echo "${log}" + exit 1 +fi \ No newline at end of file From 8ae1cd3f9d5bdff53132b72ee03d16e7361a152f Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 17:08:28 -0300 Subject: [PATCH 125/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index d77e47a0..0f7def87 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -101,7 +101,7 @@ jobs: TOKEN: $(curl -s -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") - name: Check errors in ossec.log - run: .github/single-node-check.sh + run: ./.github/single-node-check.sh - name: Check filebeat output From 0d7d4694fd48c5143f473923b0b565a792f4bcc1 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 17:11:13 -0300 Subject: [PATCH 126/178] Test CI --- .github/{workflows => }/single-node-check.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{workflows => }/single-node-check.sh (100%) diff --git a/.github/workflows/single-node-check.sh b/.github/single-node-check.sh similarity index 100% rename from .github/workflows/single-node-check.sh rename to .github/single-node-check.sh From a6262166439f06b0ae56128b4c8a1a568aac0ee3 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 17:16:38 -0300 Subject: [PATCH 127/178] Test CI --- .github/single-node-check.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .github/single-node-check.sh diff --git a/.github/single-node-check.sh b/.github/single-node-check.sh old mode 100644 new mode 100755 From 40f55cfb53279ff3e731a7f6324fbd49af045edd Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 17:26:35 -0300 Subject: [PATCH 128/178] Test CI --- .github/multi-node-fb-check.sh | 18 +++++++ .github/multi-node-log-check.sh | 16 ++++++ .github/single-node-fb-check.sh | 9 ++++ ...node-check.sh => single-node-log-check.sh} | 0 .github/workflows/push.yml | 52 ++----------------- 5 files changed, 48 insertions(+), 47 deletions(-) create mode 100755 .github/multi-node-fb-check.sh create mode 100755 .github/multi-node-log-check.sh create mode 100755 .github/single-node-fb-check.sh rename .github/{single-node-check.sh => single-node-log-check.sh} (100%) diff --git a/.github/multi-node-fb-check.sh b/.github/multi-node-fb-check.sh new file mode 100755 index 00000000..b5ead4d9 --- /dev/null +++ b/.github/multi-node-fb-check.sh @@ -0,0 +1,18 @@ +fbout1=$(docker exec multi-node_wazuh.master_1 sh -c 'filebeat test output') +fbstatus1=$(echo "${fbout1}" | grep OK | wc -l) +if [[ fbstatus1 -eq 7 ]]; then + echo "No errors in master filebeat" +else + echo "Errors in master filebeat" + echo "${fbout1}" + exit 1 +fi +fbout2=$(docker exec multi-node_wazuh.worker_1 sh -c 'filebeat test output') +fbstatus2=$(echo "${fbout2}" | grep OK | wc -l) +if [[ fbstatus2 -eq 7 ]]; then + echo "No errors in master filebeat" +else + echo "Errors in master filebeat" + echo "${fbout2}" + exit 1 +fi \ No newline at end of file diff --git a/.github/multi-node-log-check.sh b/.github/multi-node-log-check.sh new file mode 100755 index 00000000..f55c850e --- /dev/null +++ b/.github/multi-node-log-check.sh @@ -0,0 +1,16 @@ +log1=$(docker exec multi-node_wazuh.master_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR||WARN||CRIT"') +if [[ -z "$log1" ]]; then + echo "No errors in master ossec.log" +else + echo "Errors in master ossec.log:" + echo "${log1}" + exit 1 +fi +log2=$(docker exec multi-node_wazuh.worker_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR||WARN||CRIT"') +if [[ -z "${log2}" ]]; then + echo "No errors in worker ossec.log" +else + echo "Errors in worker ossec.log:" + echo "${log2}" + exit 1 +fi \ No newline at end of file diff --git a/.github/single-node-fb-check.sh b/.github/single-node-fb-check.sh new file mode 100755 index 00000000..0e9d15fe --- /dev/null +++ b/.github/single-node-fb-check.sh @@ -0,0 +1,9 @@ +fbout=$(docker exec single-node_wazuh.manager_1 sh -c 'filebeat test output') +fbstatus=$(echo "${fbout}" | grep OK | wc -l) +if [[ fbstatus -eq 7 ]]; then + echo "No errors in master filebeat" +else + echo "Errors in master filebeat" + echo "${fbout}" + exit 1 +fi \ No newline at end of file diff --git a/.github/single-node-check.sh b/.github/single-node-log-check.sh similarity index 100% rename from .github/single-node-check.sh rename to .github/single-node-log-check.sh diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 0f7def87..cad603a5 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -101,20 +101,11 @@ jobs: TOKEN: $(curl -s -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") - name: Check errors in ossec.log - run: ./.github/single-node-check.sh + run: ./.github/single-node-log-check.sh - name: Check filebeat output - run: | - fbout1=$(docker exec single-node_wazuh.manager_1 sh -c 'filebeat test output') - fbstatus=$(echo "${fbout}" | grep OK | wc -l) - if [[ fbstatus -eq 7 ]]; then - echo "No errors in master filebeat" - else - echo "Errors in master filebeat" - echo "${fbout}" - exit 1 - fi + run: ./.github/single-node-fb-check.sh - name: Check Wazuh dashboard service URL run: | @@ -209,44 +200,11 @@ jobs: TOKEN: $(curl -s -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") - name: Check errors in ossec.log - run: | - log1=$(docker exec multi-node_wazuh.master_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR||WARN||CRIT"') - if [[ -z "$log1" ]]; then - echo "No errors in master ossec.log" - else - echo "Errors in master ossec.log:" - echo "${log1}" - exit 1 - fi - log2=$(docker exec multi-node_wazuh.worker_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR||WARN||CRIT"') - if [[ -z "${log2}" ]]; then - echo "No errors in worker ossec.log" - else - echo "Errors in worker ossec.log:" - echo "${log2}" - exit 1 - fi + run: ./.github/multi-node-log-check.sh + - name: Check filebeat output - run: | - fbout1=$(docker exec multi-node_wazuh.master_1 sh -c 'filebeat test output') - fbstatus1=$(echo "${fbout1}" | grep OK | wc -l) - if [[ fbstatus1 -eq 7 ]]; then - echo "No errors in master filebeat" - else - echo "Errors in master filebeat" - echo "${fbout1}" - exit 1 - fi - fbout2=$(docker exec multi-node_wazuh.worker_1 sh -c 'filebeat test output') - fbstatus2=$(echo "${fbout2}" | grep OK | wc -l) - if [[ fbstatus2 -eq 7 ]]; then - echo "No errors in master filebeat" - else - echo "Errors in master filebeat" - echo "${fbout2}" - exit 1 - fi + run: ./.github/multi-node-fb-check.sh - name: Check Wazuh dashboard service URL run: | From 8e8b53e6e11f5b6c68b4af268cecb5ae1ad0c815 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 17:49:46 -0300 Subject: [PATCH 129/178] Test CI --- .github/single-node-fb-check.sh | 4 ++-- .github/single-node-log-check.sh | 4 ++-- .../config/wazuh_cluster/wazuh_manager.conf | 15 --------------- multi-node/config/wazuh_cluster/wazuh_worker.conf | 15 --------------- 4 files changed, 4 insertions(+), 34 deletions(-) diff --git a/.github/single-node-fb-check.sh b/.github/single-node-fb-check.sh index 0e9d15fe..dffaa75b 100755 --- a/.github/single-node-fb-check.sh +++ b/.github/single-node-fb-check.sh @@ -1,9 +1,9 @@ fbout=$(docker exec single-node_wazuh.manager_1 sh -c 'filebeat test output') fbstatus=$(echo "${fbout}" | grep OK | wc -l) if [[ fbstatus -eq 7 ]]; then - echo "No errors in master filebeat" + echo "No errors in filebeat" else - echo "Errors in master filebeat" + echo "Errors in filebeat" echo "${fbout}" exit 1 fi \ No newline at end of file diff --git a/.github/single-node-log-check.sh b/.github/single-node-log-check.sh index 5da10d96..a65715a2 100755 --- a/.github/single-node-log-check.sh +++ b/.github/single-node-log-check.sh @@ -1,8 +1,8 @@ log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' | grep -P "ERR|WARN|CRIT") if [[ -z "$log" ]]; then - echo "No errors in master ossec.log" + echo "No errors in ossec.log" else - echo "Errors in master ossec.log:" + echo "Errors in ossec.log:" echo "${log}" exit 1 fi \ No newline at end of file diff --git a/multi-node/config/wazuh_cluster/wazuh_manager.conf b/multi-node/config/wazuh_cluster/wazuh_manager.conf index 8747f02e..aec223a1 100644 --- a/multi-node/config/wazuh_cluster/wazuh_manager.conf +++ b/multi-node/config/wazuh_cluster/wazuh_manager.conf @@ -349,24 +349,9 @@ /var/ossec/logs/active-responses.log - - syslog - /var/log/auth.log - - - - syslog - /var/log/syslog - - syslog /var/log/dpkg.log - - syslog - /var/log/kern.log - - \ No newline at end of file diff --git a/multi-node/config/wazuh_cluster/wazuh_worker.conf b/multi-node/config/wazuh_cluster/wazuh_worker.conf index dc4475d2..46fceb1e 100644 --- a/multi-node/config/wazuh_cluster/wazuh_worker.conf +++ b/multi-node/config/wazuh_cluster/wazuh_worker.conf @@ -349,24 +349,9 @@ /var/ossec/logs/active-responses.log - - syslog - /var/log/auth.log - - - - syslog - /var/log/syslog - - syslog /var/log/dpkg.log - - syslog - /var/log/kern.log - - \ No newline at end of file From b95e02d41d8c450b697fdde9035dd233f62705f6 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 18:00:25 -0300 Subject: [PATCH 130/178] Test CI --- .github/multi-node-log-check.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/multi-node-log-check.sh b/.github/multi-node-log-check.sh index f55c850e..5fd97037 100755 --- a/.github/multi-node-log-check.sh +++ b/.github/multi-node-log-check.sh @@ -1,4 +1,4 @@ -log1=$(docker exec multi-node_wazuh.master_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR||WARN||CRIT"') +log1=$(docker exec multi-node_wazuh.master_1 sh -c 'cat /var/ossec/logs/ossec.log' | grep -P "ERR|WARN|CRIT") if [[ -z "$log1" ]]; then echo "No errors in master ossec.log" else @@ -6,7 +6,7 @@ else echo "${log1}" exit 1 fi -log2=$(docker exec multi-node_wazuh.worker_1 sh -c 'cat /var/ossec/logs/ossec.log | grep -E "ERR||WARN||CRIT"') +log2=$(docker exec multi-node_wazuh.worker_1 sh -c 'cat /var/ossec/logs/ossec.log' | grep -P "ERR|WARN|CRIT") if [[ -z "${log2}" ]]; then echo "No errors in worker ossec.log" else From 42c2ea5dba272cde5ac5f66726fa127223cb8ae7 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 18:07:40 -0300 Subject: [PATCH 131/178] Test CI --- .github/multi-node-fb-check.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/multi-node-fb-check.sh b/.github/multi-node-fb-check.sh index b5ead4d9..7c0d1abd 100755 --- a/.github/multi-node-fb-check.sh +++ b/.github/multi-node-fb-check.sh @@ -10,9 +10,9 @@ fi fbout2=$(docker exec multi-node_wazuh.worker_1 sh -c 'filebeat test output') fbstatus2=$(echo "${fbout2}" | grep OK | wc -l) if [[ fbstatus2 -eq 7 ]]; then - echo "No errors in master filebeat" + echo "No errors in worker filebeat" else - echo "Errors in master filebeat" + echo "Errors in worker filebeat" echo "${fbout2}" exit 1 fi \ No newline at end of file From a34e0af547fc6e29da8cc952fb7f111e30eeb845 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 18:14:12 -0300 Subject: [PATCH 132/178] Test CI --- .github/multi-node-fb-check.sh | 4 ++-- .github/single-node-fb-check.sh | 2 +- .github/workflows/push.yml | 24 ++++++++++++------------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/multi-node-fb-check.sh b/.github/multi-node-fb-check.sh index 7c0d1abd..36b9686e 100755 --- a/.github/multi-node-fb-check.sh +++ b/.github/multi-node-fb-check.sh @@ -1,5 +1,5 @@ fbout1=$(docker exec multi-node_wazuh.master_1 sh -c 'filebeat test output') -fbstatus1=$(echo "${fbout1}" | grep OK | wc -l) +fbstatus1=$(echo "${fbout1}" | grep -c OK) if [[ fbstatus1 -eq 7 ]]; then echo "No errors in master filebeat" else @@ -8,7 +8,7 @@ else exit 1 fi fbout2=$(docker exec multi-node_wazuh.worker_1 sh -c 'filebeat test output') -fbstatus2=$(echo "${fbout2}" | grep OK | wc -l) +fbstatus2=$(echo "${fbout2}" | grep -c OK) if [[ fbstatus2 -eq 7 ]]; then echo "No errors in worker filebeat" else diff --git a/.github/single-node-fb-check.sh b/.github/single-node-fb-check.sh index dffaa75b..47e21dd1 100755 --- a/.github/single-node-fb-check.sh +++ b/.github/single-node-fb-check.sh @@ -1,5 +1,5 @@ fbout=$(docker exec single-node_wazuh.manager_1 sh -c 'filebeat test output') -fbstatus=$(echo "${fbout}" | grep OK | wc -l) +fbstatus=$(echo "${fbout}" | grep -c OK) if [[ fbstatus -eq 7 ]]; then echo "No errors in filebeat" else diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index cad603a5..14d02acc 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,6 +1,6 @@ name: Wazuh Docker pipeline -on: [pull_request, push] +on: [pull_request] jobs: build-stack: @@ -10,22 +10,22 @@ jobs: - name: Check out code uses: actions/checkout@v3 - # - name: Build Wazuh images - # run: build-docker-images/build-images.sh + - name: Build Wazuh images + run: build-docker-images/build-images.sh - name: Create enviroment variables run: cat .env > $GITHUB_ENV - # - name: Install Goss - # uses: e1himself/goss-installation-action@v1.0.3 - # with: - # version: v0.3.16 + - name: Install Goss + uses: e1himself/goss-installation-action@v1.0.3 + with: + version: v0.3.16 - # - name: Execute Goss tests (wazuh-manager) - # run: dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} - # env: - # GOSS_SLEEP: 30 - # GOSS_FILE: .github/.goss.yaml + - name: Execute Goss tests (wazuh-manager) + run: dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} + env: + GOSS_SLEEP: 30 + GOSS_FILE: .github/.goss.yaml - name: Create single node certficates run: docker-compose -f single-node/generate-indexer-certs.yml run --rm generator From b28ae3b3abd66bfedd9818799363032e847e499e Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 18:25:19 -0300 Subject: [PATCH 133/178] Test CI --- build-docker-images/build-images.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-docker-images/build-images.sh b/build-docker-images/build-images.sh index ee73bb5c..b8da9c7b 100755 --- a/build-docker-images/build-images.sh +++ b/build-docker-images/build-images.sh @@ -1,4 +1,4 @@ -WAZUH_IMAGE_VERSION=4.3.3 +WAZUH_IMAGE_VERSION=4.3.4 WAZUH_VERSION=$(echo $WAZUH_IMAGE_VERSION | sed -e 's/\.//g') WAZUH_ACTUAL_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g') From ddc03699e5d8aa86b5f97f0a5cf879c04163f4e2 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 8 Jun 2022 18:36:09 -0300 Subject: [PATCH 134/178] Test CI --- .../wazuh-dashboard/config/install_wazuh_app.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/build-docker-images/wazuh-dashboard/config/install_wazuh_app.sh b/build-docker-images/wazuh-dashboard/config/install_wazuh_app.sh index c4f0d5d5..b1c0f5ce 100644 --- a/build-docker-images/wazuh-dashboard/config/install_wazuh_app.sh +++ b/build-docker-images/wazuh-dashboard/config/install_wazuh_app.sh @@ -1,13 +1,11 @@ ## Variables WAZUH_IMAGE_VERSION=$(echo $WAZUH_VERSION | sed -e 's/\.//g') WAZUH_ACTUAL_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g') -echo $WAZUH_IMAGE_VERSION -echo $WAZUH_ACTUAL_VERSION ## If wazuh manager exists in apt dev repository, change variables, if not exit 1 if [ "$WAZUH_IMAGE_VERSION" -le "$WAZUH_ACTUAL_VERSION" ]; then - WAZUH_APP=https://packages.wazuh.com/4.x/ui/dashboard/wazuh-${WAZUH_VERSION}.zip + WAZUH_APP=https://packages.wazuh.com/4.x/ui/dashboard/wazuh-${WAZUH_VERSION}-1.zip else - WAZUH_APP=https://packages-dev.wazuh.com/pre-release/ui/dashboard/wazuh-${WAZUH_VERSION}.zip + WAZUH_APP=https://packages-dev.wazuh.com/pre-release/ui/dashboard/wazuh-${WAZUH_VERSION}-1.zip fi # Install Wazuh App From 961b8bad21f7ce74424a9d0fa3439c202824c0b6 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 9 Jun 2022 09:24:57 -0300 Subject: [PATCH 135/178] Test CI --- single-node/prueba.sh | 6 ------ 1 file changed, 6 deletions(-) delete mode 100755 single-node/prueba.sh diff --git a/single-node/prueba.sh b/single-node/prueba.sh deleted file mode 100755 index 7393163e..00000000 --- a/single-node/prueba.sh +++ /dev/null @@ -1,6 +0,0 @@ -nodes="`curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k | grep -E "indexer" | wc -l`" -if [[ $nodes -eq 1 ]]; then - echo "bien" -else - echo "mal" -fi From 6591e9ae6809f3548c199a75f03643b193627cee Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 9 Jun 2022 10:36:10 -0300 Subject: [PATCH 136/178] Test CI --- build-docker-images/wazuh-dashboard/Dockerfile | 1 + build-docker-images/wazuh-dashboard/config/entrypoint.sh | 2 +- .../wazuh-dashboard/config/install_wazuh_app.sh | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build-docker-images/wazuh-dashboard/Dockerfile b/build-docker-images/wazuh-dashboard/Dockerfile index 0c1f9274..2b08e7fa 100644 --- a/build-docker-images/wazuh-dashboard/Dockerfile +++ b/build-docker-images/wazuh-dashboard/Dockerfile @@ -3,6 +3,7 @@ FROM ubuntu:focal AS builder ARG WAZUH_VERSION ARG INSTALL_DIR=/usr/share/wazuh-dashboard +ARG WAZUH_UI_REVISION=1 # Update and install dependencies RUN apt-get update && apt install curl libcap2-bin xz-utils -y diff --git a/build-docker-images/wazuh-dashboard/config/entrypoint.sh b/build-docker-images/wazuh-dashboard/config/entrypoint.sh index 54fe0d3e..03091825 100644 --- a/build-docker-images/wazuh-dashboard/config/entrypoint.sh +++ b/build-docker-images/wazuh-dashboard/config/entrypoint.sh @@ -15,6 +15,6 @@ echo $DASHBOARD_PASSWORD | $INSTALL_DIR/bin/opensearch-dashboards-keystore add o # Start Wazuh dashboard ############################################################################## -/wazuh_app_config.sh +/wazuh_app_config.sh $WAZUH_UI_REVISION /usr/share/wazuh-dashboard/bin/opensearch-dashboards -c /usr/share/wazuh-dashboard/config/opensearch_dashboards.yml \ No newline at end of file diff --git a/build-docker-images/wazuh-dashboard/config/install_wazuh_app.sh b/build-docker-images/wazuh-dashboard/config/install_wazuh_app.sh index b1c0f5ce..b0698c5f 100644 --- a/build-docker-images/wazuh-dashboard/config/install_wazuh_app.sh +++ b/build-docker-images/wazuh-dashboard/config/install_wazuh_app.sh @@ -3,9 +3,9 @@ WAZUH_IMAGE_VERSION=$(echo $WAZUH_VERSION | sed -e 's/\.//g') WAZUH_ACTUAL_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g') ## If wazuh manager exists in apt dev repository, change variables, if not exit 1 if [ "$WAZUH_IMAGE_VERSION" -le "$WAZUH_ACTUAL_VERSION" ]; then - WAZUH_APP=https://packages.wazuh.com/4.x/ui/dashboard/wazuh-${WAZUH_VERSION}-1.zip + WAZUH_APP=https://packages.wazuh.com/4.x/ui/dashboard/wazuh-${WAZUH_VERSION}-${WAZUH_UI_REVISION}.zip else - WAZUH_APP=https://packages-dev.wazuh.com/pre-release/ui/dashboard/wazuh-${WAZUH_VERSION}-1.zip + WAZUH_APP=https://packages-dev.wazuh.com/pre-release/ui/dashboard/wazuh-${WAZUH_VERSION}-${WAZUH_UI_REVISION}.zip fi # Install Wazuh App From 7c642638ffe2100fabb9b4a239ce0200f4e44a6b Mon Sep 17 00:00:00 2001 From: "Volm, David" Date: Thu, 10 Feb 2022 07:51:29 -0600 Subject: [PATCH 137/178] Allow other Exceptions to bubble up a stack trace instead of silently failing in create_user.py --- build-docker-images/wazuh-manager/config/create_user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-docker-images/wazuh-manager/config/create_user.py b/build-docker-images/wazuh-manager/config/create_user.py index cc492398..e2a89325 100644 --- a/build-docker-images/wazuh-manager/config/create_user.py +++ b/build-docker-images/wazuh-manager/config/create_user.py @@ -21,7 +21,7 @@ set_user_role, update_user, ) -except Exception as e: +except ModuleNotFoundError as e: logging.error("No module 'wazuh' found.") sys.exit(1) From 03764ea251c50c658a44b2b1c204a4ceddc0ed1f Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 9 Jun 2022 12:18:37 -0300 Subject: [PATCH 138/178] Test CI --- .github/workflows/push.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 14d02acc..695b4f65 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -3,7 +3,7 @@ name: Wazuh Docker pipeline on: [pull_request] jobs: - build-stack: + build-docker-images: runs-on: ubuntu-latest steps: @@ -27,7 +27,12 @@ jobs: GOSS_SLEEP: 30 GOSS_FILE: .github/.goss.yaml - - name: Create single node certficates + check-single-node: + runs-on: ubuntu-latest + needs: build-docker-images + steps: + + - name: Create single node certficates run: docker-compose -f single-node/generate-indexer-certs.yml run --rm generator - name: Start single node stack @@ -120,6 +125,11 @@ jobs: - name: Stop single node stack run: docker-compose -f single-node/docker-compose.yml down + check-multi-node: + runs-on: ubuntu-latest + needs: build-docker-images + steps: + - name: Create multi node certficates run: docker-compose -f multi-node/generate-indexer-certs.yml run --rm generator From 8976d2f5b66d66835ede2db2fb9fb64275344cd4 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 9 Jun 2022 12:19:22 -0300 Subject: [PATCH 139/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 695b4f65..d6b42b2e 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -32,7 +32,7 @@ jobs: needs: build-docker-images steps: - - name: Create single node certficates + - name: Create single node certficates run: docker-compose -f single-node/generate-indexer-certs.yml run --rm generator - name: Start single node stack From c17cc9a15bf748b697b335900bea2b5f1ae066c9 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 9 Jun 2022 12:32:29 -0300 Subject: [PATCH 140/178] Test CI --- .github/workflows/push.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index d6b42b2e..587a2b82 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -32,6 +32,9 @@ jobs: needs: build-docker-images steps: + - name: Check out code + uses: actions/checkout@v3 + - name: Create single node certficates run: docker-compose -f single-node/generate-indexer-certs.yml run --rm generator @@ -130,6 +133,9 @@ jobs: needs: build-docker-images steps: + - name: Check out code + uses: actions/checkout@v3 + - name: Create multi node certficates run: docker-compose -f multi-node/generate-indexer-certs.yml run --rm generator From 731d3c3622547a19529d85d1a1be20917dca56dc Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 9 Jun 2022 15:14:39 -0300 Subject: [PATCH 141/178] Test CI --- .github/workflows/push.yml | 87 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 587a2b82..0fa707fb 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -16,6 +16,33 @@ jobs: - name: Create enviroment variables run: cat .env > $GITHUB_ENV + - name: Create backup Docker images + run: | + docker save wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} > /wazuh-manager.tar + docker save wazuh/wazuh-indexer:${{env.WAZUH_IMAGE_VERSION}} > /wazuh-indexer.tar + docker save wazuh/wazuh-dashboard:${{env.WAZUH_IMAGE_VERSION}} > /wazuh-dashboard.tar + + - name: Temporarily save Wazuh manager Docker image + uses: actions/upload-artifact@v2 + with: + name: docker-artifact-manager + path: /wazuh-manager.tar + retention-days: 1 + + - name: Temporarily save Wazuh indexer Docker image + uses: actions/upload-artifact@v2 + with: + name: docker-artifact-indexer + path: /wazuh-indexer.tar + retention-days: 1 + + - name: Temporarily save Wazuh dashboard Docker image + uses: actions/upload-artifact@v2 + with: + name: docker-artifact-dashboard + path: /wazuh-dashboard.tar + retention-days: 1 + - name: Install Goss uses: e1himself/goss-installation-action@v1.0.3 with: @@ -35,6 +62,36 @@ jobs: - name: Check out code uses: actions/checkout@v3 + - name: Create enviroment variables + run: cat .env > $GITHUB_ENV + + - name: Retrieve saved Wazuh manager Docker image + uses: actions/download-artifact@v2 + with: + name: docker-artifact-manager + path: /wazuh-manager.tar + retention-days: 1 + + - name: Retrieve saved Wazuh indexer Docker image + uses: actions/download-artifact@v2 + with: + name: docker-artifact-indexer + path: /wazuh-indexer.tar + retention-days: 1 + + - name: Retrieve saved Wazuh dashboard Docker image + uses: actions/download-artifact@v2 + with: + name: docker-artifact-dashboard + path: /wazuh-dashboard.tar + retention-days: 1 + + - name: Docker load + run: | + docker load < /wazuh-manager.tar + docker load < /wazuh-indexer.tar + docker load < /wazuh-dashboard.tar + - name: Create single node certficates run: docker-compose -f single-node/generate-indexer-certs.yml run --rm generator @@ -136,6 +193,36 @@ jobs: - name: Check out code uses: actions/checkout@v3 + - name: Create enviroment variables + run: cat .env > $GITHUB_ENV + + - name: Retrieve saved Wazuh manager Docker image + uses: actions/download-artifact@v2 + with: + name: docker-artifact-manager + path: /wazuh-manager.tar + retention-days: 1 + + - name: Retrieve saved Wazuh indexer Docker image + uses: actions/download-artifact@v2 + with: + name: docker-artifact-indexer + path: /wazuh-indexer.tar + retention-days: 1 + + - name: Retrieve saved Wazuh dashboard Docker image + uses: actions/download-artifact@v2 + with: + name: docker-artifact-dashboard + path: /wazuh-dashboard.tar + retention-days: 1 + + - name: Docker load + run: | + docker load < /wazuh-manager.tar + docker load < /wazuh-indexer.tar + docker load < /wazuh-dashboard.tar + - name: Create multi node certficates run: docker-compose -f multi-node/generate-indexer-certs.yml run --rm generator From b718d753decc0730c0532754d91ed8a682ecb257 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 9 Jun 2022 15:15:21 -0300 Subject: [PATCH 142/178] Test CI --- .github/workflows/push.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 0fa707fb..80d6f099 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -18,9 +18,9 @@ jobs: - name: Create backup Docker images run: | - docker save wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} > /wazuh-manager.tar - docker save wazuh/wazuh-indexer:${{env.WAZUH_IMAGE_VERSION}} > /wazuh-indexer.tar - docker save wazuh/wazuh-dashboard:${{env.WAZUH_IMAGE_VERSION}} > /wazuh-dashboard.tar + docker save wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} > /wazuh-manager.tar + docker save wazuh/wazuh-indexer:${{env.WAZUH_IMAGE_VERSION}} > /wazuh-indexer.tar + docker save wazuh/wazuh-dashboard:${{env.WAZUH_IMAGE_VERSION}} > /wazuh-dashboard.tar - name: Temporarily save Wazuh manager Docker image uses: actions/upload-artifact@v2 From 46740f306aa64f49f731d2295beb85b22c11d655 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 9 Jun 2022 15:16:59 -0300 Subject: [PATCH 143/178] Test CI --- .github/workflows/push.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 80d6f099..29a75070 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -23,21 +23,21 @@ jobs: docker save wazuh/wazuh-dashboard:${{env.WAZUH_IMAGE_VERSION}} > /wazuh-dashboard.tar - name: Temporarily save Wazuh manager Docker image - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: docker-artifact-manager path: /wazuh-manager.tar retention-days: 1 - name: Temporarily save Wazuh indexer Docker image - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: docker-artifact-indexer path: /wazuh-indexer.tar retention-days: 1 - name: Temporarily save Wazuh dashboard Docker image - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: docker-artifact-dashboard path: /wazuh-dashboard.tar @@ -66,21 +66,21 @@ jobs: run: cat .env > $GITHUB_ENV - name: Retrieve saved Wazuh manager Docker image - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: docker-artifact-manager path: /wazuh-manager.tar retention-days: 1 - name: Retrieve saved Wazuh indexer Docker image - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: docker-artifact-indexer path: /wazuh-indexer.tar retention-days: 1 - name: Retrieve saved Wazuh dashboard Docker image - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: docker-artifact-dashboard path: /wazuh-dashboard.tar @@ -197,21 +197,21 @@ jobs: run: cat .env > $GITHUB_ENV - name: Retrieve saved Wazuh manager Docker image - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: docker-artifact-manager path: /wazuh-manager.tar retention-days: 1 - name: Retrieve saved Wazuh indexer Docker image - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: docker-artifact-indexer path: /wazuh-indexer.tar retention-days: 1 - name: Retrieve saved Wazuh dashboard Docker image - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: docker-artifact-dashboard path: /wazuh-dashboard.tar From 01e616ce76c0907f3d18e5459742ecc2c6a8277d Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 9 Jun 2022 15:19:02 -0300 Subject: [PATCH 144/178] Test CI --- .github/workflows/push.yml | 106 ++++++++++++++++++------------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 29a75070..81a64fdd 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -23,25 +23,25 @@ jobs: docker save wazuh/wazuh-dashboard:${{env.WAZUH_IMAGE_VERSION}} > /wazuh-dashboard.tar - name: Temporarily save Wazuh manager Docker image - uses: actions/upload-artifact@v3 - with: - name: docker-artifact-manager - path: /wazuh-manager.tar - retention-days: 1 + uses: actions/upload-artifact@v3 + with: + name: docker-artifact-manager + path: /wazuh-manager.tar + retention-days: 1 - name: Temporarily save Wazuh indexer Docker image - uses: actions/upload-artifact@v3 - with: - name: docker-artifact-indexer - path: /wazuh-indexer.tar - retention-days: 1 + uses: actions/upload-artifact@v3 + with: + name: docker-artifact-indexer + path: /wazuh-indexer.tar + retention-days: 1 - name: Temporarily save Wazuh dashboard Docker image - uses: actions/upload-artifact@v3 - with: - name: docker-artifact-dashboard - path: /wazuh-dashboard.tar - retention-days: 1 + uses: actions/upload-artifact@v3 + with: + name: docker-artifact-dashboard + path: /wazuh-dashboard.tar + retention-days: 1 - name: Install Goss uses: e1himself/goss-installation-action@v1.0.3 @@ -66,31 +66,31 @@ jobs: run: cat .env > $GITHUB_ENV - name: Retrieve saved Wazuh manager Docker image - uses: actions/download-artifact@v3 - with: - name: docker-artifact-manager - path: /wazuh-manager.tar - retention-days: 1 + uses: actions/download-artifact@v3 + with: + name: docker-artifact-manager + path: /wazuh-manager.tar + retention-days: 1 - name: Retrieve saved Wazuh indexer Docker image - uses: actions/download-artifact@v3 - with: - name: docker-artifact-indexer - path: /wazuh-indexer.tar - retention-days: 1 + uses: actions/download-artifact@v3 + with: + name: docker-artifact-indexer + path: /wazuh-indexer.tar + retention-days: 1 - name: Retrieve saved Wazuh dashboard Docker image - uses: actions/download-artifact@v3 - with: - name: docker-artifact-dashboard - path: /wazuh-dashboard.tar - retention-days: 1 + uses: actions/download-artifact@v3 + with: + name: docker-artifact-dashboard + path: /wazuh-dashboard.tar + retention-days: 1 - name: Docker load - run: | - docker load < /wazuh-manager.tar - docker load < /wazuh-indexer.tar - docker load < /wazuh-dashboard.tar + run: | + docker load < /wazuh-manager.tar + docker load < /wazuh-indexer.tar + docker load < /wazuh-dashboard.tar - name: Create single node certficates run: docker-compose -f single-node/generate-indexer-certs.yml run --rm generator @@ -197,31 +197,31 @@ jobs: run: cat .env > $GITHUB_ENV - name: Retrieve saved Wazuh manager Docker image - uses: actions/download-artifact@v3 - with: - name: docker-artifact-manager - path: /wazuh-manager.tar - retention-days: 1 + uses: actions/download-artifact@v3 + with: + name: docker-artifact-manager + path: /wazuh-manager.tar + retention-days: 1 - name: Retrieve saved Wazuh indexer Docker image - uses: actions/download-artifact@v3 - with: - name: docker-artifact-indexer - path: /wazuh-indexer.tar - retention-days: 1 + uses: actions/download-artifact@v3 + with: + name: docker-artifact-indexer + path: /wazuh-indexer.tar + retention-days: 1 - name: Retrieve saved Wazuh dashboard Docker image - uses: actions/download-artifact@v3 - with: - name: docker-artifact-dashboard - path: /wazuh-dashboard.tar - retention-days: 1 + uses: actions/download-artifact@v3 + with: + name: docker-artifact-dashboard + path: /wazuh-dashboard.tar + retention-days: 1 - name: Docker load - run: | - docker load < /wazuh-manager.tar - docker load < /wazuh-indexer.tar - docker load < /wazuh-dashboard.tar + run: | + docker load < /wazuh-manager.tar + docker load < /wazuh-indexer.tar + docker load < /wazuh-dashboard.tar - name: Create multi node certficates run: docker-compose -f multi-node/generate-indexer-certs.yml run --rm generator From 919eab0c84c43d2525070a0e82c2ec735ea81fca Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 9 Jun 2022 15:28:44 -0300 Subject: [PATCH 145/178] Test CI --- .github/workflows/push.yml | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 81a64fdd..45eaa2fb 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -18,29 +18,30 @@ jobs: - name: Create backup Docker images run: | - docker save wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} > /wazuh-manager.tar - docker save wazuh/wazuh-indexer:${{env.WAZUH_IMAGE_VERSION}} > /wazuh-indexer.tar - docker save wazuh/wazuh-dashboard:${{env.WAZUH_IMAGE_VERSION}} > /wazuh-dashboard.tar + mkdir -p /home/ubuntu/docker-images/ + docker save wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} > /home/ubuntu/docker-images/wazuh-manager.tar + docker save wazuh/wazuh-indexer:${{env.WAZUH_IMAGE_VERSION}} > /home/ubuntu/docker-images/wazuh-indexer.tar + docker save wazuh/wazuh-dashboard:${{env.WAZUH_IMAGE_VERSION}} > /home/ubuntu/docker-images/wazuh-dashboard.tar - name: Temporarily save Wazuh manager Docker image uses: actions/upload-artifact@v3 with: name: docker-artifact-manager - path: /wazuh-manager.tar + path: /home/ubuntu/docker-images/wazuh-manager.tar retention-days: 1 - name: Temporarily save Wazuh indexer Docker image uses: actions/upload-artifact@v3 with: name: docker-artifact-indexer - path: /wazuh-indexer.tar + path: /home/ubuntu/docker-images/wazuh-indexer.tar retention-days: 1 - name: Temporarily save Wazuh dashboard Docker image uses: actions/upload-artifact@v3 with: name: docker-artifact-dashboard - path: /wazuh-dashboard.tar + path: /home/ubuntu/docker-images/wazuh-dashboard.tar retention-days: 1 - name: Install Goss @@ -69,28 +70,28 @@ jobs: uses: actions/download-artifact@v3 with: name: docker-artifact-manager - path: /wazuh-manager.tar + path: /home/ubuntu/docker-images/wazuh-manager.tar retention-days: 1 - name: Retrieve saved Wazuh indexer Docker image uses: actions/download-artifact@v3 with: name: docker-artifact-indexer - path: /wazuh-indexer.tar + path: /home/ubuntu/docker-images/wazuh-indexer.tar retention-days: 1 - name: Retrieve saved Wazuh dashboard Docker image uses: actions/download-artifact@v3 with: name: docker-artifact-dashboard - path: /wazuh-dashboard.tar + path: /home/ubuntu/docker-images/wazuh-dashboard.tar retention-days: 1 - name: Docker load run: | - docker load < /wazuh-manager.tar - docker load < /wazuh-indexer.tar - docker load < /wazuh-dashboard.tar + docker load < /home/ubuntu/docker-images/wazuh-manager.tar + docker load < /home/ubuntu/docker-images/wazuh-indexer.tar + docker load < /home/ubuntu/docker-images/wazuh-dashboard.tar - name: Create single node certficates run: docker-compose -f single-node/generate-indexer-certs.yml run --rm generator @@ -200,28 +201,28 @@ jobs: uses: actions/download-artifact@v3 with: name: docker-artifact-manager - path: /wazuh-manager.tar + path: /home/ubuntu/docker-images/wazuh-manager.tar retention-days: 1 - name: Retrieve saved Wazuh indexer Docker image uses: actions/download-artifact@v3 with: name: docker-artifact-indexer - path: /wazuh-indexer.tar + path: /home/ubuntu/docker-images/wazuh-indexer.tar retention-days: 1 - name: Retrieve saved Wazuh dashboard Docker image uses: actions/download-artifact@v3 with: name: docker-artifact-dashboard - path: /wazuh-dashboard.tar + path: /home/ubuntu/docker-images/wazuh-dashboard.tar retention-days: 1 - name: Docker load run: | - docker load < /wazuh-manager.tar - docker load < /wazuh-indexer.tar - docker load < /wazuh-dashboard.tar + docker load < /home/ubuntu/docker-images/wazuh-manager.tar + docker load < /home/ubuntu/docker-images/wazuh-indexer.tar + docker load < /home/ubuntu/docker-images/wazuh-dashboard.tar - name: Create multi node certficates run: docker-compose -f multi-node/generate-indexer-certs.yml run --rm generator From 8d4c6c4170fa6c589cc0ceaa7433743b4f8641ab Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 9 Jun 2022 15:37:03 -0300 Subject: [PATCH 146/178] Test CI --- .github/workflows/push.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 45eaa2fb..c7d32668 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -7,6 +7,9 @@ jobs: runs-on: ubuntu-latest steps: + - name: prueba + run: pwd + - name: Check out code uses: actions/checkout@v3 From 0384112385461cbfb574f609b0ed8e7fbed5b995 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 9 Jun 2022 15:38:58 -0300 Subject: [PATCH 147/178] Test CI --- .github/workflows/push.yml | 41 ++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index c7d32668..98a48915 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -7,9 +7,6 @@ jobs: runs-on: ubuntu-latest steps: - - name: prueba - run: pwd - - name: Check out code uses: actions/checkout@v3 @@ -21,30 +18,30 @@ jobs: - name: Create backup Docker images run: | - mkdir -p /home/ubuntu/docker-images/ - docker save wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} > /home/ubuntu/docker-images/wazuh-manager.tar - docker save wazuh/wazuh-indexer:${{env.WAZUH_IMAGE_VERSION}} > /home/ubuntu/docker-images/wazuh-indexer.tar - docker save wazuh/wazuh-dashboard:${{env.WAZUH_IMAGE_VERSION}} > /home/ubuntu/docker-images/wazuh-dashboard.tar + mkdir -p /home/runner/work/wazuh-docker/wazuh-docker/docker-images/ + docker save wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} > /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar + docker save wazuh/wazuh-indexer:${{env.WAZUH_IMAGE_VERSION}} > /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar + docker save wazuh/wazuh-dashboard:${{env.WAZUH_IMAGE_VERSION}} > /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar - name: Temporarily save Wazuh manager Docker image uses: actions/upload-artifact@v3 with: name: docker-artifact-manager - path: /home/ubuntu/docker-images/wazuh-manager.tar + path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar retention-days: 1 - name: Temporarily save Wazuh indexer Docker image uses: actions/upload-artifact@v3 with: name: docker-artifact-indexer - path: /home/ubuntu/docker-images/wazuh-indexer.tar + path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar retention-days: 1 - name: Temporarily save Wazuh dashboard Docker image uses: actions/upload-artifact@v3 with: name: docker-artifact-dashboard - path: /home/ubuntu/docker-images/wazuh-dashboard.tar + path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar retention-days: 1 - name: Install Goss @@ -73,28 +70,28 @@ jobs: uses: actions/download-artifact@v3 with: name: docker-artifact-manager - path: /home/ubuntu/docker-images/wazuh-manager.tar + path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar retention-days: 1 - name: Retrieve saved Wazuh indexer Docker image uses: actions/download-artifact@v3 with: name: docker-artifact-indexer - path: /home/ubuntu/docker-images/wazuh-indexer.tar + path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar retention-days: 1 - name: Retrieve saved Wazuh dashboard Docker image uses: actions/download-artifact@v3 with: name: docker-artifact-dashboard - path: /home/ubuntu/docker-images/wazuh-dashboard.tar + path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar retention-days: 1 - name: Docker load run: | - docker load < /home/ubuntu/docker-images/wazuh-manager.tar - docker load < /home/ubuntu/docker-images/wazuh-indexer.tar - docker load < /home/ubuntu/docker-images/wazuh-dashboard.tar + docker load < /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar + docker load < /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar + docker load < /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar - name: Create single node certficates run: docker-compose -f single-node/generate-indexer-certs.yml run --rm generator @@ -204,28 +201,28 @@ jobs: uses: actions/download-artifact@v3 with: name: docker-artifact-manager - path: /home/ubuntu/docker-images/wazuh-manager.tar + path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar retention-days: 1 - name: Retrieve saved Wazuh indexer Docker image uses: actions/download-artifact@v3 with: name: docker-artifact-indexer - path: /home/ubuntu/docker-images/wazuh-indexer.tar + path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar retention-days: 1 - name: Retrieve saved Wazuh dashboard Docker image uses: actions/download-artifact@v3 with: name: docker-artifact-dashboard - path: /home/ubuntu/docker-images/wazuh-dashboard.tar + path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar retention-days: 1 - name: Docker load run: | - docker load < /home/ubuntu/docker-images/wazuh-manager.tar - docker load < /home/ubuntu/docker-images/wazuh-indexer.tar - docker load < /home/ubuntu/docker-images/wazuh-dashboard.tar + docker load < /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar + docker load < /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar + docker load < /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar - name: Create multi node certficates run: docker-compose -f multi-node/generate-indexer-certs.yml run --rm generator From 94f62d25d330ca3bc5ea4ce80a58225c1df9496b Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 9 Jun 2022 16:23:58 -0300 Subject: [PATCH 148/178] Test CI --- .github/workflows/push.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 98a48915..258b99b8 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -71,27 +71,24 @@ jobs: with: name: docker-artifact-manager path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar - retention-days: 1 - name: Retrieve saved Wazuh indexer Docker image uses: actions/download-artifact@v3 with: name: docker-artifact-indexer path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar - retention-days: 1 - name: Retrieve saved Wazuh dashboard Docker image uses: actions/download-artifact@v3 with: name: docker-artifact-dashboard path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar - retention-days: 1 - name: Docker load run: | - docker load < /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar - docker load < /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar - docker load < /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar + docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar + docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar + docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar - name: Create single node certficates run: docker-compose -f single-node/generate-indexer-certs.yml run --rm generator @@ -202,27 +199,24 @@ jobs: with: name: docker-artifact-manager path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar - retention-days: 1 - name: Retrieve saved Wazuh indexer Docker image uses: actions/download-artifact@v3 with: name: docker-artifact-indexer path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar - retention-days: 1 - name: Retrieve saved Wazuh dashboard Docker image uses: actions/download-artifact@v3 with: name: docker-artifact-dashboard path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar - retention-days: 1 - name: Docker load run: | - docker load < /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar - docker load < /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar - docker load < /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar + docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar + docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar + docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar - name: Create multi node certficates run: docker-compose -f multi-node/generate-indexer-certs.yml run --rm generator From f5ba9370ea6b789102077b9872bcecf6c9e4a03b Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 9 Jun 2022 16:41:50 -0300 Subject: [PATCH 149/178] Test CI --- .github/workflows/push.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 258b99b8..53520abc 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -214,6 +214,12 @@ jobs: - name: Docker load run: | + ls -ltr /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar + ls -ltr /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar/ + ls -ltr /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar + ls -ltr /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar/ + ls -ltr /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar + ls -ltr /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar/ docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar From 1c80201dc90826947c2a25dd64ade4815b462334 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 10 Jun 2022 09:19:06 -0300 Subject: [PATCH 150/178] Test CI --- .github/workflows/push.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 53520abc..6d4e7ca6 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -19,9 +19,13 @@ jobs: - name: Create backup Docker images run: | mkdir -p /home/runner/work/wazuh-docker/wazuh-docker/docker-images/ - docker save wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} > /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar - docker save wazuh/wazuh-indexer:${{env.WAZUH_IMAGE_VERSION}} > /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar - docker save wazuh/wazuh-dashboard:${{env.WAZUH_IMAGE_VERSION}} > /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar + docker save wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} -o /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar + docker save wazuh/wazuh-indexer:${{env.WAZUH_IMAGE_VERSION}} -o /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar + docker save wazuh/wazuh-dashboard:${{env.WAZUH_IMAGE_VERSION}} -o /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar + docker rmi $(docker images -q) + docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar + docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar + docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar - name: Temporarily save Wazuh manager Docker image uses: actions/upload-artifact@v3 From de41cd08c981aa1311ab52fb4bdb6de4f3fe0dee Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 10 Jun 2022 10:23:56 -0300 Subject: [PATCH 151/178] Test CI --- .github/workflows/push.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 6d4e7ca6..0a0882d1 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -70,18 +70,18 @@ jobs: - name: Create enviroment variables run: cat .env > $GITHUB_ENV - - name: Retrieve saved Wazuh manager Docker image - uses: actions/download-artifact@v3 - with: - name: docker-artifact-manager - path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar - - name: Retrieve saved Wazuh indexer Docker image uses: actions/download-artifact@v3 with: name: docker-artifact-indexer path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar + - name: Retrieve saved Wazuh manager Docker image + uses: actions/download-artifact@v3 + with: + name: docker-artifact-manager + path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar + - name: Retrieve saved Wazuh dashboard Docker image uses: actions/download-artifact@v3 with: @@ -198,6 +198,12 @@ jobs: - name: Create enviroment variables run: cat .env > $GITHUB_ENV + - name: Retrieve saved Wazuh dashboard Docker image + uses: actions/download-artifact@v3 + with: + name: docker-artifact-dashboard + path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar + - name: Retrieve saved Wazuh manager Docker image uses: actions/download-artifact@v3 with: @@ -210,11 +216,7 @@ jobs: name: docker-artifact-indexer path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar - - name: Retrieve saved Wazuh dashboard Docker image - uses: actions/download-artifact@v3 - with: - name: docker-artifact-dashboard - path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar + - name: Docker load run: | From 20d065cce355ed5d25663a559ea5c4b1fbf1bcb1 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 10 Jun 2022 10:53:31 -0300 Subject: [PATCH 152/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 0a0882d1..2b612f80 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -189,7 +189,7 @@ jobs: check-multi-node: runs-on: ubuntu-latest - needs: build-docker-images + needs: [build-docker-images,check-single-node] steps: - name: Check out code From 6dbfc1bbbf436a2100a5fd68dd76e22c921bc8b2 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 10 Jun 2022 15:33:42 -0300 Subject: [PATCH 153/178] Test CI --- .github/workflows/push.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 2b612f80..dac64205 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -90,9 +90,10 @@ jobs: - name: Docker load run: | - docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar + docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar + - name: Create single node certficates run: docker-compose -f single-node/generate-indexer-certs.yml run --rm generator From d3954c9f8d81688cbc83b2ac610286a5fd9cde1f Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 10 Jun 2022 15:34:15 -0300 Subject: [PATCH 154/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index dac64205..5b31108f 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -190,7 +190,7 @@ jobs: check-multi-node: runs-on: ubuntu-latest - needs: [build-docker-images,check-single-node] + needs: build-docker-images steps: - name: Check out code From 174cf64b9b9465183eeec4fe4582ffeae0e8079e Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 10 Jun 2022 16:17:48 -0300 Subject: [PATCH 155/178] Test CI --- .github/workflows/push.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 5b31108f..2759a66d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -26,8 +26,9 @@ jobs: docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar + tar -tvf file.tar /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar - - name: Temporarily save Wazuh manager Docker image + name: Temporarily save Wazuh manager Docker image uses: actions/upload-artifact@v3 with: name: docker-artifact-manager @@ -90,6 +91,7 @@ jobs: - name: Docker load run: | + tar -tvf file.tar /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar From d6557165dab8fd228a70b3daba3f264430b6a768 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 10 Jun 2022 16:19:12 -0300 Subject: [PATCH 156/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 2759a66d..6f16ac4b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -28,7 +28,7 @@ jobs: docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar tar -tvf file.tar /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar - name: Temporarily save Wazuh manager Docker image + -name: Temporarily save Wazuh manager Docker image uses: actions/upload-artifact@v3 with: name: docker-artifact-manager From 3059de4c9fbb5a0a4d752d69e218ee0fe2d4406c Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 10 Jun 2022 16:20:06 -0300 Subject: [PATCH 157/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 6f16ac4b..bab87672 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -28,7 +28,7 @@ jobs: docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar tar -tvf file.tar /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar - -name: Temporarily save Wazuh manager Docker image + - name: Temporarily save Wazuh manager Docker image uses: actions/upload-artifact@v3 with: name: docker-artifact-manager From 9b9c422dea34dd3e7df234c26a321e84ad8a3240 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 10 Jun 2022 16:37:34 -0300 Subject: [PATCH 158/178] Test CI --- .github/workflows/push.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index bab87672..52566793 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -26,7 +26,6 @@ jobs: docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar - tar -tvf file.tar /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar - name: Temporarily save Wazuh manager Docker image uses: actions/upload-artifact@v3 @@ -75,23 +74,19 @@ jobs: uses: actions/download-artifact@v3 with: name: docker-artifact-indexer - path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar - name: Retrieve saved Wazuh manager Docker image uses: actions/download-artifact@v3 with: name: docker-artifact-manager - path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar - name: Retrieve saved Wazuh dashboard Docker image uses: actions/download-artifact@v3 with: name: docker-artifact-dashboard - path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar - name: Docker load run: | - tar -tvf file.tar /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar From 8fb1b51d08abf9a5a6f4e8b141685086be23233e Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 10 Jun 2022 16:53:45 -0300 Subject: [PATCH 159/178] Test CI --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 52566793..de39e5cf 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -87,7 +87,7 @@ jobs: - name: Docker load run: | - docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar + docker load --input ./wazuh-indexer.tar docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar From ecef793c7f69e9f55d2de08731f07830c4415c8b Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 10 Jun 2022 17:12:38 -0300 Subject: [PATCH 160/178] Test CI --- .github/workflows/push.yml | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index de39e5cf..90fa0883 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -88,8 +88,8 @@ jobs: - name: Docker load run: | docker load --input ./wazuh-indexer.tar - docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar - docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar + docker load --input ./wazuh-dashboard.tar + docker load --input ./wazuh-manager.tar - name: Create single node certficates @@ -200,33 +200,22 @@ jobs: uses: actions/download-artifact@v3 with: name: docker-artifact-dashboard - path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar - name: Retrieve saved Wazuh manager Docker image uses: actions/download-artifact@v3 with: name: docker-artifact-manager - path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar - name: Retrieve saved Wazuh indexer Docker image uses: actions/download-artifact@v3 with: name: docker-artifact-indexer - path: /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar - - - name: Docker load run: | - ls -ltr /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar - ls -ltr /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar/ - ls -ltr /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar - ls -ltr /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar/ - ls -ltr /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar - ls -ltr /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar/ - docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar - docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar - docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar + docker load --input ./wazuh-manager.tar + docker load --input ./wazuh-indexer.tar + docker load --input ./wazuh-dashboard.tar - name: Create multi node certficates run: docker-compose -f multi-node/generate-indexer-certs.yml run --rm generator From 672d1fc67a1c5ef7616be3f570aca89b9cd00882 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Mon, 13 Jun 2022 15:27:23 -0300 Subject: [PATCH 161/178] Test CI --- .github/workflows/push.yml | 8 ++++---- build-docker-images/build-images.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 90fa0883..43d80c5c 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -109,7 +109,7 @@ jobs: exit 1 fi status_index="`curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s | wc -l`" - status_index_green="`curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s | grep -E "green" | wc -l`" + status_index_green="`curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s | grep "green" | wc -l`" if [[ $status_index_green -eq $status_index ]]; then curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s else @@ -140,8 +140,8 @@ jobs: - name: Check Wazuh templates run: | - qty_templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep -E "wazuh ||wazuh-agent||wazuh-statistics" | wc -l`" - templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep -E "wazuh ||wazuh-agent||wazuh-statistics"`" + qty_templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep -P "wazuh|wazuh-agent|wazuh-statistics" | wc -l`" + templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep -P "wazuh|wazuh-agent|wazuh-statistics"`" if [[ $qty_templates -eq 3 ]]; then echo "wazuh templates:" echo "${templates}" @@ -266,7 +266,7 @@ jobs: run: | qty_templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep "wazuh" | wc -l`" templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep "wazuh"`" - if [[ $qty_templates -gt 0 ]]; then + if [[ $qty_templates -eq 3 ]]; then echo "wazuh templates:" echo "${templates}" else diff --git a/build-docker-images/build-images.sh b/build-docker-images/build-images.sh index b8da9c7b..10105990 100755 --- a/build-docker-images/build-images.sh +++ b/build-docker-images/build-images.sh @@ -6,7 +6,7 @@ WAZUH_ACTUAL_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/re if [ "$WAZUH_VERSION" -le "$WAZUH_ACTUAL_VERSION" ]; then IMAGE_VERSION=${WAZUH_IMAGE_VERSION} else - IMAGE_VERSION=${WAZUH_IMAGE_VERSION}-dev + IMAGE_VERSION=${WAZUH_IMAGE_VERSION} fi echo WAZUH_VERSION=$WAZUH_IMAGE_VERSION > .env From a84ff7b1ff11aed9211f49d1e92ff729f3a12c85 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 14 Jun 2022 12:50:21 -0300 Subject: [PATCH 162/178] Test CI --- .github/.goss.yaml | 60 +++++++++++++++++++++++++++ .github/multi-node-fb-check.sh | 18 -------- .github/multi-node-filebeat-check.sh | 18 ++++++++ .github/multi-node-log-check.sh | 16 +++---- .github/single-node-fb-check.sh | 9 ---- .github/single-node-filebeat-check.sh | 9 ++++ .github/single-node-log-check.sh | 8 ++-- .github/workflows/push.yml | 4 +- 8 files changed, 101 insertions(+), 41 deletions(-) delete mode 100755 .github/multi-node-fb-check.sh create mode 100755 .github/multi-node-filebeat-check.sh delete mode 100755 .github/single-node-fb-check.sh create mode 100755 .github/single-node-filebeat-check.sh diff --git a/.github/.goss.yaml b/.github/.goss.yaml index a345bac4..8ef1b8bb 100644 --- a/.github/.goss.yaml +++ b/.github/.goss.yaml @@ -1,3 +1,53 @@ +file: + /etc/filebeat/filebeat.yml: + exists: true + mode: "0644" + owner: root + group: root + filetype: file + contains: [] + /var/ossec/bin/wazuh-control: + exists: true + mode: "0750" + owner: root + group: root + filetype: file + contains: [] + /var/ossec/etc/lists/audit-keys: + exists: true + mode: "0660" + owner: wazuh + group: wazuh + filetype: file + contains: [] + /var/ossec/etc/ossec.conf: + exists: true + mode: "0660" + owner: root + group: wazuh + filetype: file + contains: [] + /var/ossec/etc/rules/local_rules.xml: + exists: true + mode: "0660" + owner: wazuh + group: wazuh + filetype: file + contains: [] + /var/ossec/etc/sslmanager.cert: + exists: true + mode: "0640" + owner: root + group: root + filetype: file + contains: [] + /var/ossec/etc/sslmanager.key: + exists: true + mode: "0640" + owner: root + group: root + filetype: file + contains: [] package: filebeat: installed: true @@ -41,3 +91,13 @@ process: running: true wazuh-modulesd: running: true +user: + wazuh: + exists: true + groups: + - wazuh + home: /var/ossec + shell: /sbin/nologin +group: + wazuh: + exists: true \ No newline at end of file diff --git a/.github/multi-node-fb-check.sh b/.github/multi-node-fb-check.sh deleted file mode 100755 index 36b9686e..00000000 --- a/.github/multi-node-fb-check.sh +++ /dev/null @@ -1,18 +0,0 @@ -fbout1=$(docker exec multi-node_wazuh.master_1 sh -c 'filebeat test output') -fbstatus1=$(echo "${fbout1}" | grep -c OK) -if [[ fbstatus1 -eq 7 ]]; then - echo "No errors in master filebeat" -else - echo "Errors in master filebeat" - echo "${fbout1}" - exit 1 -fi -fbout2=$(docker exec multi-node_wazuh.worker_1 sh -c 'filebeat test output') -fbstatus2=$(echo "${fbout2}" | grep -c OK) -if [[ fbstatus2 -eq 7 ]]; then - echo "No errors in worker filebeat" -else - echo "Errors in worker filebeat" - echo "${fbout2}" - exit 1 -fi \ No newline at end of file diff --git a/.github/multi-node-filebeat-check.sh b/.github/multi-node-filebeat-check.sh new file mode 100755 index 00000000..39a21827 --- /dev/null +++ b/.github/multi-node-filebeat-check.sh @@ -0,0 +1,18 @@ +filebeatout1=$(docker exec multi-node_wazuh.master_1 sh -c 'filebeat test output') +filebeatstatus1=$(echo "${filebeatout1}" | grep -c OK) +if [[ filebeatstatus1 -eq 7 ]]; then + echo "No errors in master filebeat" +else + echo "Errors in master filebeat" + echo "${filebeatout1}" + exit 1 +fi +filebeatout2=$(docker exec multi-node_wazuh.worker_1 sh -c 'filebeat test output') +filebeatstatus2=$(echo "${filebeatout2}" | grep -c OK) +if [[ filebeatstatus2 -eq 7 ]]; then + echo "No errors in worker filebeat" +else + echo "Errors in worker filebeat" + echo "${filebeatout2}" + exit 1 +fi \ No newline at end of file diff --git a/.github/multi-node-log-check.sh b/.github/multi-node-log-check.sh index 5fd97037..bfa1649a 100755 --- a/.github/multi-node-log-check.sh +++ b/.github/multi-node-log-check.sh @@ -1,16 +1,16 @@ log1=$(docker exec multi-node_wazuh.master_1 sh -c 'cat /var/ossec/logs/ossec.log' | grep -P "ERR|WARN|CRIT") if [[ -z "$log1" ]]; then - echo "No errors in master ossec.log" + echo "No errors in master ossec.log" else - echo "Errors in master ossec.log:" - echo "${log1}" - exit 1 + echo "Errors in master ossec.log:" + echo "${log1}" + exit 1 fi log2=$(docker exec multi-node_wazuh.worker_1 sh -c 'cat /var/ossec/logs/ossec.log' | grep -P "ERR|WARN|CRIT") if [[ -z "${log2}" ]]; then - echo "No errors in worker ossec.log" + echo "No errors in worker ossec.log" else - echo "Errors in worker ossec.log:" - echo "${log2}" - exit 1 + echo "Errors in worker ossec.log:" + echo "${log2}" + exit 1 fi \ No newline at end of file diff --git a/.github/single-node-fb-check.sh b/.github/single-node-fb-check.sh deleted file mode 100755 index 47e21dd1..00000000 --- a/.github/single-node-fb-check.sh +++ /dev/null @@ -1,9 +0,0 @@ -fbout=$(docker exec single-node_wazuh.manager_1 sh -c 'filebeat test output') -fbstatus=$(echo "${fbout}" | grep -c OK) -if [[ fbstatus -eq 7 ]]; then - echo "No errors in filebeat" -else - echo "Errors in filebeat" - echo "${fbout}" - exit 1 -fi \ No newline at end of file diff --git a/.github/single-node-filebeat-check.sh b/.github/single-node-filebeat-check.sh new file mode 100755 index 00000000..b2a51ac7 --- /dev/null +++ b/.github/single-node-filebeat-check.sh @@ -0,0 +1,9 @@ +filebeatoutout=$(docker exec single-node_wazuh.manager_1 sh -c 'filebeat test output') +filebeatstatus=$(echo "${filebeatout}" | grep -c OK) +if [[ filebeatstatus -eq 7 ]]; then + echo "No errors in filebeat" +else + echo "Errors in filebeat" + echo "${filebeatout}" + exit 1 +fi \ No newline at end of file diff --git a/.github/single-node-log-check.sh b/.github/single-node-log-check.sh index a65715a2..806e9238 100755 --- a/.github/single-node-log-check.sh +++ b/.github/single-node-log-check.sh @@ -1,8 +1,8 @@ log=$(docker exec single-node_wazuh.manager_1 sh -c 'cat /var/ossec/logs/ossec.log' | grep -P "ERR|WARN|CRIT") if [[ -z "$log" ]]; then - echo "No errors in ossec.log" + echo "No errors in ossec.log" else - echo "Errors in ossec.log:" - echo "${log}" - exit 1 + echo "Errors in ossec.log:" + echo "${log}" + exit 1 fi \ No newline at end of file diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 43d80c5c..e7a0d4aa 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -170,7 +170,7 @@ jobs: - name: Check filebeat output - run: ./.github/single-node-fb-check.sh + run: ./.github/single-node-filebeat-check.sh - name: Check Wazuh dashboard service URL run: | @@ -301,7 +301,7 @@ jobs: - name: Check filebeat output - run: ./.github/multi-node-fb-check.sh + run: ./.github/multi-node-filebeat-check.sh - name: Check Wazuh dashboard service URL run: | From 0f2b15312325efe5068a183e673887f22cca8253 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 14 Jun 2022 13:21:07 -0300 Subject: [PATCH 163/178] Test CI --- .github/single-node-filebeat-check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/single-node-filebeat-check.sh b/.github/single-node-filebeat-check.sh index b2a51ac7..7f9ae7d3 100755 --- a/.github/single-node-filebeat-check.sh +++ b/.github/single-node-filebeat-check.sh @@ -1,4 +1,4 @@ -filebeatoutout=$(docker exec single-node_wazuh.manager_1 sh -c 'filebeat test output') +filebeatout=$(docker exec single-node_wazuh.manager_1 sh -c 'filebeat test output') filebeatstatus=$(echo "${filebeatout}" | grep -c OK) if [[ filebeatstatus -eq 7 ]]; then echo "No errors in filebeat" From c3375e0141e479805ef9271d1c2d750349c82212 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 21 Jun 2022 11:46:25 -0300 Subject: [PATCH 164/178] modify variable --- build-docker-images/build-images.sh | 4 ++-- .../wazuh-dashboard/config/install_wazuh_app.sh | 4 ++-- build-docker-images/wazuh-manager/config/check_repository.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build-docker-images/build-images.sh b/build-docker-images/build-images.sh index 10105990..d805b2b3 100755 --- a/build-docker-images/build-images.sh +++ b/build-docker-images/build-images.sh @@ -1,9 +1,9 @@ WAZUH_IMAGE_VERSION=4.3.4 WAZUH_VERSION=$(echo $WAZUH_IMAGE_VERSION | sed -e 's/\.//g') -WAZUH_ACTUAL_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g') +WAZUH_CURRENT_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g') ## If wazuh manager exists in apt dev repository, change variables, if not, exit 1 -if [ "$WAZUH_VERSION" -le "$WAZUH_ACTUAL_VERSION" ]; then +if [ "$WAZUH_VERSION" -le "$WAZUH_CURRENT_VERSION" ]; then IMAGE_VERSION=${WAZUH_IMAGE_VERSION} else IMAGE_VERSION=${WAZUH_IMAGE_VERSION} diff --git a/build-docker-images/wazuh-dashboard/config/install_wazuh_app.sh b/build-docker-images/wazuh-dashboard/config/install_wazuh_app.sh index b0698c5f..61264e6a 100644 --- a/build-docker-images/wazuh-dashboard/config/install_wazuh_app.sh +++ b/build-docker-images/wazuh-dashboard/config/install_wazuh_app.sh @@ -1,8 +1,8 @@ ## Variables WAZUH_IMAGE_VERSION=$(echo $WAZUH_VERSION | sed -e 's/\.//g') -WAZUH_ACTUAL_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g') +WAZUH_CURRENT_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g') ## If wazuh manager exists in apt dev repository, change variables, if not exit 1 -if [ "$WAZUH_IMAGE_VERSION" -le "$WAZUH_ACTUAL_VERSION" ]; then +if [ "$WAZUH_IMAGE_VERSION" -le "$WAZUH_CURRENT_VERSION" ]; then WAZUH_APP=https://packages.wazuh.com/4.x/ui/dashboard/wazuh-${WAZUH_VERSION}-${WAZUH_UI_REVISION}.zip else WAZUH_APP=https://packages-dev.wazuh.com/pre-release/ui/dashboard/wazuh-${WAZUH_VERSION}-${WAZUH_UI_REVISION}.zip diff --git a/build-docker-images/wazuh-manager/config/check_repository.sh b/build-docker-images/wazuh-manager/config/check_repository.sh index 1a0763ce..5501d326 100644 --- a/build-docker-images/wazuh-manager/config/check_repository.sh +++ b/build-docker-images/wazuh-manager/config/check_repository.sh @@ -1,8 +1,8 @@ ## Variables WAZUH_IMAGE_VERSION=$(echo $WAZUH_VERSION | sed -e 's/\.//g') -WAZUH_ACTUAL_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g') +WAZUH_CURRENT_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g') ## If wazuh manager exists in apt dev repository, change variables, if not exit 1 -if [ "$WAZUH_IMAGE_VERSION" -le "$WAZUH_ACTUAL_VERSION" ]; then +if [ "$WAZUH_IMAGE_VERSION" -le "$WAZUH_CURRENT_VERSION" ]; then APT_KEY=https://packages.wazuh.com/key/GPG-KEY-WAZUH REPOSITORY="deb https://packages.wazuh.com/4.x/apt/ stable main" else From dc7691808b62535d74feceb090bd95a0c51f0756 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Tue, 21 Jun 2022 12:20:44 -0300 Subject: [PATCH 165/178] modify variable --- .env | 4 ++-- .github/workflows/push.yml | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.env b/.env index 7986c42f..2498b0cf 100755 --- a/.env +++ b/.env @@ -1,2 +1,2 @@ -WAZUH_VERSION=4.3.3 -WAZUH_IMAGE_VERSION=4.3.3 +WAZUH_VERSION=4.3.4 +WAZUH_IMAGE_VERSION=4.3.4 diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index e7a0d4aa..33967eef 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -22,10 +22,6 @@ jobs: docker save wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}} -o /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar docker save wazuh/wazuh-indexer:${{env.WAZUH_IMAGE_VERSION}} -o /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar docker save wazuh/wazuh-dashboard:${{env.WAZUH_IMAGE_VERSION}} -o /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar - docker rmi $(docker images -q) - docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-manager.tar - docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-indexer.tar - docker load --input /home/runner/work/wazuh-docker/wazuh-docker/docker-images/wazuh-dashboard.tar - name: Temporarily save Wazuh manager Docker image uses: actions/upload-artifact@v3 From 61791c198482dfd5c0f9d5ed20349232659f3ad9 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 23 Jun 2022 15:36:27 -0300 Subject: [PATCH 166/178] Bump 4.3.5 --- .env | 4 ++-- .github/.goss.yaml | 2 +- CHANGELOG.md | 5 +++++ README.md | 1 + VERSION | 4 ++-- build-docker-images/build-images.sh | 2 +- multi-node/docker-compose.yml | 12 ++++++------ single-node/docker-compose.yml | 6 +++--- 8 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.env b/.env index 2498b0cf..d1589beb 100755 --- a/.env +++ b/.env @@ -1,2 +1,2 @@ -WAZUH_VERSION=4.3.4 -WAZUH_IMAGE_VERSION=4.3.4 +WAZUH_VERSION=4.3.5 +WAZUH_IMAGE_VERSION=4.3.5 diff --git a/.github/.goss.yaml b/.github/.goss.yaml index 8ef1b8bb..c6d8733a 100644 --- a/.github/.goss.yaml +++ b/.github/.goss.yaml @@ -56,7 +56,7 @@ package: wazuh-manager: installed: true versions: - - 4.3.4-1 + - 4.3.5-1 port: tcp:1514: listening: true diff --git a/CHANGELOG.md b/CHANGELOG.md index c782f4d4..4a7649fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log All notable changes to this project will be documented in this file. +## Wazuh Docker v4.3.5 +### Added + +- Update Wazuh to version [4.3.5](https://github.com/wazuh/wazuh/blob/v4.3.5/CHANGELOG.md#v435) + ## Wazuh Docker v4.3.4 ### Added diff --git a/README.md b/README.md index 575316b8..719ea788 100644 --- a/README.md +++ b/README.md @@ -193,6 +193,7 @@ WAZUH_MONITORING_REPLICAS=0 # | Wazuh version | ODFE | XPACK | |---------------|---------|--------| +| v4.3.5 | | | | v4.3.4 | | | | v4.3.3 | | | | v4.3.2 | | | diff --git a/VERSION b/VERSION index f344cc0e..950cb4c1 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -WAZUH-DOCKER_VERSION="4.3.4" -REVISION="40316" +WAZUH-DOCKER_VERSION="4.3.5" +REVISION="40317" diff --git a/build-docker-images/build-images.sh b/build-docker-images/build-images.sh index d805b2b3..47eb6cbd 100755 --- a/build-docker-images/build-images.sh +++ b/build-docker-images/build-images.sh @@ -1,4 +1,4 @@ -WAZUH_IMAGE_VERSION=4.3.4 +WAZUH_IMAGE_VERSION=4.3.5 WAZUH_VERSION=$(echo $WAZUH_IMAGE_VERSION | sed -e 's/\.//g') WAZUH_CURRENT_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g') diff --git a/multi-node/docker-compose.yml b/multi-node/docker-compose.yml index ef52af64..73790325 100644 --- a/multi-node/docker-compose.yml +++ b/multi-node/docker-compose.yml @@ -3,7 +3,7 @@ version: '3.7' services: wazuh.master: - image: wazuh/wazuh-manager:4.3.4 + image: wazuh/wazuh-manager:4.3.5 hostname: wazuh.master restart: always ports: @@ -38,7 +38,7 @@ services: - ./config/wazuh_cluster/wazuh_manager.conf:/wazuh-config-mount/etc/ossec.conf wazuh.worker: - image: wazuh/wazuh-manager:4.3.4 + image: wazuh/wazuh-manager:4.3.5 hostname: wazuh.worker restart: always environment: @@ -67,7 +67,7 @@ services: - ./config/wazuh_cluster/wazuh_worker.conf:/wazuh-config-mount/etc/ossec.conf wazuh1.indexer: - image: wazuh/wazuh-indexer:4.3.4 + image: wazuh/wazuh-indexer:4.3.5 hostname: wazuh1.indexer restart: always ports: @@ -93,7 +93,7 @@ services: - ./config/wazuh_indexer/internal_users.yml:/usr/share/wazuh-indexer/plugins/opensearch-security/securityconfig/internal_users.yml wazuh2.indexer: - image: wazuh/wazuh-indexer:4.3.4 + image: wazuh/wazuh-indexer:4.3.5 hostname: wazuh2.indexer restart: always environment: @@ -115,7 +115,7 @@ services: - ./config/wazuh_indexer/internal_users.yml:/usr/share/wazuh-indexer/plugins/opensearch-security/securityconfig/internal_users.yml wazuh3.indexer: - image: wazuh/wazuh-indexer:4.3.4 + image: wazuh/wazuh-indexer:4.3.5 hostname: wazuh3.indexer restart: always environment: @@ -137,7 +137,7 @@ services: - ./config/wazuh_indexer/internal_users.yml:/usr/share/wazuh-indexer/plugins/opensearch-security/securityconfig/internal_users.yml wazuh.dashboard: - image: wazuh/wazuh-dashboard:4.3.4 + image: wazuh/wazuh-dashboard:4.3.5 hostname: wazuh.dashboard restart: always ports: diff --git a/single-node/docker-compose.yml b/single-node/docker-compose.yml index 3bbd3a23..50b02dd8 100644 --- a/single-node/docker-compose.yml +++ b/single-node/docker-compose.yml @@ -3,7 +3,7 @@ version: '3.7' services: wazuh.manager: - image: wazuh/wazuh-manager:4.3.4 + image: wazuh/wazuh-manager:4.3.5 hostname: wazuh.manager restart: always ports: @@ -39,7 +39,7 @@ services: - ./config/wazuh_cluster/wazuh_manager.conf:/wazuh-config-mount/etc/ossec.conf wazuh.indexer: - image: wazuh/wazuh-indexer:4.3.4 + image: wazuh/wazuh-indexer:4.3.5 hostname: wazuh.indexer restart: always ports: @@ -64,7 +64,7 @@ services: - ./config/wazuh_indexer/internal_users.yml:/usr/share/wazuh-indexer/plugins/opensearch-security/securityconfig/internal_users.yml wazuh.dashboard: - image: wazuh/wazuh-dashboard:4.3.4 + image: wazuh/wazuh-dashboard:4.3.5 hostname: wazuh.dashboard restart: always ports: From 46ec0bd67feb8c229d6ff07546e2c7b080f54af5 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 23 Jun 2022 18:27:24 -0300 Subject: [PATCH 167/178] Add tag revision for Wazuh indexer and dashboard --- .env | 1 + build-docker-images/build-images.sh | 2 ++ build-docker-images/build-images.yml | 9 ++++++--- build-docker-images/wazuh-dashboard/Dockerfile | 5 +++-- .../wazuh-dashboard/config/dl_base.sh | 12 ++++++++++++ build-docker-images/wazuh-indexer/Dockerfile | 1 + build-docker-images/wazuh-indexer/config/config.sh | 13 ++++++++++--- build-docker-images/wazuh-manager/Dockerfile | 3 ++- 8 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 build-docker-images/wazuh-dashboard/config/dl_base.sh diff --git a/.env b/.env index d1589beb..d8df8611 100755 --- a/.env +++ b/.env @@ -1,2 +1,3 @@ WAZUH_VERSION=4.3.5 WAZUH_IMAGE_VERSION=4.3.5 +WAZUH_TAG_REVISION=1 diff --git a/build-docker-images/build-images.sh b/build-docker-images/build-images.sh index 47eb6cbd..357fad29 100755 --- a/build-docker-images/build-images.sh +++ b/build-docker-images/build-images.sh @@ -1,5 +1,6 @@ WAZUH_IMAGE_VERSION=4.3.5 WAZUH_VERSION=$(echo $WAZUH_IMAGE_VERSION | sed -e 's/\.//g') +WAZUH_TAG_REVISION=1 WAZUH_CURRENT_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g') ## If wazuh manager exists in apt dev repository, change variables, if not, exit 1 @@ -11,5 +12,6 @@ fi echo WAZUH_VERSION=$WAZUH_IMAGE_VERSION > .env echo WAZUH_IMAGE_VERSION=$IMAGE_VERSION >> .env +echo WAZUH_TAG_REVISION=$WAZUH_TAG_REVISION >> .env docker-compose -f build-docker-images/build-images.yml --env-file .env build --no-cache \ No newline at end of file diff --git a/build-docker-images/build-images.yml b/build-docker-images/build-images.yml index f842e7d6..52984bf9 100644 --- a/build-docker-images/build-images.yml +++ b/build-docker-images/build-images.yml @@ -6,7 +6,8 @@ services: build: context: wazuh-manager/ args: - - WAZUH_VERSION=${WAZUH_VERSION} + WAZUH_VERSION: ${WAZUH_VERSION} + WAZUH_TAG_REVISION: ${WAZUH_TAG_REVISION} image: wazuh/wazuh-manager:${WAZUH_IMAGE_VERSION} hostname: wazuh.manager restart: always @@ -37,7 +38,8 @@ services: build: context: wazuh-indexer/ args: - - WAZUH_VERSION=${WAZUH_VERSION} + WAZUH_VERSION: ${WAZUH_VERSION} + WAZUH_TAG_REVISION: ${WAZUH_TAG_REVISION} image: wazuh/wazuh-indexer:${WAZUH_IMAGE_VERSION} hostname: wazuh.indexer restart: always @@ -57,7 +59,8 @@ services: build: context: wazuh-dashboard/ args: - - WAZUH_VERSION=${WAZUH_VERSION} + WAZUH_VERSION: ${WAZUH_VERSION} + WAZUH_TAG_REVISION: ${WAZUH_TAG_REVISION} image: wazuh/wazuh-dashboard:${WAZUH_IMAGE_VERSION} hostname: wazuh.dashboard restart: always diff --git a/build-docker-images/wazuh-dashboard/Dockerfile b/build-docker-images/wazuh-dashboard/Dockerfile index 2b08e7fa..990547a2 100644 --- a/build-docker-images/wazuh-dashboard/Dockerfile +++ b/build-docker-images/wazuh-dashboard/Dockerfile @@ -2,6 +2,7 @@ FROM ubuntu:focal AS builder ARG WAZUH_VERSION +ARG WAZUH_TAG_REVISION ARG INSTALL_DIR=/usr/share/wazuh-dashboard ARG WAZUH_UI_REVISION=1 @@ -12,8 +13,8 @@ RUN apt-get update && apt install curl libcap2-bin xz-utils -y RUN mkdir -p $INSTALL_DIR # Download and extract Wazuh dashboard base -RUN curl -o wazuh-dashboard-base.tar.xz https://packages.wazuh.com/stack/dashboard/base/wazuh-dashboard-base-${WAZUH_VERSION}-linux-x64.tar.xz && \ - tar -xf wazuh-dashboard-base.tar.xz --directory $INSTALL_DIR --strip-components=1 +COPY config/dl_base.sh . +RUN bash dl_base.sh # Generate certificates COPY config/config.sh . diff --git a/build-docker-images/wazuh-dashboard/config/dl_base.sh b/build-docker-images/wazuh-dashboard/config/dl_base.sh new file mode 100644 index 00000000..fdea501a --- /dev/null +++ b/build-docker-images/wazuh-dashboard/config/dl_base.sh @@ -0,0 +1,12 @@ +WAZUH_CURRENT_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g') && \ +WAZUH_IMAGE_VERSION=$(echo $WAZUH_VERSION | sed -e 's/\.//g') && \ + + +if [ "$WAZUH_IMAGE_VERSION" -le "$WAZUH_CURRENT_VERSION" ]; then + REPOSITORY="packages.wazuh.com" +else + REPOSITORY="packages-dev.wazuh.com" +fi + +curl -o wazuh-dashboard-base.tar.xz https://${REPOSITORY}/stack/dashboard/base/wazuh-dashboard-base-${WAZUH_VERSION}-${WAZUH_TAG_REVISION}-linux-x64.tar.xz +tar -xf wazuh-dashboard-base.tar.xz --directory $INSTALL_DIR --strip-components=1 diff --git a/build-docker-images/wazuh-indexer/Dockerfile b/build-docker-images/wazuh-indexer/Dockerfile index 216a8822..d126d18e 100644 --- a/build-docker-images/wazuh-indexer/Dockerfile +++ b/build-docker-images/wazuh-indexer/Dockerfile @@ -2,6 +2,7 @@ FROM ubuntu:focal AS builder ARG WAZUH_VERSION +ARG WAZUH_TAG_REVISION RUN apt-get update -y && apt-get install curl openssl xz-utils -y diff --git a/build-docker-images/wazuh-indexer/config/config.sh b/build-docker-images/wazuh-indexer/config/config.sh index 7647936f..54e49f57 100644 --- a/build-docker-images/wazuh-indexer/config/config.sh +++ b/build-docker-images/wazuh-indexer/config/config.sh @@ -4,11 +4,13 @@ export DH_OPTIONS export NAME=wazuh-indexer export TARGET_DIR=${CURDIR}/debian/${NAME} +export WAZUH_CURRENT_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g') +export WAZUH_IMAGE_VERSION=$(echo $WAZUH_VERSION | sed -e 's/\.//g') # Package build options export USER=${NAME} export GROUP=${NAME} -export VERSION=${WAZUH_VERSION} +export VERSION=${WAZUH_VERSION}-${WAZUH_TAG_REVISION} export LOG_DIR=/var/log/${NAME} export LIB_DIR=/var/lib/${NAME} export PID_DIR=/run/${NAME} @@ -19,10 +21,15 @@ export INDEXER_FILE=wazuh-indexer-base.tar.xz export BASE_FILE=wazuh-indexer-base-${VERSION}-linux-x64.tar.xz export REPO_DIR=/unattended_installer - rm -rf ${INSTALLATION_DIR}/ -curl -o ${INDEXER_FILE} https://packages.wazuh.com/stack/indexer/base/${BASE_FILE} +if [ "$WAZUH_IMAGE_VERSION" -le "$WAZUH_CURRENT_VERSION" ]; then + REPOSITORY="packages.wazuh.com" +else + REPOSITORY="packages-dev.wazuh.com" +fi + +curl -o ${INDEXER_FILE} https://${REPOSITORY}/stack/indexer/base/${BASE_FILE} tar -xf ${INDEXER_FILE} ## TOOLS diff --git a/build-docker-images/wazuh-manager/Dockerfile b/build-docker-images/wazuh-manager/Dockerfile index 871357ae..e684f58a 100644 --- a/build-docker-images/wazuh-manager/Dockerfile +++ b/build-docker-images/wazuh-manager/Dockerfile @@ -4,6 +4,7 @@ FROM ubuntu:focal RUN rm /bin/sh && ln -s /bin/bash /bin/sh ARG WAZUH_VERSION +ARG WAZUH_TAG_REVISION ARG TEMPLATE_VERSION=4.3 ARG FILEBEAT_CHANNEL=filebeat-oss ARG FILEBEAT_VERSION=7.10.2 @@ -17,7 +18,7 @@ RUN chmod 775 /check_repository.sh RUN source /check_repository.sh RUN apt-get update && \ - apt-get install wazuh-manager=${WAZUH_VERSION}-1 + apt-get install wazuh-manager=${WAZUH_VERSION}-${WAZUH_TAG_REVISION} RUN curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/${FILEBEAT_CHANNEL}-${FILEBEAT_VERSION}-amd64.deb &&\ dpkg -i ${FILEBEAT_CHANNEL}-${FILEBEAT_VERSION}-amd64.deb && rm -f ${FILEBEAT_CHANNEL}-${FILEBEAT_VERSION}-amd64.deb && \ From 84c4aab03df30bace872d0c114e5ecaaa93088d4 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 29 Jun 2022 12:35:24 -0300 Subject: [PATCH 168/178] Change readme note for build docker images process --- build-docker-images/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-docker-images/README.md b/build-docker-images/README.md index 9860d8b0..a283ff74 100644 --- a/build-docker-images/README.md +++ b/build-docker-images/README.md @@ -1,6 +1,6 @@ # Wazuh Docker Image Builder -This stack allows you to build the Wazuh manager, indexer, and dashboard images locally by running the command: +test ``` $ docker-compose build From 868424cdd253e450f390dc12e9503514b62a30e4 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 29 Jun 2022 13:17:59 -0300 Subject: [PATCH 169/178] Change readme note for build docker images process --- build-docker-images/README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/build-docker-images/README.md b/build-docker-images/README.md index a283ff74..13f1c9bf 100644 --- a/build-docker-images/README.md +++ b/build-docker-images/README.md @@ -1,7 +1,11 @@ # Wazuh Docker Image Builder -test +The creation of the images for the Wazuh stack deployment in Docker is done with the build-images.yml script +To execute the process, the following must be executed in the root of the wazuh-docker repository: + +``` +$ build-docker-images/build-images.sh ``` -$ docker-compose build -``` \ No newline at end of file + +This script initializes the environment variables needed to build each of the images. From f933733a85da71dde4a69890abd9bb286fca0781 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 1 Jul 2022 10:59:52 -0300 Subject: [PATCH 170/178] add option to recreate keystore in entrypoint --- build-docker-images/wazuh-dashboard/config/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-docker-images/wazuh-dashboard/config/entrypoint.sh b/build-docker-images/wazuh-dashboard/config/entrypoint.sh index 03091825..290f9fa8 100644 --- a/build-docker-images/wazuh-dashboard/config/entrypoint.sh +++ b/build-docker-images/wazuh-dashboard/config/entrypoint.sh @@ -7,7 +7,7 @@ DASHBOARD_PASSWORD="${DASHBOARD_PASSWORD:-kibanaserver}" # Create and configure Wazuh dashboard keystore -$INSTALL_DIR/bin/opensearch-dashboards-keystore create --allow-root && \ +yes | $INSTALL_DIR/bin/opensearch-dashboards-keystore create --allow-root && \ echo $DASHBOARD_USERNAME | $INSTALL_DIR/bin/opensearch-dashboards-keystore add opensearch.username --stdin --allow-root && \ echo $DASHBOARD_PASSWORD | $INSTALL_DIR/bin/opensearch-dashboards-keystore add opensearch.password --stdin --allow-root From 9c0676014cacc0aa7a98407378e1409041b5e81b Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 1 Jul 2022 11:37:44 -0300 Subject: [PATCH 171/178] add option to recreate keystore in entrypoint --- build-docker-images/wazuh-dashboard/Dockerfile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/build-docker-images/wazuh-dashboard/Dockerfile b/build-docker-images/wazuh-dashboard/Dockerfile index 990547a2..1b95ca88 100644 --- a/build-docker-images/wazuh-dashboard/Dockerfile +++ b/build-docker-images/wazuh-dashboard/Dockerfile @@ -21,11 +21,6 @@ COPY config/config.sh . COPY config/config.yml / RUN bash config.sh -# Create and configure Wazuh dashboard keystore -RUN $INSTALL_DIR/bin/opensearch-dashboards-keystore create --allow-root && \ - echo kibanaserver | $INSTALL_DIR/bin/opensearch-dashboards-keystore add opensearch.username --stdin --allow-root && \ - echo kibanaserver | $INSTALL_DIR/bin/opensearch-dashboards-keystore add opensearch.password --stdin --allow-root - COPY config/install_wazuh_app.sh / RUN chmod 775 /install_wazuh_app.sh RUN bash /install_wazuh_app.sh From 28641accc20141e6eaf456dff53bcd389a726b3c Mon Sep 17 00:00:00 2001 From: fcaffieri Date: Fri, 1 Jul 2022 17:41:19 -0300 Subject: [PATCH 172/178] disable filebeat metrics --- build-docker-images/wazuh-manager/config/filebeat.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-docker-images/wazuh-manager/config/filebeat.yml b/build-docker-images/wazuh-manager/config/filebeat.yml index e9874fb4..a47e6507 100644 --- a/build-docker-images/wazuh-manager/config/filebeat.yml +++ b/build-docker-images/wazuh-manager/config/filebeat.yml @@ -20,3 +20,5 @@ output.elasticsearch: #ssl.certificate_authorities: #ssl.certificate: #ssl.key: + +logging.metrics.enabled: false \ No newline at end of file From 265dfd39bf6d32573314bb1fdbbe920dc110de5e Mon Sep 17 00:00:00 2001 From: fcaffieri Date: Mon, 4 Jul 2022 09:16:57 -0300 Subject: [PATCH 173/178] disable filebeat metrics --- build-docker-images/wazuh-manager/config/filebeat.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-docker-images/wazuh-manager/config/filebeat.yml b/build-docker-images/wazuh-manager/config/filebeat.yml index a47e6507..8beed808 100644 --- a/build-docker-images/wazuh-manager/config/filebeat.yml +++ b/build-docker-images/wazuh-manager/config/filebeat.yml @@ -21,4 +21,4 @@ output.elasticsearch: #ssl.certificate: #ssl.key: -logging.metrics.enabled: false \ No newline at end of file +logging.metrics.enabled: false From b6aa78273072933acf20888a2608f7e41ec042d1 Mon Sep 17 00:00:00 2001 From: fcaffieri Date: Wed, 6 Jul 2022 17:34:56 -0300 Subject: [PATCH 174/178] Add fix to avoid GLIBC crash --- build-docker-images/wazuh-manager/config/filebeat.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build-docker-images/wazuh-manager/config/filebeat.yml b/build-docker-images/wazuh-manager/config/filebeat.yml index 8beed808..fcf80c3e 100644 --- a/build-docker-images/wazuh-manager/config/filebeat.yml +++ b/build-docker-images/wazuh-manager/config/filebeat.yml @@ -22,3 +22,10 @@ output.elasticsearch: #ssl.key: logging.metrics.enabled: false + +seccomp: +default_action: allow +syscalls: +- action: allow + names: + - rseq From adf95cd1325d89e4f5740403552ad949b2f2097a Mon Sep 17 00:00:00 2001 From: fcaffieri Date: Wed, 6 Jul 2022 18:01:13 -0300 Subject: [PATCH 175/178] Add fix to avoid GLIBC crash, fix identation --- build-docker-images/wazuh-manager/config/filebeat.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build-docker-images/wazuh-manager/config/filebeat.yml b/build-docker-images/wazuh-manager/config/filebeat.yml index fcf80c3e..8d1823af 100644 --- a/build-docker-images/wazuh-manager/config/filebeat.yml +++ b/build-docker-images/wazuh-manager/config/filebeat.yml @@ -24,8 +24,8 @@ output.elasticsearch: logging.metrics.enabled: false seccomp: -default_action: allow -syscalls: -- action: allow - names: - - rseq + default_action: allow + syscalls: + - action: allow + names: + - rseq From a9ea60b9511e61ff9a6c09fc4ee736746ffa9ee4 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 7 Jul 2022 11:40:15 -0300 Subject: [PATCH 176/178] fix uid and gid for wazuh manager keys --- indexer-certs-creator/config/entrypoint.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/indexer-certs-creator/config/entrypoint.sh b/indexer-certs-creator/config/entrypoint.sh index 3dd38447..ba7a3aa4 100644 --- a/indexer-certs-creator/config/entrypoint.sh +++ b/indexer-certs-creator/config/entrypoint.sh @@ -51,11 +51,11 @@ chown 1000:1000 /certificates/* echo "Setting UID for wazuh manager and worker" cp /certificates/root-ca.pem /certificates/root-ca-manager.pem cp /certificates/root-ca.key /certificates/root-ca-manager.key -chown 999:997 /certificates/root-ca-manager.pem -chown 999:997 /certificates/root-ca-manager.key +chown 101:101 /certificates/root-ca-manager.pem +chown 101:101 /certificates/root-ca-manager.key for i in ${node_names[@]}; do - chown 999:997 "/certificates/${i}.pem" - chown 999:997 "/certificates/${i}-key.pem" + chown 101:101 "/certificates/${i}.pem" + chown 101:101 "/certificates/${i}-key.pem" done From 296de1488678ad8ad4f6f01bfc69936b14c769aa Mon Sep 17 00:00:00 2001 From: vcerenu Date: Mon, 18 Jul 2022 10:25:01 -0300 Subject: [PATCH 177/178] bump 4.3.6 version --- .env | 4 ++-- .github/.goss.yaml | 2 +- CHANGELOG.md | 5 +++++ README.md | 1 + VERSION | 4 ++-- build-docker-images/build-images.sh | 2 +- multi-node/docker-compose.yml | 12 ++++++------ single-node/docker-compose.yml | 6 +++--- 8 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.env b/.env index d8df8611..b28408ab 100755 --- a/.env +++ b/.env @@ -1,3 +1,3 @@ -WAZUH_VERSION=4.3.5 -WAZUH_IMAGE_VERSION=4.3.5 +WAZUH_VERSION=4.3.6 +WAZUH_IMAGE_VERSION=4.3.6 WAZUH_TAG_REVISION=1 diff --git a/.github/.goss.yaml b/.github/.goss.yaml index c6d8733a..17fa4cc8 100644 --- a/.github/.goss.yaml +++ b/.github/.goss.yaml @@ -56,7 +56,7 @@ package: wazuh-manager: installed: true versions: - - 4.3.5-1 + - 4.3.6-1 port: tcp:1514: listening: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a7649fa..2aa0dd28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log All notable changes to this project will be documented in this file. +## Wazuh Docker v4.3.6 +### Added + +- Update Wazuh to version [4.3.6](https://github.com/wazuh/wazuh/blob/v4.3.6/CHANGELOG.md#v436) + ## Wazuh Docker v4.3.5 ### Added diff --git a/README.md b/README.md index 719ea788..eb09c245 100644 --- a/README.md +++ b/README.md @@ -193,6 +193,7 @@ WAZUH_MONITORING_REPLICAS=0 # | Wazuh version | ODFE | XPACK | |---------------|---------|--------| +| v4.3.6 | | | | v4.3.5 | | | | v4.3.4 | | | | v4.3.3 | | | diff --git a/VERSION b/VERSION index 950cb4c1..0f136e96 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -WAZUH-DOCKER_VERSION="4.3.5" -REVISION="40317" +WAZUH-DOCKER_VERSION="4.3.6" +REVISION="40318" diff --git a/build-docker-images/build-images.sh b/build-docker-images/build-images.sh index 357fad29..17d04c8a 100755 --- a/build-docker-images/build-images.sh +++ b/build-docker-images/build-images.sh @@ -1,4 +1,4 @@ -WAZUH_IMAGE_VERSION=4.3.5 +WAZUH_IMAGE_VERSION=4.3.6 WAZUH_VERSION=$(echo $WAZUH_IMAGE_VERSION | sed -e 's/\.//g') WAZUH_TAG_REVISION=1 WAZUH_CURRENT_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g') diff --git a/multi-node/docker-compose.yml b/multi-node/docker-compose.yml index 73790325..3f2de212 100644 --- a/multi-node/docker-compose.yml +++ b/multi-node/docker-compose.yml @@ -3,7 +3,7 @@ version: '3.7' services: wazuh.master: - image: wazuh/wazuh-manager:4.3.5 + image: wazuh/wazuh-manager:4.3.6 hostname: wazuh.master restart: always ports: @@ -38,7 +38,7 @@ services: - ./config/wazuh_cluster/wazuh_manager.conf:/wazuh-config-mount/etc/ossec.conf wazuh.worker: - image: wazuh/wazuh-manager:4.3.5 + image: wazuh/wazuh-manager:4.3.6 hostname: wazuh.worker restart: always environment: @@ -67,7 +67,7 @@ services: - ./config/wazuh_cluster/wazuh_worker.conf:/wazuh-config-mount/etc/ossec.conf wazuh1.indexer: - image: wazuh/wazuh-indexer:4.3.5 + image: wazuh/wazuh-indexer:4.3.6 hostname: wazuh1.indexer restart: always ports: @@ -93,7 +93,7 @@ services: - ./config/wazuh_indexer/internal_users.yml:/usr/share/wazuh-indexer/plugins/opensearch-security/securityconfig/internal_users.yml wazuh2.indexer: - image: wazuh/wazuh-indexer:4.3.5 + image: wazuh/wazuh-indexer:4.3.6 hostname: wazuh2.indexer restart: always environment: @@ -115,7 +115,7 @@ services: - ./config/wazuh_indexer/internal_users.yml:/usr/share/wazuh-indexer/plugins/opensearch-security/securityconfig/internal_users.yml wazuh3.indexer: - image: wazuh/wazuh-indexer:4.3.5 + image: wazuh/wazuh-indexer:4.3.6 hostname: wazuh3.indexer restart: always environment: @@ -137,7 +137,7 @@ services: - ./config/wazuh_indexer/internal_users.yml:/usr/share/wazuh-indexer/plugins/opensearch-security/securityconfig/internal_users.yml wazuh.dashboard: - image: wazuh/wazuh-dashboard:4.3.5 + image: wazuh/wazuh-dashboard:4.3.6 hostname: wazuh.dashboard restart: always ports: diff --git a/single-node/docker-compose.yml b/single-node/docker-compose.yml index 50b02dd8..d2cefd47 100644 --- a/single-node/docker-compose.yml +++ b/single-node/docker-compose.yml @@ -3,7 +3,7 @@ version: '3.7' services: wazuh.manager: - image: wazuh/wazuh-manager:4.3.5 + image: wazuh/wazuh-manager:4.3.6 hostname: wazuh.manager restart: always ports: @@ -39,7 +39,7 @@ services: - ./config/wazuh_cluster/wazuh_manager.conf:/wazuh-config-mount/etc/ossec.conf wazuh.indexer: - image: wazuh/wazuh-indexer:4.3.5 + image: wazuh/wazuh-indexer:4.3.6 hostname: wazuh.indexer restart: always ports: @@ -64,7 +64,7 @@ services: - ./config/wazuh_indexer/internal_users.yml:/usr/share/wazuh-indexer/plugins/opensearch-security/securityconfig/internal_users.yml wazuh.dashboard: - image: wazuh/wazuh-dashboard:4.3.5 + image: wazuh/wazuh-dashboard:4.3.6 hostname: wazuh.dashboard restart: always ports: From 9d6567842068278a982276d7da9081c8d96397df Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 22 Jul 2022 13:55:36 -0300 Subject: [PATCH 178/178] bump 4.3 into master --- build-docker-images/build-images.sh | 2 +- build-docker-images/build-images.yml | 10 ---------- single-node/docker-compose.yml | 4 ---- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/build-docker-images/build-images.sh b/build-docker-images/build-images.sh index 17d04c8a..23b96a15 100755 --- a/build-docker-images/build-images.sh +++ b/build-docker-images/build-images.sh @@ -1,4 +1,4 @@ -WAZUH_IMAGE_VERSION=4.3.6 +WAZUH_IMAGE_VERSION=4.5.0 WAZUH_VERSION=$(echo $WAZUH_IMAGE_VERSION | sed -e 's/\.//g') WAZUH_TAG_REVISION=1 WAZUH_CURRENT_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2- | sed -e 's/\.//g') diff --git a/build-docker-images/build-images.yml b/build-docker-images/build-images.yml index 7b7c1e0d..52984bf9 100644 --- a/build-docker-images/build-images.yml +++ b/build-docker-images/build-images.yml @@ -35,17 +35,12 @@ services: - filebeat_var:/var/lib/filebeat wazuh.indexer: -<<<<<<< HEAD:build-docker-images/build-images.yml build: context: wazuh-indexer/ args: WAZUH_VERSION: ${WAZUH_VERSION} WAZUH_TAG_REVISION: ${WAZUH_TAG_REVISION} image: wazuh/wazuh-indexer:${WAZUH_IMAGE_VERSION} -======= - build: wazuh-indexer/ - image: wazuh/wazuh-indexer:4.5.0 ->>>>>>> 69d34905aebbf49485fc35ad31c6914da1ae8785:build-docker-images/docker-compose.yml hostname: wazuh.indexer restart: always ports: @@ -61,17 +56,12 @@ services: hard: 65536 wazuh.dashboard: -<<<<<<< HEAD:build-docker-images/build-images.yml build: context: wazuh-dashboard/ args: WAZUH_VERSION: ${WAZUH_VERSION} WAZUH_TAG_REVISION: ${WAZUH_TAG_REVISION} image: wazuh/wazuh-dashboard:${WAZUH_IMAGE_VERSION} -======= - build: wazuh-dashboard/ - image: wazuh/wazuh-dashboard:4.5.0 ->>>>>>> 69d34905aebbf49485fc35ad31c6914da1ae8785:build-docker-images/docker-compose.yml hostname: wazuh.dashboard restart: always ports: diff --git a/single-node/docker-compose.yml b/single-node/docker-compose.yml index fc0d8e6a..109ead44 100644 --- a/single-node/docker-compose.yml +++ b/single-node/docker-compose.yml @@ -3,11 +3,7 @@ version: '3.7' services: wazuh.manager: -<<<<<<< HEAD - image: wazuh/wazuh-manager:4.3.6 -======= image: wazuh/wazuh-manager:4.5.0 ->>>>>>> 69d34905aebbf49485fc35ad31c6914da1ae8785 hostname: wazuh.manager restart: always ports: