Skip to content

Commit

Permalink
Merge branch '4.9.1' into merge-4.9.1-into-4.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
javimed committed Sep 23, 2024
2 parents 7f94915 + 7e8de19 commit 2a7bfc2
Show file tree
Hide file tree
Showing 35 changed files with 441 additions and 226 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]
python-version: [3.9, 3.10, 3.11]

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 4 additions & 0 deletions .snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.25.0
language-settings:
python: "3.9"
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,26 @@ All notable changes to this project will be documented in this file.

## [v4.9.1]

- Support for Wazuh 4.9.1
### Added

- Added dependency requirements to the offline installation guide. ([#7755](https://github.com/wazuh/wazuh-documentation/pull/7755))
- Added `SECURITY.md` to the Wazuh documentation repository. ([#7764](https://github.com/wazuh/wazuh-documentation/pull/7764))
- Added support for Python 3.12 in configuration steps. ([#7673](https://github.com/wazuh/wazuh-documentation/pull/7673))

### Changed

- Replaced Wazuh keystore password insertion commands with a safer method and added a new parameter to the list of available options. ([#7593](https://github.com/wazuh/wazuh-documentation/pull/7593))
- Restored Wazuh dashboard package revision number. ([#7762](https://github.com/wazuh/wazuh-documentation/pull/7762))

### Fixed

- Added a step for creating a retention policy using the Visual editor in the *Index life management* section. ([#7685](https://github.com/wazuh/wazuh-documentation/pull/7685))
- Fixed debugging command for the Wazuh dashboard. ([#7769](https://github.com/wazuh/wazuh-documentation/pull/7769))
- Fixed Wazuh indexer repository reference in the Wazuh indexer package generation guide. ([#7779](https://github.com/wazuh/wazuh-documentation/pull/7779))

### Removed

- Removed the command to delete `opensearch_dashboards.yml` in the *Upgrading the Wazuh dashboard* section. ([#7777](https://github.com/wazuh/wazuh-documentation/pull/7777))

## [v4.9.0]

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# docker build -t sphinx-autobuild .
# docker run -it -p 8000:8000 --rm -v "$(pwd)/source":/home/python/docs sphinx-autobuild

FROM python:3.8-alpine
FROM python:3.9-alpine

COPY --chown=1000:1000 requirements.txt ./

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ You can also join our [users mailing list](https://groups.google.com/d/forum/waz

## Software and libraries used

- [Python](https://www.python.org/) 3.8+
- [Sphinx](http://www.sphinx-doc.org/) 7.0.1
- [sphinx-tabs](https://github.com/djungelorm/sphinx-tabs) 3.4.1
- [Python](https://www.python.org/) 3.9+
- [Sphinx](http://www.sphinx-doc.org/) 7.2.6
- [sphinx-tabs](https://github.com/djungelorm/sphinx-tabs) 3.4.5
- [jsmin](https://github.com/tikitu/jsmin) 3.0.1
- [sphinx-reredirects](https://gitlab.com/documatt/sphinx-reredirects) 0.1.2
- [sphinx-reredirects](https://gitlab.com/documatt/sphinx-reredirects) 0.1.5

### Optional software to run the alternative Pagefind search engine

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:

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.

## 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])
8 changes: 3 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
Sphinx==7.0.1
sphinx-tabs==3.4.1
sphinxcontrib-applehelp==1.0.4
sphinxcontrib-htmlhelp==2.0.1
Sphinx==7.2.6
sphinx-tabs==3.4.5
docutils==0.18.1
jsmin==3.0.1
Jinja2==3.1.4
Pygments==2.15.1
sphinx-reredirects==0.1.2
sphinx-reredirects==0.1.5
13 changes: 9 additions & 4 deletions source/_templates/community.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
Wazuh has one of the largest open source security communities in the world. You can become part of it to learn from other users, participate in discussions, talk to our development team, and contribute to the project. The following resources are easily available:

- `Slack channel <https://wazuh.com/community/join-us-on-slack>`_: Join our community channel to chat with our developers and technical team in a close to real-time experience.
- `Google group <https://groups.google.com/forum/#!forum/wazuh>`_: Here you can share questions and learn from other Wazuh users. It is easy to subscribe via `email <[email protected]>`__.
- `GitHub repositories <https://github.com/wazuh>`_: Get access to the Wazuh source code, report issues, and contribute to the project. We happily review and accept pull requests.
- `Slack channel <https://wazuh.com/community/join-us-on-slack>`__: Join our community channel to chat with our developers and technical team in a close to real-time experience.
- `Google group <https://groups.google.com/forum/#!forum/wazuh>`__: Here you can share questions and learn from other Wazuh users. It is easy to subscribe via `email <[email protected]>`__.
- `GitHub repositories <https://github.com/wazuh>`__: Get access to the Wazuh source code, report issues, and contribute to the project. We happily review and accept pull requests.
- `Discord <https://discord.gg/75JBUfKSEW>`__: Engage with our community in dynamic discussions and collaborations on the latest security trends and Wazuh developments.
- `Reddit <https://www.reddit.com/r/Wazuh/>`__: Join our subreddit to share insights, ask questions, and discuss security issues with fellow users.
- `Twitter/X <https://twitter.com/wazuh>`__: Follow us on Twitter/X for real-time updates, news, and quick tips from our development team and security experts.
- `LinkedIn <https://www.linkedin.com/company/wazuh>`__: Stay updated with our professional network and industry news by connecting with us on LinkedIn.
- `YouTube <https://www.youtube.com/channel/UC3Kr7V99AXOOOuPy4bLhS8w>`__: Subscribe to our YouTube channel for video tutorials, webinars, and walkthroughs of Wazuh features and configurations.

In addition, we also provide `professional support, training, and consulting services <https://wazuh.com/professional-services/>`_.
In addition, we also provide `professional support, training, and consulting services <https://wazuh.com/professional-services/>`__.

.. End of file
6 changes: 5 additions & 1 deletion source/_themes/wazuh_doc_theme_v3/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@
{%- set temp_script_files = [] -%}
{%- for scriptfile in script_files -%}
{%- if scriptfile not in unwanted_js -%}
{{- temp_script_files.append(scriptfile)|default("", True) -}}
{%- if scriptfile.filename -%}
{{- temp_script_files.append(scriptfile.filename)|default("", True) -}}
{%- else -%}
{{- temp_script_files.append(scriptfile)|default("", True) -}}
{%- endif -%}
{%- endif -%}
{% endfor -%}
{%- set script_files = temp_script_files -%}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jQuery(function($) {
}

/* Initialize the tooltip of bootstrap */
$('#version-selector [data-toggle="tooltip"]').tooltip({container: 'header'});
$('#version-selector [data-toggle="tooltip"]').tooltip({container: 'header', placement: 'left', boundary: 'window'});

/**
* Add the current version to the version selector
Expand Down Expand Up @@ -202,27 +202,38 @@ jQuery(function($) {

/* Print the correct links in the selector */
for (let i = 0; i < listOfVersions.length; i++) {
ele = null;
href = '';
tooltip = '';
tooltip = false;
ver = versionsCopy[i];

if ( redirHistory[ver] != null && redirHistory[ver].length ) {
if ( i == 0 ) { // the latest release version
href = '/current'+redirHistory[ver]+param;
} else {
href = '/'+ver+redirHistory[ver]+param;
}
} else {
tooltip = 'class="disabled" data-toggle="tooltip" data-placement="left" title="This page is not available in version ' + listOfVersions[i] + ((i == 0) ? ' (current)' : '') +'"';
tooltip = true;
}
if ( !hasHttpProtocol && href.length > 0 ) {
href = 'https://documentation.wazuh.com' + href;
}
ele += '<li><a href="' + href + '" '+ tooltip +'> Version '+listOfVersions[i] + ((i == 0) ? ' (current)' : '') +'</a></li>';
aEle = $(document.createElement('a'));
aEle.attr('href', href).text(listOfVersions[i] + ((i == 0) ? ' (current)' : ''));
if ( tooltip !== false ){
aEle.addClass('disabled')
.attr('data-toggle', 'tooltip')
.attr('data-placement', 'right')
.attr('title', 'This page is not available in version ' + listOfVersions[i] + ((i == 0) ? ' (current)' : ''));
}
ele = $(document.createElement('li'));
ele.append(aEle);
if (ver == listOfVersions[0]) {
$('.no-latest-notice .link-latest').attr('href', href);
}
selectVersionUl.append(ele);
}
selectVersionUl.html(ele);
return redirHistory;
}

Expand Down
83 changes: 66 additions & 17 deletions source/_themes/wazuh_doc_theme_v3/src/js-source/search-results.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ if ( $('.search') ) {
termFrequency: 0, // 0 - 1
pageLength: 1, // 0 - 1
termSaturation: 0.2 // 0 - 2
}
},
highlightParam: "highlight"
};
data.options(options);
const search = data.search;
Expand Down Expand Up @@ -93,7 +94,10 @@ if ( $('.search') ) {

/* Display results */
for ( let i = 0; i < resultsFound; i++ ) {
let listItem = $('<li id="' + results[i].id + '" style="display:none"></li>');
// let listItem = $('<li id="' + results[i].id + '" style="display:none"></li>');
let listItem = $(document.createElement('li'));
listItem.attr('id', sanitizeHTML(results[i].id));
listItem.attr('style', 'display:none');

resultList.append(listItem);

Expand Down Expand Up @@ -130,9 +134,10 @@ if ( $('.search') ) {
// Context
let excerpt = singleResult.excerpt;

context = $('<div/>').addClass('context').html('... ' + excerpt.replace('¶', '') + ' ...');
context = $('<div>', {class: 'context'});

listItem.append(context);
processExcerpt(excerpt, context);

$.each(excludedSearchFolders, function(index, value) {
if ( path.includes(value+"/") ) {
Expand Down Expand Up @@ -167,23 +172,23 @@ if ( $('.search') ) {
/* Otherwise, load search option B, Sphinx search */
loadSphinxSearch();
}
}
});

function loadSphinxSearch() {
getScript(DOCUMENTATION_OPTIONS.URL_ROOT + "_static/js/min/sphinx-search-ui.min.js");
getScript(DOCUMENTATION_OPTIONS.URL_ROOT + "searchindex.js");
}
function loadSphinxSearch() {
getScript(DOCUMENTATION_OPTIONS.URL_ROOT + "_static/js/min/sphinx-search-ui.min.js");
getScript(DOCUMENTATION_OPTIONS.URL_ROOT + "searchindex.js");
}

function getScript(scriptFile) {
loadScript = document.createElement('SCRIPT');

loadScript.setAttribute("charset", "utf-8");
loadScript.setAttribute("type", "text/javascript");

loadScript.setAttribute("src", scriptFile);
document.getElementsByTagName("head")[0].appendChild(loadScript);
}
function getScript(scriptFile) {
loadScript = document.createElement('SCRIPT');

loadScript.setAttribute("charset", "utf-8");
loadScript.setAttribute("type", "text/javascript");

loadScript.setAttribute("src", scriptFile);
document.getElementsByTagName("head")[0].appendChild(loadScript);
}
});

/* Shows excluded results */
$(document).delegate('#search-results #toggle-results.include', 'click', function() {
Expand Down Expand Up @@ -286,3 +291,47 @@ function updateSearchStatus(statusElement, totalResults, excludedResults) {
}
statusElement.html(resultText);
}

function sanitizeHTML(str) {
return str.replace(/[^\w. ]/gi, function (c) {
return '&#' + c.charCodeAt(0) + ';';
});
};

function processExcerpt(excerpt, context) {
excerpt = '... ' + htmlDec(excerpt.replace('¶', '')) + ' ...';

/* Split by opening tag <mark> */
excerptArray = excerpt.split('<mark>');

/* Append to the context the text content before the first <mark> */
context.text(excerptArray.shift());

/* Separate marked words */
for (let i = 0; i < excerptArray.length; i++) {
let marked =document.createElement('mark');

/* Split by closing tag </mark>
This should create pairs where the first element being the marked term(s)
and the second element is the remaining (not marked) part of the string */
excerptArray[i] = excerptArray[i].split('</mark>');
marked.textContent = excerptArray[i][0];
context.get(0).appendChild(marked);
context.get(0).appendChild(document.createTextNode(excerptArray[i][1]));
}
}

function htmlEnc(s) {
return s.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/'/g, '&#39;')
.replace(/"/g, '&#34;');
}

function htmlDec(s) {
return s.replace(/&lt;/g, '<')
.replace(/&gt;/g, '>')
.replace(/&#39;/g, '\'')
.replace(/&#34;/g, '"');
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

header {
.tooltip {
pointer-events: none;
font-family: Manrope, sans-serif;
}
}
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit 2a7bfc2

Please sign in to comment.