Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 4.10.2 into master #1584

Merged
merged 67 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
73fffcf
Modify check repository for image builder
vcerenu Sep 5, 2024
8e7b2cd
Add delete of wazuh yum repo
vcerenu Sep 5, 2024
9c33d34
Merge pull request #1525 from wazuh/enhancement/1509-modify-check-rep…
teddytpc1 Sep 12, 2024
b38b3c7
* Update the Procedure push docker images workflow file
YisDav Sep 11, 2024
84280fa
Updated SECURITY.md file
davidcr01 Sep 13, 2024
82955c0
Merge pull request #1523 from wazuh/change/1522-update-security-policy
c-bordon Sep 13, 2024
471aeda
Update changelog
YisDav Sep 13, 2024
5771c49
Merge pull request #1524 from wazuh/enhancement/5651-new-workflow-pus…
YisDav Sep 13, 2024
4ea8fc2
Changed SECURITY.md file
c-bordon Sep 16, 2024
e06d5ae
Merge pull request #1530 from wazuh/change/1529-update-security-polic…
c-bordon Sep 16, 2024
3859ca3
Bump revision to 40911
Enaraque Sep 20, 2024
c28d104
Merge pull request #1532 from wazuh/enhancement/1531-bump-revision-to…
davidcr01 Sep 20, 2024
9d851e6
Add rc1 tag to docker-compose files
Enaraque Sep 20, 2024
a335684
Merge pull request #1533 from wazuh/enhancement/1531-change-image-tag
teddytpc1 Sep 20, 2024
189e875
Revert rc1 tag from docker compose files
Enaraque Sep 20, 2024
0b3e9ba
Merge pull request #1534 from wazuh/enhancement/1531-revert-image-tag
davidcr01 Sep 20, 2024
301ea9e
Merge branch '4.8.2' into merge-4.8.2-into-4.9.0
davidcr01 Sep 23, 2024
7b1d283
Merge pull request #1537 from wazuh/merge-4.9.1-into-4.10.0
davidcr01 Sep 23, 2024
42db717
Bumped revision for 4.10.0-alpha1
davidcr01 Sep 24, 2024
e08a3d8
Merge pull request #1539 from wazuh/enhancement/1535-bump-revision
davidcr01 Sep 24, 2024
8ab3018
Changed image tag for 4.10.0-alpha1
davidcr01 Sep 24, 2024
6dfa4a2
Merge pull request #1540 from wazuh/enhancement/1535-change-tag
davidcr01 Sep 24, 2024
9e1c332
Reverted image tag for 4.10.0-alpha1
davidcr01 Sep 24, 2024
9d882fc
Merge pull request #1541 from wazuh/enhancement/1535-revert-tag
davidcr01 Sep 24, 2024
08ba82d
Bump new Wazuh 4.10.1 version
vcerenu Sep 24, 2024
46d6dc8
Merge pull request #1544 from wazuh/enhancement/1543-bump-4.10.1-version
c-bordon Sep 24, 2024
eb4efb3
Bump 4.9.1 revision
c-bordon Sep 27, 2024
e292957
Merge pull request #1548 from wazuh/enhancement/1418-support-new-stag…
davidcr01 Sep 27, 2024
62ae93e
Updated Wazuh images to -rc2 version
c-bordon Sep 27, 2024
be0ac01
Merge pull request #1549 from wazuh/enhancement/1547-update-docker-im…
davidcr01 Sep 27, 2024
0ec38df
Revert Wazuh images to -rc2 version
c-bordon Sep 27, 2024
af023a9
Merge pull request #1550 from wazuh/enhancement/1547-revert-docker-im…
teddytpc1 Sep 27, 2024
027b260
Update Procedure_push_docker_images.yml
YisDav Sep 30, 2024
8bafe12
Change the dev default value to true for the workflow_dispatch
YisDav Oct 1, 2024
cc20665
Merge pull request #1551 from wazuh/enhancement/1864-improve-push-doc…
teddytpc1 Oct 1, 2024
92d0582
Revert create_user.py script deletion
Enaraque Oct 3, 2024
d237faa
Merge pull request #1555 from wazuh/bug/1554-wazuh-server-container-r…
c-bordon Oct 3, 2024
e6c5e82
Bumped branch 4.10.2 to 4.10.2 version
c-bordon Oct 3, 2024
447c0bd
Merge pull request #1557 from wazuh/Bump-4.10.2-branch
c-bordon Oct 3, 2024
884151b
Bumped revision for 4.9.1-RC3
davidcr01 Oct 4, 2024
97e4dde
Merge pull request #1559 from wazuh/enhancement/1558-bump-revision
davidcr01 Oct 4, 2024
4177d10
Changed image tag for 4.9.1-rc3
davidcr01 Oct 4, 2024
bd7aedc
Merge pull request #1560 from wazuh/enhancement/1558-change-image-tag
davidcr01 Oct 4, 2024
868c371
Reverted image tag for 4.9.1-rc3
davidcr01 Oct 4, 2024
61b3f5f
Merge pull request #1561 from wazuh/enhancement/1558-revert-image-tag
davidcr01 Oct 4, 2024
8695a08
Resolving merge conflicts
vcerenu Oct 10, 2024
06a797d
Merge pull request #1568 from wazuh/merge-4.9.1-into-4.10.0
teddytpc1 Oct 10, 2024
1aa1499
Fix typos
vcerenu Oct 10, 2024
f61af29
Add changelog
vcerenu Oct 10, 2024
6074636
Merge pull request #1569 from wazuh/bug/1564-fix-typos-entrypoint
teddytpc1 Oct 10, 2024
dbb7766
Bump revision
YisDav Oct 10, 2024
50769ef
Merge pull request #1571 from wazuh/enhancement/1570-add-support-for-…
c-bordon Oct 10, 2024
db4133d
Update docker-compose versions
YisDav Oct 10, 2024
424846a
Merge pull request #1572 from wazuh/enhancement/1570-docker-compose-v…
teddytpc1 Oct 10, 2024
5795fa1
Revert image tag to 4.10.0
YisDav Oct 10, 2024
b1f0a1f
Merge pull request #1573 from wazuh/enhancement/1570-revert-image-tag
teddytpc1 Oct 10, 2024
276c8a2
Bump revision
vcerenu Oct 15, 2024
564e2b3
change image taf for rc4
vcerenu Oct 15, 2024
5bbaceb
Revert image tag for rc4
vcerenu Oct 15, 2024
691694a
Resolve conflicts
vcerenu Oct 17, 2024
f4e7d19
Merge pull request #1581 from wazuh/merge-4.9.1-into-4-10-0
teddytpc1 Oct 17, 2024
42977e3
Resolve conflicts
vcerenu Oct 17, 2024
7ca14b9
Resolve conflicts
vcerenu Oct 17, 2024
ea0e679
Merge pull request #1582 from wazuh/merge-4.10.0-into-4.10.1
teddytpc1 Oct 17, 2024
a5c3138
Resolve conflicts
vcerenu Oct 17, 2024
f809a1e
Merge pull request #1583 from wazuh/merge-4.10.1-into-4.10.2
teddytpc1 Oct 17, 2024
69df531
Resolve conflicts
vcerenu Oct 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
161 changes: 147 additions & 14 deletions .github/workflows/Procedure_push_docker_images.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,167 @@

run-name: Launch Push Docker Images - Executed by @${{ github.actor }}
run-name: Launch Push Docker Images - ${{ inputs.id }}
name: Push Docker Images

on:
workflow_dispatch:
inputs:
JENKINS_REFERENCE:
description: 'wazuh-jenkins reference'
required: true
default: 'master'
IMAGE_TAG:
image_tag:
description: 'Docker image tag'
required: true
default: '5.0.0'
DOCKER_REFERENCE:
required: true
docker_reference:
description: 'wazuh-docker reference'
default: 'v5.0.0'
required: true
default: 'master'
PRODUCTS:
description: 'Comma-separated list of the image names to build and push'
default: 'wazuh-manager,wazuh-dashboard,wazuh-indexer'
required: true
FILEBEAT_MODULE_VERSION:
filebeat_module_version:
description: 'Filebeat module version'
default: '0.4'
required: true
REVISION:
revision:
description: 'Package revision'
default: '1'
required: true
PUSH_IMAGES:
push_images:
description: 'Push images'
type: boolean
default: true
required: true
id:
description: "ID used to identify the workflow uniquely."
type: string
required: false
dev:
description: "Add tag suffix '-dev' to the image tag ?"
type: boolean
default: true
default: true
required: false
workflow_call:
inputs:
image_tag:
description: 'Docker image tag'
default: '5.0.0'
required: true
type: string
docker_reference:
description: 'wazuh-docker reference'
default: 'v5.0.0'
required: false
type: string
products:
description: 'Comma-separated list of the image names to build and push'
default: 'wazuh-manager,wazuh-dashboard,wazuh-indexer'
required: true
type: string
filebeat_module_version:
description: 'Filebeat module version'
default: '0.4'
required: true
type: string
revision:
description: 'Package revision'
default: '1'
required: true
type: string
push_images:
description: 'Push images'
type: boolean
default: true
required: true
id:
description: "ID used to identify the workflow uniquely."
type: string
required: false
dev:
description: "Add tag suffix '-dev' to the image tag ?"
type: boolean
default: false
required: false

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Print inputs
run: |
echo "---------------------------------------------"
echo "Running Procedure_push_docker_images workflow"
echo "---------------------------------------------"
echo "* BRANCH: ${{ github.ref }}"
echo "* COMMIT: ${{ github.sha }}"
echo "---------------------------------------------"
echo "Inputs provided:"
echo "---------------------------------------------"
echo "* id: ${{ inputs.id }}"
echo "* image_tag: ${{ inputs.image_tag }}"
echo "* docker_reference: ${{ inputs.docker_reference }}"
echo "* products: ${{ inputs.products }}"
echo "* filebeat_module_version: ${{ inputs.filebeat_module_version }}"
echo "* revision: ${{ inputs.revision }}"
echo "* push_images: ${{ inputs.push_images }}"
echo "* dev: ${{ inputs.dev }}"
echo "---------------------------------------------"
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.docker_reference }}

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
echo "Installed Docker Compose version: $(docker-compose --version)"
- name: Build Wazuh images
run: |
IMAGE_TAG=${{ inputs.image_tag }}
FILEBEAT_MODULE_VERSION=${{ inputs.filebeat_module_version }}
REVISION=${{ inputs.revision }}
if [[ "$IMAGE_TAG" == *"-"* ]]; then
IFS='-' read -r -a tokens <<< "$IMAGE_TAG"
if [ -z "${tokens[1]}" ]; then
echo "Invalid image tag: $IMAGE_TAG"
exit 1
fi
DEV_STAGE=${tokens[1]}
WAZUH_VER=${tokens[0]}
./build-docker-images/build-images.sh -v $WAZUH_VER -r $REVISION -d $DEV_STAGE -f $FILEBEAT_MODULE_VERSION
else
./build-docker-images/build-images.sh -v $IMAGE_TAG -r $REVISION -f $FILEBEAT_MODULE_VERSION
fi
# Save .env file (generated by build-images.sh) contents to $GITHUB_ENV
ENV_FILE_PATH=".env"
if [ -f $ENV_FILE_PATH ]; then
while IFS= read -r line || [ -n "$line" ]; do
echo "$line" >> $GITHUB_ENV
done < $ENV_FILE_PATH
else
echo "The environment file $ENV_FILE_PATH does not exist!"
exit 1
fi
- name: Tag and Push Wazuh images
if: ${{ inputs.push_images }}
run: |
IMAGE_TAG="${{ inputs.image_tag }}$( [ "${{ inputs.dev }}" == "true" ] && echo '-dev' || true )"
IMAGE_NAMES=${{ inputs.products }}
IFS=',' read -r -a images <<< "$IMAGE_NAMES"
for image in "${images[@]}"; do
echo "Tagging and pushing wazuh/$image:${WAZUH_VERSION} to wazuh/$image:$IMAGE_TAG"
docker tag wazuh/$image:${WAZUH_VERSION} wazuh/$image:$IMAGE_TAG
echo "Pushing wazuh/$image:$IMAGE_TAG ..."
docker push wazuh/$image:$IMAGE_TAG
done
89 changes: 83 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,97 @@
# Change Log
All notable changes to this project will be documented in this file.

## Wazuh Docker v5.0.0
## [5.0.0]

### Added

- Update Wazuh to version [5.0.0](https://github.com/wazuh/wazuh/blob/v5.0.0/CHANGELOG.md#v500)
- none

### Changed

- None

### Fixed

- None

### Deleted

- None

## [4.10.2]

## Wazuh Docker v4.10.0
### Added

- Update Wazuh to version [4.10.0](https://github.com/wazuh/wazuh/blob/v4.10.0/CHANGELOG.md#v4100)
- none

### Changed

- None

### Fixed

- None

### Deleted

- None

## [4.10.1]

## Wazuh Docker v4.9.1
### Added

- Update Wazuh to version [4.9.1](https://github.com/wazuh/wazuh/blob/v4.9.1/CHANGELOG.md#v491)
- none

### Changed

- None

### Fixed

- None

### Deleted

- None

## [4.10.0]

### Added

- Migrate the push docker images procedure to GitHub Actions ([#5651](https://github.com/wazuh/wazuh-qa/issues/5651))

### Changed

- None

### Fixed

- None

### Deleted

- None

## [4.9.1]

### Added

- None

### Changed

- None


### Fixed

- Fix typos into Wazuh manager entrypoint ([#1569](https://github.com/wazuh/wazuh-docker/pull/1569))

### Deleted

- None


## Wazuh Docker v4.9.0
### Added
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ WAZUH_MONITORING_REPLICAS=0 ##
| Wazuh version | ODFE | XPACK |
|---------------|---------|--------|
| v5.0.0 | | |
| v4.10.2 | | |
| v4.10.1 | | |
| v4.10.0 | | |
| v4.9.1 | | |
| v4.9.0 | | |
Expand Down
14 changes: 7 additions & 7 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Please submit your findings as security advisories under the "Security" tab in t
## Vulnerability Disclosure Policy
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:

- Acknowledgment: We will acknowledge the receipt of your vulnerability report and begin our investigation.
- Validation: We will validate the issue and work on reproducing it in our environment.
- Remediation: We will work on a fix and thoroughly test it
- 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.
- 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.
1. Acknowledgment: We will acknowledge the receipt of your vulnerability report and begin our investigation.
2. Validation: We will validate the issue and work on reproducing it in our environment.
3. Remediation: We will work on a fix and thoroughly test it
4. 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.
5. 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.

This 90-day period allows for end-users to update their systems and minimizes the risk of widespread exploitation of the vulnerability.

Expand All @@ -33,7 +33,7 @@ We believe in giving credit where credit is due. If you report a security vulner
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.

## Compliance with this Policy
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.
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.

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.

Expand All @@ -42,4 +42,4 @@ We ask that all users and contributors respect this policy and the security of o
## Changes to this Security Policy
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.

If you have any questions about this Security Policy, please contact us at [security@wazuh.com](mailto:security@wazuh.com).
If you have any questions about this Security Policy, please contact us at [security@wazuh.com](mailto:security@wazuh.com)
31 changes: 8 additions & 23 deletions build-docker-images/wazuh-dashboard/config/check_repository.sh
Original file line number Diff line number Diff line change
@@ -1,29 +1,14 @@
## variables
APT_KEY=https://packages.wazuh.com/key/GPG-KEY-WAZUH
APT_KEY=https://packages-dev.wazuh.com/key/GPG-KEY-WAZUH
GPG_SIGN="gpgcheck=1\ngpgkey=${APT_KEY}]"
REPOSITORY="[wazuh]\n${GPG_SIGN}\nenabled=1\nname=EL-\$releasever - Wazuh\nbaseurl=https://packages.wazuh.com/4.x/yum/\nprotect=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-)
MAJOR_BUILD=$(echo $WAZUH_VERSION | cut -d. -f1)
MID_BUILD=$(echo $WAZUH_VERSION | cut -d. -f2)
MINOR_BUILD=$(echo $WAZUH_VERSION | cut -d. -f3)
MAJOR_CURRENT=$(echo $WAZUH_CURRENT_VERSION | cut -d. -f1)
MID_CURRENT=$(echo $WAZUH_CURRENT_VERSION | cut -d. -f2)
MINOR_CURRENT=$(echo $WAZUH_CURRENT_VERSION | cut -d. -f3)
REPOSITORY="[wazuh]\n${GPG_SIGN}\nenabled=1\nname=EL-\$releasever - Wazuh\nbaseurl=https://packages-dev.wazuh.com/pre-release/yum/\nprotect=1"
WAZUH_TAG=$(curl --silent https://api.github.com/repos/wazuh/wazuh/git/refs/tags | grep '["]ref["]:' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 11- | grep ^v${WAZUH_VERSION}$)

## check version to use the correct repository
if [ "$MAJOR_BUILD" -gt "$MAJOR_CURRENT" ]; then
APT_KEY=https://packages-dev.wazuh.com/key/GPG-KEY-WAZUH
REPOSITORY="[wazuh]\n${GPG_SIGN}\nenabled=1\nname=EL-\$releasever - Wazuh\nbaseurl=https://packages-dev.wazuh.com/pre-release/yum/\nprotect=1"
elif [ "$MAJOR_BUILD" -eq "$MAJOR_CURRENT" ]; then
if [ "$MID_BUILD" -gt "$MID_CURRENT" ]; then
APT_KEY=https://packages-dev.wazuh.com/key/GPG-KEY-WAZUH
REPOSITORY="[wazuh]\n${GPG_SIGN}\nenabled=1\nname=EL-\$releasever - Wazuh\nbaseurl=https://packages-dev.wazuh.com/pre-release/yum/\nprotect=1"
elif [ "$MID_BUILD" -eq "$MID_CURRENT" ]; then
if [ "$MINOR_BUILD" -gt "$MINOR_CURRENT" ]; then
APT_KEY=https://packages-dev.wazuh.com/key/GPG-KEY-WAZUH
REPOSITORY="[wazuh]\n${GPG_SIGN}\nenabled=1\nname=EL-\$releasever - Wazuh\nbaseurl=https://packages-dev.wazuh.com/pre-release/yum/\nprotect=1"
fi
fi
## check tag to use the correct repository
if [[ -n "${WAZUH_TAG}" ]]; then
APT_KEY=https://packages.wazuh.com/key/GPG-KEY-WAZUH
GPG_SIGN="gpgcheck=1\ngpgkey=${APT_KEY}]"
REPOSITORY="[wazuh]\n${GPG_SIGN}\nenabled=1\nname=EL-\$releasever - Wazuh\nbaseurl=https://packages.wazuh.com/4.x/yum/\nprotect=1"
fi

rpm --import "${APT_KEY}"
Expand Down
Loading
Loading