Skip to content

Commit f63c34d

Browse files
committed
merge 4.7.5 into 4.8.0
2 parents e601878 + cfa0a22 commit f63c34d

39 files changed

+340
-368
lines changed

.env

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
WAZUH_VERSION=4.7.5
2-
WAZUH_IMAGE_VERSION=4.7.5
1+
WAZUH_VERSION=4.8.0
2+
WAZUH_IMAGE_VERSION=4.8.0
33
WAZUH_TAG_REVISION=1
4+
FILEBEAT_TEMPLATE_BRANCH=4.8.0
5+
WAZUH_FILEBEAT_MODULE=wazuh-filebeat-0.4.tar.gz
6+
WAZUH_UI_REVISION=1

.github/.goss.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ package:
5656
wazuh-manager:
5757
installed: true
5858
versions:
59-
- 4.7.5-1
59+
- 4.8.0-1
6060
port:
6161
tcp:1514:
6262
listening: true

.github/workflows/push.yml

+34-16
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,9 @@ jobs:
126126
127127
- name: Check documents into wazuh-alerts index
128128
run: |
129+
sleep 120
129130
docs="`curl -XGET "https://0.0.0.0:9200/wazuh-alerts*/_count" -u admin:SecretPassword -k -s | jq -r ".count"`"
130-
if [[ $docs -gt 100 ]]; then
131+
if [[ $docs -gt 0 ]]; then
131132
echo "wazuh-alerts index documents: ${docs}"
132133
else
133134
echo "wazuh-alerts index documents: ${docs}"
@@ -138,7 +139,7 @@ jobs:
138139
run: |
139140
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`"
140141
templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep -P "wazuh|wazuh-agent|wazuh-statistics"`"
141-
if [[ $qty_templates -eq 3 ]]; then
142+
if [[ $qty_templates -gt 3 ]]; then
142143
echo "wazuh templates:"
143144
echo "${templates}"
144145
else
@@ -161,10 +162,6 @@ jobs:
161162
env:
162163
TOKEN: $(curl -s -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true")
163164

164-
- name: Check errors in ossec.log
165-
run: ./.github/single-node-log-check.sh
166-
167-
168165
- name: Check filebeat output
169166
run: ./.github/single-node-filebeat-check.sh
170167

@@ -178,8 +175,8 @@ jobs:
178175
exit 1
179176
fi
180177
181-
- name: Stop single node stack
182-
run: docker-compose -f single-node/docker-compose.yml down
178+
- name: Check errors in ossec.log
179+
run: ./.github/single-node-log-check.sh
183180

184181
check-multi-node:
185182
runs-on: ubuntu-latest
@@ -192,6 +189,14 @@ jobs:
192189
- name: Create enviroment variables
193190
run: cat .env > $GITHUB_ENV
194191

192+
- name: free disk space
193+
run: |
194+
sudo swapoff -a
195+
sudo rm -f /swapfile
196+
sudo apt clean
197+
docker rmi $(docker image ls -aq)
198+
df -h
199+
195200
- name: Retrieve saved Wazuh dashboard Docker image
196201
uses: actions/download-artifact@v3
197202
with:
@@ -212,6 +217,7 @@ jobs:
212217
docker load --input ./wazuh-manager.tar
213218
docker load --input ./wazuh-indexer.tar
214219
docker load --input ./wazuh-dashboard.tar
220+
rm -rf wazuh-manager.tar wazuh-indexer.tar wazuh-dashboard.tar
215221
216222
- name: Create multi node certficates
217223
run: docker-compose -f multi-node/generate-indexer-certs.yml run --rm generator
@@ -221,7 +227,13 @@ jobs:
221227

222228
- name: Check Wazuh indexer start
223229
run: |
224-
sleep 120
230+
until [[ `curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s | grep green | wc -l` -eq 1 ]]
231+
do
232+
echo 'Waiting for Wazuh indexer start'
233+
free -m
234+
df -h
235+
sleep 10
236+
done
225237
status_green="`curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s | grep green | wc -l`"
226238
if [[ $status_green -eq 1 ]]; then
227239
curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s
@@ -250,8 +262,15 @@ jobs:
250262
251263
- name: Check documents into wazuh-alerts index
252264
run: |
265+
until [[ $(``curl -XGET "https://0.0.0.0:9200/wazuh-alerts*/_count" -u admin:SecretPassword -k -s | jq -r ".count"``) -gt 0 ]]
266+
do
267+
echo 'Waiting for Wazuh indexer events'
268+
free -m
269+
df -h
270+
sleep 10
271+
done
253272
docs="`curl -XGET "https://0.0.0.0:9200/wazuh-alerts*/_count" -u admin:SecretPassword -k -s | jq -r ".count"`"
254-
if [[ $docs -gt 100 ]]; then
273+
if [[ $docs -gt 1 ]]; then
255274
echo "wazuh-alerts index documents: ${docs}"
256275
else
257276
echo "wazuh-alerts index documents: ${docs}"
@@ -262,7 +281,7 @@ jobs:
262281
run: |
263282
qty_templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep "wazuh" | wc -l`"
264283
templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep "wazuh"`"
265-
if [[ $qty_templates -eq 3 ]]; then
284+
if [[ $qty_templates -gt 3 ]]; then
266285
echo "wazuh templates:"
267286
echo "${templates}"
268287
else
@@ -292,10 +311,6 @@ jobs:
292311
env:
293312
TOKEN: $(curl -s -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true")
294313

295-
- name: Check errors in ossec.log
296-
run: ./.github/multi-node-log-check.sh
297-
298-
299314
- name: Check filebeat output
300315
run: ./.github/multi-node-filebeat-check.sh
301316

@@ -307,4 +322,7 @@ jobs:
307322
else
308323
echo "Wazuh dashboard status: ${status}"
309324
exit 1
310-
fi
325+
fi
326+
327+
- name: Check errors in ossec.log
328+
run: ./.github/multi-node-log-check.sh

.github/workflows/trivy-dashboard-4-4.yml renamed to .github/workflows/trivy-dashboard.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,18 @@ jobs:
3131
steps:
3232
- name: Checkout code
3333
uses: actions/checkout@v3
34-
with: { ref: 4.4 }
3534

3635
- name: Installing dependencies
3736
run: |
3837
sudo apt-get update
3938
sudo apt-get install -y jq
39+
40+
- name: Checkout latest tag
41+
run: |
42+
latest=$(curl -s "https://api.github.com/repos/wazuh/wazuh-docker/releases/latest" | jq -r '.tag_name')
43+
git fetch origin
44+
git checkout $latest
45+
4046
- name: Build Wazuh images
4147
run: build-docker-images/build-images.sh
4248

.github/workflows/trivy-indexer-4-4.yml renamed to .github/workflows/trivy-indexer.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,18 @@ jobs:
3131
steps:
3232
- name: Checkout code
3333
uses: actions/checkout@v3
34-
with: { ref: 4.4 }
3534

3635
- name: Installing dependencies
3736
run: |
3837
sudo apt-get update
3938
sudo apt-get install -y jq
39+
40+
- name: Checkout latest tag
41+
run: |
42+
latest=$(curl -s "https://api.github.com/repos/wazuh/wazuh-docker/releases/latest" | jq -r '.tag_name')
43+
git fetch origin
44+
git checkout $latest
45+
4046
- name: Build Wazuh images
4147
run: build-docker-images/build-images.sh
4248

.github/workflows/trivy-manager-4-4.yml renamed to .github/workflows/trivy-manager.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,18 @@ jobs:
3131
steps:
3232
- name: Checkout code
3333
uses: actions/checkout@v3
34-
with: { ref: 4.4 }
3534

3635
- name: Installing dependencies
3736
run: |
3837
sudo apt-get update
3938
sudo apt-get install -y jq
39+
40+
- name: Checkout latest tag
41+
run: |
42+
latest=$(curl -s "https://api.github.com/repos/wazuh/wazuh-docker/releases/latest" | jq -r '.tag_name')
43+
git fetch origin
44+
git checkout $latest
45+
4046
- name: Build Wazuh images
4147
run: build-docker-images/build-images.sh
4248

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## Wazuh Docker v4.8.0
5+
### Added
6+
7+
- Update Wazuh to version [4.8.0](https://github.com/wazuh/wazuh/blob/v4.8.0/CHANGELOG.md#v480)
8+
49
## Wazuh Docker v4.7.5
510
### Added
611

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ WAZUH_MONITORING_REPLICAS=0 ##
101101
│   │   └── Dockerfile
102102
│   ├── wazuh-indexer
103103
│   │   ├── config
104+
│ │ │ ├── action_groups.yml
104105
│   │   │   ├── config.sh
105106
│   │   │   ├── config.yml
106107
│   │   │   ├── entrypoint.sh
@@ -195,6 +196,7 @@ WAZUH_MONITORING_REPLICAS=0 ##
195196

196197
| Wazuh version | ODFE | XPACK |
197198
|---------------|---------|--------|
199+
| v4.8.0 | | |
198200
| v4.7.5 | | |
199201
| v4.7.4 | | |
200202
| v4.7.3 | | |

SECURITY.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Wazuh Open Source Project Security Policy
2+
3+
Version: 2023-06-12
4+
5+
## Introduction
6+
This document outlines the Security Policy for Wazuh's open source projects. It emphasizes our commitment to maintain a secure environment for our users and contributors, and reflects our belief in the power of collaboration to identify and resolve security vulnerabilities.
7+
8+
## Scope
9+
This policy applies to all open source projects developed, maintained, or hosted by Wazuh.
10+
11+
## Reporting Security Vulnerabilities
12+
If you believe you've discovered a potential security vulnerability in one of our open source projects, we strongly encourage you to report it to us responsibly.
13+
14+
Please submit your findings as security advisories under the "Security" tab in the relevant GitHub repository. Alternatively, you may send the details of your findings to [[email protected]](mailto:[email protected]).
15+
16+
## Vulnerability Disclosure Policy
17+
Upon receiving a report of a potential vulnerability, our team will initiate an investigation. If the reported issue is confirmed as a vulnerability, we will take the following steps:
18+
19+
- Acknowledgment: We will acknowledge the receipt of your vulnerability report and begin our investigation.
20+
- Validation: We will validate the issue and work on reproducing it in our environment.
21+
- Remediation: We will work on a fix and thoroughly test it
22+
- Release & Disclosure: After 90 days from the discovery of the vulnerability, or as soon as a fix is ready and thoroughly tested (whichever comes first), we will release a security update for the affected project. We will also publicly disclose the vulnerability by publishing a CVE (Common Vulnerabilities and Exposures) and acknowledging the discovering party.
23+
- Exceptions: In order to preserve the security of the Wazuh community at large, we might extend the disclosure period to allow users to patch their deployments.
24+
25+
This 90-day period allows for end-users to update their systems and minimizes the risk of widespread exploitation of the vulnerability.
26+
27+
## Automatic Scanning
28+
We leverage GitHub Actions to perform automated scans of our supply chain. These scans assist us in identifying vulnerabilities and outdated dependencies in a proactive and timely manner.
29+
30+
## Credit
31+
We believe in giving credit where credit is due. If you report a security vulnerability to us, and we determine that it is a valid vulnerability, we will publicly credit you for the discovery when we disclose the vulnerability. If you wish to remain anonymous, please indicate so in your initial report.
32+
33+
We do appreciate and encourage feedback from our community, but currently we do not have a bounty program. We might start bounty programs in the future.
34+
35+
## Compliance with this Policy
36+
We consider the discovery and reporting of security vulnerabilities an important public service. We encourage responsible reporting of any vulnerabilities that may be found in our site or applications.
37+
38+
Furthermore, we will not take legal action against or suspend or terminate access to the site or services of those who discover and report security vulnerabilities in accordance with this policy because of the fact.
39+
40+
We ask that all users and contributors respect this policy and the security of our community's users by disclosing vulnerabilities to us in accordance with this policy.
41+
42+
## Changes to this Security Policy
43+
This policy may be revised from time to time. Each version of the policy will be identified at the top of the page by its effective date.
44+
45+
If you have any questions about this Security Policy, please contact us at [[email protected]](mailto:[email protected]).

VERSION

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
WAZUH-DOCKER_VERSION="4.7.5"
2-
REVISION="40720"
1+
WAZUH-DOCKER_VERSION="4.8.0"
2+
REVISION="40811"

build-docker-images/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This script initializes the environment variables needed to build each of the im
1313
The script allows you to build images from other versions of Wazuh, to do this you must use the -v or --version argument:
1414

1515
```
16-
$ build-docker-images/build-images.sh -v 4.5.2
16+
$ build-docker-images/build-images.sh -v 4.8.0
1717
```
1818

1919
To get all the available script options use the -h or --help option:
@@ -24,9 +24,9 @@ $ build-docker-images/build-images.sh -h
2424
Usage: build-docker-images/build-images.sh [OPTIONS]
2525
2626
-d, --dev <ref> [Optional] Set the development stage you want to build, example rc1 or beta1, not used by default.
27-
-f, --filebeat-module <ref> [Optional] Set Filebeat module version. By default 0.3.
27+
-f, --filebeat-module <ref> [Optional] Set Filebeat module version. By default 0.4.
2828
-r, --revision <rev> [Optional] Package revision. By default 1
29-
-v, --version <ver> [Optional] Set the Wazuh version should be builded. By default, 4.7.5.
29+
-v, --version <ver> [Optional] Set the Wazuh version should be builded. By default, 4.8.0.
3030
-h, --help Show this help.
3131
3232
```

build-docker-images/build-images.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
WAZUH_IMAGE_VERSION=4.7.5
1+
WAZUH_IMAGE_VERSION=4.8.0
22
WAZUH_VERSION=$(echo $WAZUH_IMAGE_VERSION | sed -e 's/\.//g')
33
WAZUH_TAG_REVISION=1
4-
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')
4+
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')
55
IMAGE_VERSION=${WAZUH_IMAGE_VERSION}
66

77
# Wazuh package generator
@@ -12,10 +12,10 @@ IMAGE_VERSION=${WAZUH_IMAGE_VERSION}
1212
# License (version 2) as published by the FSF - Free Software
1313
# Foundation.
1414

15-
WAZUH_IMAGE_VERSION="4.7.5"
15+
WAZUH_IMAGE_VERSION="4.8.0"
1616
WAZUH_TAG_REVISION="1"
1717
WAZUH_DEV_STAGE=""
18-
FILEBEAT_MODULE_VERSION="0.3"
18+
FILEBEAT_MODULE_VERSION="0.4"
1919

2020
# -----------------------------------------------------------------------------
2121

build-docker-images/wazuh-dashboard/Dockerfile

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Wazuh Docker Copyright (C) 2017, Wazuh Inc. (License GPLv2)
2-
FROM ubuntu:focal AS builder
2+
FROM amazonlinux:2023 AS builder
33

44
ARG WAZUH_VERSION
55
ARG WAZUH_TAG_REVISION
66
ARG INSTALL_DIR=/usr/share/wazuh-dashboard
77
ARG WAZUH_UI_REVISION
88

99
# Update and install dependencies
10-
RUN apt-get update && apt install curl libcap2-bin xz-utils -y
10+
RUN yum install curl-minimal libcap xz tar openssl -y
1111

1212
# Create Install dir
1313
RUN mkdir -p $INSTALL_DIR
@@ -28,12 +28,12 @@ RUN bash /install_wazuh_app.sh
2828
# Copy and set permissions to config files
2929
COPY config/opensearch_dashboards.yml $INSTALL_DIR/config/
3030
COPY config/wazuh.yml $INSTALL_DIR/data/wazuh/config/
31-
RUN chown 101:101 $INSTALL_DIR/config/opensearch_dashboards.yml && chmod 664 $INSTALL_DIR/config/opensearch_dashboards.yml
31+
RUN chmod 664 $INSTALL_DIR/config/opensearch_dashboards.yml
3232

3333
# Create and set permissions to data directories
34-
RUN mkdir -p $INSTALL_DIR/data/wazuh && chown -R 101:101 $INSTALL_DIR/data/wazuh && chmod -R 775 $INSTALL_DIR/data/wazuh
35-
RUN mkdir -p $INSTALL_DIR/data/wazuh/config && chown -R 101:101 $INSTALL_DIR/data/wazuh/config && chmod -R 775 $INSTALL_DIR/data/wazuh/config
36-
RUN mkdir -p $INSTALL_DIR/data/wazuh/logs && chown -R 101:101 $INSTALL_DIR/data/wazuh/logs && chmod -R 775 $INSTALL_DIR/data/wazuh/logs
34+
RUN mkdir -p $INSTALL_DIR/data/wazuh && chmod -R 775 $INSTALL_DIR/data/wazuh
35+
RUN mkdir -p $INSTALL_DIR/data/wazuh/config && chmod -R 775 $INSTALL_DIR/data/wazuh/config
36+
RUN mkdir -p $INSTALL_DIR/data/wazuh/logs && chmod -R 775 $INSTALL_DIR/data/wazuh/logs
3737

3838
################################################################################
3939
# Build stage 1 (the current Wazuh dashboard image):
@@ -42,7 +42,7 @@ RUN mkdir -p $INSTALL_DIR/data/wazuh/logs && chown -R 101:101 $INSTALL_DIR/data/
4242
# Add entrypoint
4343
# Add wazuh_app_config
4444
################################################################################
45-
FROM ubuntu:focal
45+
FROM amazonlinux:2023
4646

4747
# Set environment variables
4848
ENV USER="wazuh-dashboard" \
@@ -80,6 +80,9 @@ ENV PATTERN="" \
8080
WAZUH_MONITORING_SHARDS="" \
8181
WAZUH_MONITORING_REPLICAS=""
8282

83+
# Update and install dependencies
84+
RUN yum install shadow-utils -y
85+
8386
# Create wazuh-dashboard user and group
8487
RUN getent group $GROUP || groupadd -r -g 1000 $GROUP
8588
RUN useradd --system \

build-docker-images/wazuh-dashboard/config/config.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ export CONFIG_DIR=${INSTALLATION_DIR}/config
99

1010
## Variables
1111
CERT_TOOL=wazuh-certs-tool.sh
12-
PACKAGES_URL=https://packages.wazuh.com/4.7/
13-
PACKAGES_DEV_URL=https://packages-dev.wazuh.com/4.7/
12+
PACKAGES_URL=https://packages.wazuh.com/4.8/
13+
PACKAGES_DEV_URL=https://packages-dev.wazuh.com/4.8/
1414

1515
## Check if the cert tool exists in S3 buckets
1616
CERT_TOOL_PACKAGES=$(curl --silent -I $PACKAGES_URL$CERT_TOOL | grep -E "^HTTP" | awk '{print $2}')

build-docker-images/wazuh-dashboard/config/dl_base.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
REPOSITORY="packages.wazuh.com/4.x"
2-
WAZUH_CURRENT_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2-)
2+
WAZUH_CURRENT_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '["]tag_name["]:' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2-)
33
MAJOR_BUILD=$(echo $WAZUH_VERSION | cut -d. -f1)
44
MID_BUILD=$(echo $WAZUH_VERSION | cut -d. -f2)
55
MINOR_BUILD=$(echo $WAZUH_VERSION | cut -d. -f3)

0 commit comments

Comments
 (0)