diff --git a/SECURITY.md b/SECURITY.md index 54e59de1..4d35ef4f 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -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 [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) diff --git a/build-docker-images/wazuh-dashboard/config/check_repository.sh b/build-docker-images/wazuh-dashboard/config/check_repository.sh index 5323ec81..e49e69c2 100644 --- a/build-docker-images/wazuh-dashboard/config/check_repository.sh +++ b/build-docker-images/wazuh-dashboard/config/check_repository.sh @@ -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}" diff --git a/build-docker-images/wazuh-indexer/config/check_repository.sh b/build-docker-images/wazuh-indexer/config/check_repository.sh index 5323ec81..e49e69c2 100644 --- a/build-docker-images/wazuh-indexer/config/check_repository.sh +++ b/build-docker-images/wazuh-indexer/config/check_repository.sh @@ -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}" diff --git a/build-docker-images/wazuh-manager/Dockerfile b/build-docker-images/wazuh-manager/Dockerfile index ba4f27fa..7bbfdfc7 100644 --- a/build-docker-images/wazuh-manager/Dockerfile +++ b/build-docker-images/wazuh-manager/Dockerfile @@ -60,6 +60,8 @@ RUN mkdir -p /var/ossec/var/multigroups && \ sync && /permanent_data.sh && \ sync && rm /permanent_data.sh +RUN rm /etc/yum.repos.d/wazuh.repo + # Services ports EXPOSE 55000/tcp 1514/tcp 1515/tcp 514/udp 1516/tcp diff --git a/build-docker-images/wazuh-manager/config/check_repository.sh b/build-docker-images/wazuh-manager/config/check_repository.sh index 5323ec81..e49e69c2 100644 --- a/build-docker-images/wazuh-manager/config/check_repository.sh +++ b/build-docker-images/wazuh-manager/config/check_repository.sh @@ -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}" diff --git a/build-docker-images/wazuh-manager/config/filebeat_module.sh b/build-docker-images/wazuh-manager/config/filebeat_module.sh index 000a69ef..5357255d 100644 --- a/build-docker-images/wazuh-manager/config/filebeat_module.sh +++ b/build-docker-images/wazuh-manager/config/filebeat_module.sh @@ -1,23 +1,10 @@ -REPOSITORY="packages.wazuh.com/4.x" -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) +## variables +REPOSITORY="packages-dev.wazuh.com/pre-release" +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 - REPOSITORY="packages-dev.wazuh.com/pre-release" -elif [ "$MAJOR_BUILD" -eq "$MAJOR_CURRENT" ]; then - if [ "$MID_BUILD" -gt "$MID_CURRENT" ]; then - REPOSITORY="packages-dev.wazuh.com/pre-release" - elif [ "$MID_BUILD" -eq "$MID_CURRENT" ]; then - if [ "$MINOR_BUILD" -gt "$MINOR_CURRENT" ]; then - REPOSITORY="packages-dev.wazuh.com/pre-release" - fi - fi +## check tag to use the correct repository +if [[ -n "${WAZUH_TAG}" ]]; then + REPOSITORY="packages.wazuh.com/4.x" fi curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/${FILEBEAT_CHANNEL}-${FILEBEAT_VERSION}-x86_64.rpm &&\