Skip to content

Commit 889b296

Browse files
committed
Merge branch '5.0.0' into merge-5.0.0-into-5.0.1
2 parents c0943ac + 74eaf9a commit 889b296

11 files changed

Lines changed: 113 additions & 20 deletions

File tree

.github/workflows/4_builderpackage_dashboard.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ jobs:
252252
build-base:
253253
needs: [validate-job]
254254
name: Build dashboard
255-
uses: wazuh/wazuh-dashboard/.github/workflows/4_builderpackage_dashboard_core.yml@4.14.8
255+
uses: wazuh/wazuh-dashboard/.github/workflows/4_builderpackage_dashboard_core.yml@4.14.9
256256
with:
257257
CHECKOUT_TO: ${{ github.head_ref || github.ref_name }}
258258
ARCHITECTURE: ${{ inputs.architecture }}
@@ -265,7 +265,7 @@ jobs:
265265
permissions:
266266
pull-requests: write
267267
id-token: write
268-
uses: wazuh/wazuh-dashboard-plugins/.github/workflows/4_builderpackage_plugins.yml@4.14.8
268+
uses: wazuh/wazuh-dashboard-plugins/.github/workflows/4_builderpackage_plugins.yml@4.14.9
269269
with:
270270
reference: ${{ inputs.reference_wazuh_plugins }}
271271
execution_repository: 'wazuh-dashboard/4_builderpackage_dashboard'
@@ -277,7 +277,7 @@ jobs:
277277
permissions:
278278
pull-requests: write
279279
id-token: write
280-
uses: wazuh/wazuh-security-dashboards-plugin/.github/workflows/4_builderpackage_security_plugin.yml@4.14.8
280+
uses: wazuh/wazuh-security-dashboards-plugin/.github/workflows/4_builderpackage_security_plugin.yml@4.14.9
281281
with:
282282
reference: ${{ inputs.reference_security_plugins }}
283283
execution_repository: 'wazuh-dashboard/4_builderpackage_dashboard'

.github/workflows/5_builderpackage_dashboard.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,14 @@ jobs:
644644
echo 'Service not running' ;\
645645
exit 1 ;\
646646
fi; \
647+
if sudo runuser wazuh-dashboard --shell='/bin/bash' \
648+
--command='/usr/share/wazuh-dashboard/bin/opensearch-dashboards-keystore list' \
649+
| grep -q '^wazuh_ai_assistant.encryptionKey$'; then \
650+
echo 'AI assistant encryption key present in keystore'; \
651+
else \
652+
echo 'AI assistant encryption key missing from keystore'; \
653+
exit 1; \
654+
fi; \
647655
sudo yum remove wazuh-dashboard -y ;\
648656
sudo rm -rf /var/lib/wazuh-dashboard/ ; \
649657
sudo rm -rf /usr/share/wazuh-dashboard/ ; \

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
### Added
44

5-
- Support for Wazuh 5.0.1
5+
| Issue | Comment |
6+
| ----- | ----------------------- |
7+
| | Support for Wazuh 5.0.1 |
68

79
## Prior versions
810

dev-tools/build-packages/deb/debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ wazuh-dashboard (5.0.0-RELEASE) stable; urgency=low
1010

1111
-- Wazuh, Inc <info@wazuh.com> Tue, 04 Aug 2026 12:00:00 +0000
1212

13+
wazuh-dashboard (4.14.9-RELEASE) stable; urgency=low
14+
15+
* More info: https://documentation.wazuh.com/current/release-notes/release-4-14-9.html
16+
17+
-- Wazuh, Inc <info@wazuh.com> Wed, 16 Sep 2026 12:00:00 +0000
18+
1319
wazuh-dashboard (4.14.8-RELEASE) stable; urgency=low
1420

1521
* More info: https://documentation.wazuh.com/current/release-notes/release-4-14-8.html

dev-tools/build-packages/deb/debian/postinst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,27 @@ configure)
4242
runuser "${NAME}" --shell="/bin/bash" --command="${INSTALLATION_DIR}/bin/opensearch-dashboards-keystore create" >/dev/null 2>&1
4343
runuser "${NAME}" --shell="/bin/bash" --command="echo kibanaserver | ${INSTALLATION_DIR}/bin/opensearch-dashboards-keystore add opensearch.username --stdin" >/dev/null 2>&1
4444
runuser "${NAME}" --shell="/bin/bash" --command="echo kibanaserver | ${INSTALLATION_DIR}/bin/opensearch-dashboards-keystore add opensearch.password --stdin" >/dev/null 2>&1
45+
WD_ENC_KEY=""
46+
if command -v openssl >/dev/null 2>&1; then
47+
WD_ENC_KEY=$(openssl rand -base64 32 2>/dev/null | tr -d '\n') || WD_ENC_KEY=""
48+
fi
49+
if [ -z "${WD_ENC_KEY}" ] && [ -r /dev/urandom ] && command -v base64 >/dev/null 2>&1; then
50+
WD_ENC_KEY=$(head -c 32 /dev/urandom | base64 | tr -d '\n') || WD_ENC_KEY=""
51+
fi
52+
if [ -z "${WD_ENC_KEY}" ] && [ -x "${INSTALLATION_DIR}"/node/bin/node ]; then
53+
WD_ENC_KEY=$("${INSTALLATION_DIR}"/node/bin/node -e \
54+
"process.stdout.write(require('crypto').randomBytes(32).toString('base64'))" 2>/dev/null) || WD_ENC_KEY=""
55+
fi
56+
# base64 of exactly 32 raw bytes is always 44 characters (with one '=' pad)
57+
if [ ${#WD_ENC_KEY} -eq 44 ]; then
58+
echo "${WD_ENC_KEY}" | runuser "${NAME}" --shell="/bin/bash" \
59+
--command="${INSTALLATION_DIR}/bin/opensearch-dashboards-keystore add wazuh_ai_assistant.encryptionKey --stdin" \
60+
>/dev/null 2>&1 \
61+
|| echo "wazuh-dashboard: warning: failed to store wazuh_ai_assistant.encryptionKey; configure it manually to enable the AI assistant." >&2
62+
else
63+
echo "wazuh-dashboard: warning: unable to generate wazuh_ai_assistant.encryptionKey; configure it manually to enable the AI assistant." >&2
64+
fi
65+
unset WD_ENC_KEY
4566
fi
4667
;;
4768

dev-tools/build-packages/rpm/wazuh-dashboard.spec

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,28 @@ if [ ! -f %{CONFIG_DIR}/opensearch_dashboards.keystore ]; then
178178
runuser %{USER} --shell="/bin/bash" --command="%{INSTALL_DIR}/bin/opensearch-dashboards-keystore create" > /dev/null 2>&1
179179
runuser %{USER} --shell="/bin/bash" --command="echo kibanaserver | %{INSTALL_DIR}/bin/opensearch-dashboards-keystore add opensearch.username --stdin" > /dev/null 2>&1
180180
runuser %{USER} --shell="/bin/bash" --command="echo kibanaserver | %{INSTALL_DIR}/bin/opensearch-dashboards-keystore add opensearch.password --stdin" > /dev/null 2>&1
181+
WD_ENC_KEY=""
182+
if command -v openssl > /dev/null 2>&1; then
183+
WD_ENC_KEY=$(openssl rand -base64 32 2>/dev/null | tr -d '\n') || WD_ENC_KEY=""
184+
fi
185+
if [ -z "${WD_ENC_KEY}" ] && [ -r /dev/urandom ] && command -v base64 > /dev/null 2>&1; then
186+
WD_ENC_KEY=$(head -c 32 /dev/urandom | base64 | tr -d '\n') || WD_ENC_KEY=""
187+
fi
188+
if [ -z "${WD_ENC_KEY}" ] && [ -x %{INSTALL_DIR}/node/bin/node ]; then
189+
WD_ENC_KEY=$(%{INSTALL_DIR}/node/bin/node -e \
190+
"process.stdout.write(require('crypto').randomBytes(32).toString('base64'))" 2>/dev/null) || WD_ENC_KEY=""
191+
fi
192+
# base64 of exactly 32 raw bytes is always 44 characters (with one '=' pad)
193+
if [ ${#WD_ENC_KEY} -eq 44 ]; then
194+
echo "${WD_ENC_KEY}" | runuser %{USER} --shell="/bin/bash" \
195+
--command="%{INSTALL_DIR}/bin/opensearch-dashboards-keystore add wazuh_ai_assistant.encryptionKey --stdin" \
196+
> /dev/null 2>&1 \
197+
|| echo "wazuh-dashboard: warning: failed to store wazuh_ai_assistant.encryptionKey; configure it manually to enable the AI assistant." >&2
198+
else
199+
echo "wazuh-dashboard: warning: unable to generate wazuh_ai_assistant.encryptionKey; configure it manually to enable the AI assistant." >&2
200+
fi
201+
unset WD_ENC_KEY
202+
true
181203
fi
182204

183205
# -----------------------------------------------------------------------------
@@ -457,6 +479,8 @@ rm -fr %{buildroot}
457479
%attr(644, root, root) "/usr/lib/systemd/system/wazuh-dashboard.service"
458480

459481
%changelog
482+
* Wed Sep 16 2026 support <info@wazuh.com> - 4.14.9
483+
- More info: https://documentation.wazuh.com/current/release-notes/release-4-14-9.html
460484
* Wed Sep 09 2026 support <info@wazuh.com> - 5.0.1
461485
- More info: https://documentation.wazuh.com/current/release-notes/release-5-0-1.html
462486
* Thu Sep 03 2026 support <info@wazuh.com> - 4.10.5

dev-tools/test-packages/deb-test-install-uninstall.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ else
2626
exit 1
2727
fi
2828

29+
if runuser wazuh-dashboard --shell="/bin/bash" \
30+
--command="/usr/share/wazuh-dashboard/bin/opensearch-dashboards-keystore list" \
31+
| grep -q "^wazuh_ai_assistant.encryptionKey$"; then
32+
echo "AI assistant encryption key present in keystore"
33+
else
34+
echo "AI assistant encryption key missing from keystore"
35+
exit 1
36+
fi
37+
2938
apt-get remove --purge wazuh-dashboard -y
3039
if dpkg-query -W -f='${Status}' wazuh-dashboard 2>/dev/null | grep -q "install ok installed"; then
3140
echo "Package not uninstalled"

tools/changelog_bump.sh

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
# From 5.x, each changelog only contains its own version changes and
99
# references the prior changelogs with links, so on a version bump this
1010
# script:
11-
# - Resets the changelog to a single "## [vX.Y.Z]" entry with empty
12-
# Added/Changed/Removed/Fixed sections, where Added starts with the
13-
# "- Support for Wazuh X.Y.Z" entry.
11+
# - Resets the changelog to a single "## [vX.Y.Z]" entry with an empty
12+
# "| Issue | Comment |" table under each of the Added/Changed/
13+
# Removed/Fixed sections.
1414
# - Rebuilds the "## Prior versions" section with the two most recent
1515
# minors below the new version, including every patch of each,
1616
# newest first.
@@ -112,7 +112,18 @@ function print_prior_versions_section() {
112112
}
113113

114114
# ====
115-
# Rewrite CHANGELOG.md with the new version entry (empty sections) and the
115+
# Print a changelog section heading followed by an empty entries table.
116+
# Arguments:
117+
# $1 - section name (Added, Changed, Removed, Fixed)
118+
# ====
119+
function print_section() {
120+
printf '### %s\n\n' "$1"
121+
printf '| Issue | Comment |\n'
122+
printf '| ----- | ------- |\n\n'
123+
}
124+
125+
# ====
126+
# Rewrite CHANGELOG.md with the new version entry (empty tables) and the
116127
# rebuilt "## Prior versions" section.
117128
# Arguments:
118129
# $1 - new version
@@ -124,11 +135,10 @@ function write_changelog() {
124135

125136
{
126137
printf '## [v%s]\n\n' "$new_version"
127-
printf '### Added\n\n'
128-
printf -- '- Support for Wazuh %s\n\n' "$new_version"
129-
printf '### Changed\n\n'
130-
printf '### Removed\n\n'
131-
printf '### Fixed\n\n'
138+
print_section 'Added'
139+
print_section 'Changed'
140+
print_section 'Removed'
141+
print_section 'Fixed'
132142
print_prior_versions_section "$new_version"
133143
} > "$temp_file"
134144

tools/tests/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ there for debugging (the directory is git-ignored).
5555

5656
- Argument validation (`--help`, missing/extra args, malformed `x.y.z`
5757
versions) and that failures leave `CHANGELOG.md` untouched.
58-
- Version bump: changelog reset to the new `## [vX.Y.Z]` entry with empty
59-
sections and the `- Support for Wazuh X.Y.Z` line; "Prior versions" rebuilt
58+
- Version bump: changelog reset to the new `## [vX.Y.Z]` entry with an empty
59+
`| Issue | Comment |` table per section; "Prior versions" rebuilt
6060
with the two most recent minors below the new version, every patch of each,
6161
newest first; non-version tags filtered out; `v`-prefixed tags normalized.
6262
- Stage-only bump (same version) and `--tag`: entries preserved, only the

tools/tests/test_changelog_bump.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,12 @@ run_tool changelog_bump.sh 5.1.0 5.0.0
3737
assert_eq 0 "$STATUS" "exits 0"
3838
CONTENT=$(cat "$WORK/CHANGELOG.md")
3939
assert_contains "$CONTENT" "## [v5.1.0]" "new version heading"
40-
assert_contains "$CONTENT" "- Support for Wazuh 5.1.0" "Support for Wazuh entry"
4140
assert_contains "$CONTENT" "### Added" "Added section"
4241
assert_contains "$CONTENT" "### Changed" "Changed section"
4342
assert_contains "$CONTENT" "### Removed" "Removed section"
4443
assert_contains "$CONTENT" "### Fixed" "Fixed section"
44+
assert_eq 4 "$(grep -c '^| Issue | Comment |$' "$WORK/CHANGELOG.md")" \
45+
"one empty entries table per section"
4546
assert_not_contains "$CONTENT" "Some existing feature entry" "old entries removed"
4647
assert_eq "$(expected_priors 5.0.0 4.10.2 4.10.1 4.10.0)" "$(prior_versions_block)" \
4748
"Prior versions = last 2 minors (every patch, newest first)"
@@ -78,12 +79,14 @@ cat >"$WORK/CHANGELOG.md" <<'EOF'
7879
7980
### Added
8081
81-
- Support for Wazuh 5.0.0
82+
| Issue | Comment |
83+
| ----- | ------- |
84+
| [#1](https://github.com/wazuh/test-repo/issues/1) | Some existing feature entry |
8285
EOF
8386
run_tool changelog_bump.sh 5.0.0 5.0.0
8487
assert_eq 0 "$STATUS" "exits 0"
8588
CONTENT=$(cat "$WORK/CHANGELOG.md")
86-
assert_contains "$CONTENT" "- Support for Wazuh 5.0.0" "entries preserved"
89+
assert_contains "$CONTENT" "| Some existing feature entry |" "entries preserved"
8790
assert_contains "$CONTENT" "## Prior versions" "section appended"
8891
assert_eq "$(expected_priors 4.10.2 4.10.1 4.10.0 4.9.1 4.9.0)" "$(prior_versions_block)" \
8992
"list built correctly"

0 commit comments

Comments
 (0)