-
Notifications
You must be signed in to change notification settings - Fork 416
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1584 from wazuh/merge-4.10.2-into-master
Merge 4.10.2 into master
- Loading branch information
Showing
12 changed files
with
273 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
||
|
@@ -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. | ||
|
||
|
@@ -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 [[email protected]](mailto:[email protected]). | ||
If you have any questions about this Security Policy, please contact us at [[email protected]](mailto:[email protected]) |
31 changes: 8 additions & 23 deletions
31
build-docker-images/wazuh-dashboard/config/check_repository.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.