Skip to content

Commit

Permalink
Merge branch '4.8.0' into merge-4.7.5-into-4.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
teddytpc1 authored May 22, 2024
2 parents 1c8524a + 5dce748 commit 84fba33
Show file tree
Hide file tree
Showing 37 changed files with 467 additions and 466 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Change Log
All notable changes to this project will be documented in this file.

## [v4.8.0]

### Added

- Update to [Wazuh v4.8.0](https://github.com/wazuh/wazuh/blob/v4.8.0/CHANGELOG.md#v480)

## [v4.7.5]

### Added
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ These playbooks install and configure Wazuh agent, manager and indexer and dashb

| Wazuh version | Elastic | ODFE |
|---------------|---------|--------|
| v4.8.0 | | |
| v4.7.5 | | |
| v4.7.4 | | |
| v4.7.3 | | |
Expand Down
45 changes: 45 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Wazuh Open Source Project Security Policy

Version: 2023-06-12

## Introduction
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.

## Scope
This policy applies to all open source projects developed, maintained, or hosted by Wazuh.

## Reporting Security Vulnerabilities
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.

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]).

## 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.

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

## Automatic Scanning
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.

## Credit
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.

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.

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.

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.

## 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]).
4 changes: 2 additions & 2 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
WAZUH-ANSIBLE_VERSION="v4.7.5"
REVISION="40719"
WAZUH-ANSIBLE_VERSION="v4.8.0"
REVISION="40810"
4 changes: 2 additions & 2 deletions playbooks/wazuh-agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
port: 1514
protocol: tcp
api_port: 55000
api_proto: 'http'
api_user: ansible
api_proto: 'https'
api_user: wazuh
max_retries: 5
retry_interval: 5
4 changes: 0 additions & 4 deletions roles/elastic-stack/ansible-kibana/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,5 @@ nodejs:
redhat: "rpm"
repo_url_ext: "nodesource.com/setup_10.x"

# Build from sources
build_from_sources: false
wazuh_plugin_branch: 4.1-7.10

#Nodejs NODE_OPTIONS
node_options: --no-warnings --max-old-space-size=2048 --max-http-header-size=65536
3 changes: 0 additions & 3 deletions roles/opendistro/opendistro-kibana/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ nodejs:
redhat: "rpm"
repo_url_ext: "nodesource.com/setup_10.x"

# Build from sources
build_from_sources: false
wazuh_plugin_branch: 4.1-7.10

#Nodejs NODE_OPTIONS
node_options: --no-warnings --max-old-space-size=2048 --max-http-header-size=65536
6 changes: 3 additions & 3 deletions roles/wazuh/ansible-filebeat-oss/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
filebeat_version: 7.10.2

wazuh_template_branch: v4.7.5
wazuh_template_branch: v4.8.0

filebeat_node_name: node-1

filebeat_output_indexer_hosts:
- "localhost:9200"
- "localhost"

filebeat_module_package_name: wazuh-filebeat-0.3.tar.gz
filebeat_module_package_name: wazuh-filebeat-0.4.tar.gz
filebeat_module_package_path: /tmp/
filebeat_module_destination: /usr/share/filebeat/module
filebeat_module_folder: /usr/share/filebeat/module/wazuh
Expand Down
2 changes: 2 additions & 0 deletions roles/wazuh/ansible-wazuh-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ This role is compatible with:
* Fedora
* Debian
* Ubuntu
* Windows
* macOS


Role Variables
Expand Down
50 changes: 25 additions & 25 deletions roles/wazuh/ansible-wazuh-agent/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,12 @@
---
wazuh_agent_version: 4.7.5
wazuh_agent_version: 4.8.0

# Custom packages installation

wazuh_custom_packages_installation_agent_enabled: false
wazuh_custom_packages_installation_agent_deb_url: ""
wazuh_custom_packages_installation_agent_rpm_url: ""

# Sources installation

wazuh_agent_sources_installation:
enabled: false
branch: "v4.7.5"
user_language: "y"
user_no_stop: "y"
user_install_type: "agent"
user_dir: "/var/ossec"
user_delete_dir: "y"
user_enable_active_response: "y"
user_enable_syscheck: "y"
user_enable_rootcheck: "y"
user_enable_openscap: "n"
user_enable_sca: "y"
user_enable_authd: "y"
user_generate_authd_cert: "n"
user_update: "y"
user_binaryinstall: null
user_agent_server_ip: "YOUR_MANAGER_IP"
user_agent_server_name: null
user_agent_config_profile: null
user_ca_store: "{{ wazuh_dir }}/wpk_root.pem"

wazuh_agent_yum_lock_timeout: 30

# We recommend the use of ansible-vault to protect Wazuh, api, agentless and authd credentials.
Expand All @@ -40,6 +16,7 @@ authd_pass: ''
wazuh_api_reachable_from_agent: yes
wazuh_profile_centos: 'centos, centos7, centos7.6'
wazuh_profile_ubuntu: 'ubuntu, ubuntu18, ubuntu18.04'
wazuh_profile_macos: 'darwin, darwin21, darwin21.1'
wazuh_auto_restart: 'yes'

wazuh_notify_time: '10'
Expand All @@ -54,6 +31,11 @@ wazuh_winagent_config:
auth_path_x86: C:\'Program Files (x86)'\ossec-agent\agent-auth.exe
check_sha512: True

# macOS deployment
wazuh_macos_config:
download_dir: /tmp/
install_dir: /Library/Ossec/

wazuh_dir: "/var/ossec"

# This is deprecated, see: wazuh_agent_address
Expand Down Expand Up @@ -100,6 +82,7 @@ wazuh_agent_enrollment:
agent_certificate_path: ''
agent_key_path: ''
authorization_pass_path: "{{ wazuh_dir }}/etc/authd.pass"
authorization_pass_path_macos: "/etc/authd.pass"
auto_method: 'no'
delay_after_enrollment: 20
use_source_ip: 'no'
Expand Down Expand Up @@ -225,6 +208,11 @@ wazuh_agent_syscheck:
checks: ''
- dirs: /bin,/sbin,/boot
checks: ''
macos_directories:
- dirs: /etc,/usr/bin,/usr/sbin
checks: ''
- dirs: /bin,/sbin
checks: ''
win_directories:
- dirs: '%WINDIR%'
checks: 'recursion_level="0" restrict="regedit.exe$|system.ini$|win.ini$"'
Expand Down Expand Up @@ -327,6 +315,17 @@ wazuh_agent_localfiles:
command: netstat -tulpn | sed 's/\([[:alnum:]]\+\)\ \+[[:digit:]]\+\ \+[[:digit:]]\+\ \+\(.*\):\([[:digit:]]*\)\ \+\([0-9\.\:\*]\+\).\+\ \([[:digit:]]*\/[[:alnum:]\-]*\).*/\1 \2 == \3 == \4 \5/' | sort -k 4 -g | sed 's/ == \(.*\) ==/:\1/' | sed 1,2d
alias: 'netstat listening ports'
frequency: '360'
macos:
- format: 'full_command'
command: netstat -an | awk '{if ((/^(tcp|udp)/) && ($4 != "*.*") && ($5 == "*.*")) {print $1" "$4" "$5}}' | sort -u
alias: 'netstat listening ports'
frequency: '360'
- format: 'macos'
location: 'macos'
query:
type: 'trace,log,activity'
level: 'info'
value: (process == "sudo") or (process == "sessionlogoutd" and message contains "logout is complete.") or (process == "sshd") or (process == "tccd" and message contains "Update Access Record") or (message contains "SessionAgentNotificationCenter") or (process == "screensharingd" and message contains "Authentication") or (process == "securityd" and eventMessage contains "Session" and subsystem == "com.apple.securityd")
windows:
- format: 'eventlog'
location: 'Application'
Expand All @@ -350,6 +349,7 @@ wazuh_agent_active_response:
ar_disabled: 'no'
ca_store: "{{ wazuh_dir }}/etc/wpk_root.pem"
ca_store_win: 'wpk_root.pem'
ca_store_macos: 'etc/wpk_root.pem'
ca_verification: 'yes'

## Logging
Expand Down
3 changes: 3 additions & 0 deletions roles/wazuh/ansible-wazuh-agent/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@

- name: Windows | Restart Wazuh Agent
win_service: name=WazuhSvc start_mode=auto state=restarted

- name: macOS | Restart Wazuh Agent
command: /Library/Ossec/bin/wazuh-control restart
3 changes: 0 additions & 3 deletions roles/wazuh/ansible-wazuh-agent/tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
when:
- ansible_distribution == "Ubuntu"
- ansible_distribution_major_version | int == 14
- not wazuh_agent_sources_installation.enabled
- not wazuh_custom_packages_installation_agent_enabled

- name: Debian/Ubuntu | Installing Wazuh repository key
Expand All @@ -45,7 +44,6 @@
id: "{{ wazuh_agent_config.repo.key_id }}"
when:
- not (ansible_distribution == "Ubuntu" and ansible_distribution_major_version | int == 14)
- not wazuh_agent_sources_installation.enabled
- not wazuh_custom_packages_installation_agent_enabled

- name: Debian/Ubuntu | Add Wazuh repositories
Expand All @@ -55,7 +53,6 @@
state: present
update_cache: true
when:
- not wazuh_agent_sources_installation.enabled
- not wazuh_custom_packages_installation_agent_enabled

- name: Debian/Ubuntu | Set Distribution CIS filename for debian
Expand Down
8 changes: 0 additions & 8 deletions roles/wazuh/ansible-wazuh-agent/tasks/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
- include_tasks: "Debian.yml"
when: ansible_os_family == "Debian"

- include_tasks: "installation_from_sources.yml"
when:
- wazuh_agent_sources_installation.enabled

- include_tasks: "installation_from_custom_packages.yml"
when:
- wazuh_custom_packages_installation_agent_enabled
Expand All @@ -20,7 +16,6 @@
lock_timeout: '{{ wazuh_agent_yum_lock_timeout }}'
when:
- ansible_os_family|lower == "redhat"
- not wazuh_agent_sources_installation.enabled
- not wazuh_custom_packages_installation_agent_enabled
tags:
- init
Expand All @@ -32,7 +27,6 @@
cache_valid_time: 3600
when:
- ansible_os_family|lower != "redhat"
- not wazuh_agent_sources_installation.enabled
- not wazuh_custom_packages_installation_agent_enabled
- not ansible_check_mode
tags:
Expand Down Expand Up @@ -271,9 +265,7 @@
- include_tasks: "RMRedHat.yml"
when:
- ansible_os_family == "RedHat"
- not wazuh_agent_sources_installation.enabled

- include_tasks: "RMDebian.yml"
when:
- ansible_os_family == "Debian"
- not wazuh_agent_sources_installation.enabled
2 changes: 0 additions & 2 deletions roles/wazuh/ansible-wazuh-agent/tasks/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
when:
- (ansible_facts['os_family']|lower == 'redhat') and (ansible_distribution|lower != 'amazon')
- (ansible_distribution_major_version|int <= 5)
- not wazuh_agent_sources_installation.enabled
- not wazuh_custom_packages_installation_agent_enabled
register: repo_v5_installed

Expand All @@ -24,7 +23,6 @@
changed_when: false
when:
- repo_v5_installed is skipped
- not wazuh_agent_sources_installation.enabled
- not wazuh_custom_packages_installation_agent_enabled

- name: RedHat/CentOS/Fedora | Install OpenJDK 1.8
Expand Down
Loading

0 comments on commit 84fba33

Please sign in to comment.