Skip to content

Commit

Permalink
Merge branch 'master' into merge-4.8.2-into-master
Browse files Browse the repository at this point in the history
  • Loading branch information
Tostti committed Jan 4, 2024
2 parents 9a4bf4c + 5603760 commit 2df2d6d
Show file tree
Hide file tree
Showing 318 changed files with 13,608 additions and 12,121 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/dev-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
- name: Step 01 - Download the plugin's source code
uses: actions/checkout@v3
with:
repository: wazuh/wazuh-dashboard-plugins
ref: ${{ inputs.reference }}
path: wazuh

Expand Down Expand Up @@ -107,11 +108,16 @@ jobs:
cd /home/node/kbn/plugins/${{ matrix.plugins.container_path }} && yarn && ${{ inputs.command }};
'
- name: Get the plugin version
run: |
echo "version=$(jq -r '.version' $(pwd)/wazuh/plugins/main/package.json)" >> $GITHUB_ENV
echo "revision=$(jq -r '.revision' $(pwd)/wazuh/plugins/main/package.json)" >> $GITHUB_ENV
- name: Step 04 - Upload artifact to GitHub
if: ${{ inputs.artifact_name && inputs.artifact_path }}
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifact_name }}
name: ${{ inputs.artifact_name }}_${{ env.version }}-${{ env.revision }}_${{ inputs.reference }}.zip
path: ${{ matrix.plugins.path }}/${{ inputs.artifact_path }}
if-no-files-found: 'error'

Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/manual-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
name: Manual build

on:
workflow_call:
inputs:
reference:
required: true
type: string
default: master
description: Source code reference (branch, tag or commit SHA)
workflow_dispatch:
inputs:
reference:
Expand All @@ -20,7 +27,7 @@ jobs:
name: Build app package
uses: ./.github/workflows/dev-environment.yml
with:
reference: ${{ github.event.inputs.reference }}
reference: ${{ inputs.reference }}
command: 'yarn build'
artifact_name: 'wazuh-package'
artifact_name: 'wazuh-dashboard-plugins'
secrets: inherit
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

All notable changes to the Wazuh app project will be documented in this file.

## Wazuh v4.9.0 - OpenSearch Dashboards 2.11.0 - Revision 00

### Added

- Support for Wazuh 4.9.0
- Added AngularJS dependencies [#6145](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6145)

### Changed

- Removed embedded discover [#6120](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6120) [#6235](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6235)
- Develop logic of a new index for the fim module [#6227](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6227)
- Allow editing groups for an agent from Endpoints Summary [#6250](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6250)

# Fixed

- Fixed the scripted fields disappear when the fields of the events index pattern was refreshed [#6237](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6237)

## Wazuh v4.8.2 - OpenSearch Dashboards 2.10.0 - Revision 00

### Added
Expand Down
2 changes: 1 addition & 1 deletion docker/imposter/api-info/api_info.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"data": {
"title": "Wazuh API REST",
"api_version": "4.8.0",
"api_version": "4.9.0",
"revision": 1,
"license_name": "GPL 2.0",
"license_url": "https://github.com/wazuh/wazuh/blob/4.5/LICENSE",
Expand Down
3 changes: 2 additions & 1 deletion docker/osd-dev/dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ os_versions=(
'2.8.0'
'2.9.0'
'2.10.0'
'2.11.0'
)

osd_versions=(
Expand All @@ -26,7 +27,7 @@ osd_versions=(
'2.8.0'
'2.9.0'
'2.10.0'
'4.8.0'
'2.11.0'
'4.6.0'
'4.7.0'
)
Expand Down
1 change: 1 addition & 0 deletions docker/osd-dev/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ services:
- '${SRC}/main:/home/node/kbn/plugins/wazuh'
- '${SRC}/wazuh-core:/home/node/kbn/plugins/wazuh-core'
- '${SRC}/wazuh-check-updates:/home/node/kbn/plugins/wazuh-check-updates'
- '${SRC}/wazuh-endpoints:/home/node/kbn/plugins/wazuh-endpoints'
- wd_certs:/home/node/kbn/certs/
- ${WAZUH_DASHBOARD_CONF}:/home/node/kbn/config/opensearch_dashboards.yml
- ./config/${OSD_MAJOR}/osd/wazuh.yml:/home/node/kbn/data/wazuh/config/wazuh.yml
Expand Down
14 changes: 2 additions & 12 deletions plugins/main/common/config-equivalences.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export const configEquivalences = {
'wazuh.monitoring.pattern':
'Default index pattern to use for Wazuh monitoring.',
hideManagerAlerts: 'Hide the alerts of the manager in every dashboard.',
'logs.level': 'Logging level of the App.',
'enrollment.dns':
'Specifies the Wazuh registration server, used for the agent enrollment.',
'enrollment.password':
Expand Down Expand Up @@ -85,7 +84,6 @@ export const nameEquivalence = {
'wazuh.monitoring.creation': 'Index creation',
'wazuh.monitoring.pattern': 'Index pattern',
hideManagerAlerts: 'Hide manager alerts',
'logs.level': 'Log level',
'enrollment.dns': 'Enrollment DNS',
'cron.prefix': 'Cron prefix',
'cron.statistics.status': 'Status',
Expand All @@ -98,6 +96,8 @@ export const nameEquivalence = {
'alerts.sample.prefix': 'Sample alerts prefix',
'vulnerabilities.pattern': 'Index pattern',
'checks.vulnerabilities.pattern': 'Vulnerabilities index pattern',
'fim.pattern': 'Index pattern',
'checks.fim.pattern': 'Fim index pattern',
};

const HEALTH_CHECK = 'Health Check';
Expand Down Expand Up @@ -140,7 +140,6 @@ export const categoriesEquivalence = {
'wazuh.monitoring.creation': MONITORING,
'wazuh.monitoring.pattern': MONITORING,
hideManagerAlerts: GENERAL,
'logs.level': GENERAL,
'enrollment.dns': GENERAL,
'cron.prefix': GENERAL,
'cron.statistics.status': STATISTICS,
Expand Down Expand Up @@ -195,15 +194,6 @@ export const formEquivalence = {
},
'wazuh.monitoring.pattern': { type: TEXT },
hideManagerAlerts: { type: BOOLEAN },
'logs.level': {
type: LIST,
params: {
options: [
{ text: 'Info', value: 'info' },
{ text: 'Debug', value: 'debug' },
],
},
},
'enrollment.dns': { type: TEXT },
'cron.prefix': { type: TEXT },
'cron.statistics.status': { type: BOOLEAN },
Expand Down
91 changes: 30 additions & 61 deletions plugins/main/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ export const WAZUH_STATISTICS_DEFAULT_CRON_FREQ = '0 */5 * * * *';
export const WAZUH_VULNERABILITIES_PATTERN = 'wazuh-states-vulnerabilities';
export const WAZUH_INDEX_TYPE_VULNERABILITIES = 'vulnerabilities';

// Wazuh fim
export const WAZUH_FIM_PATTERN = 'wazuh-states-fim';

// Job - Wazuh initialize
export const WAZUH_PLUGIN_PLATFORM_TEMPLATE_NAME = 'wazuh-kibana';

Expand Down Expand Up @@ -137,35 +140,6 @@ export const WAZUH_DATA_CONFIG_REGISTRY_PATH = path.join(
'wazuh-registry.json',
);

// Wazuh data path - logs
export const MAX_MB_LOG_FILES = 100;
export const WAZUH_DATA_LOGS_DIRECTORY_PATH = path.join(
WAZUH_DATA_ABSOLUTE_PATH,
'logs',
);
export const WAZUH_DATA_LOGS_PLAIN_FILENAME = 'wazuhapp-plain.log';
export const WAZUH_DATA_LOGS_PLAIN_PATH = path.join(
WAZUH_DATA_LOGS_DIRECTORY_PATH,
WAZUH_DATA_LOGS_PLAIN_FILENAME,
);
export const WAZUH_DATA_LOGS_RAW_FILENAME = 'wazuhapp.log';
export const WAZUH_DATA_LOGS_RAW_PATH = path.join(
WAZUH_DATA_LOGS_DIRECTORY_PATH,
WAZUH_DATA_LOGS_RAW_FILENAME,
);

// Wazuh data path - UI logs
export const WAZUH_UI_LOGS_PLAIN_FILENAME = 'wazuh-ui-plain.log';
export const WAZUH_UI_LOGS_RAW_FILENAME = 'wazuh-ui.log';
export const WAZUH_UI_LOGS_PLAIN_PATH = path.join(
WAZUH_DATA_LOGS_DIRECTORY_PATH,
WAZUH_UI_LOGS_PLAIN_FILENAME,
);
export const WAZUH_UI_LOGS_RAW_PATH = path.join(
WAZUH_DATA_LOGS_DIRECTORY_PATH,
WAZUH_UI_LOGS_RAW_FILENAME,
);

// Wazuh data path - downloads
export const WAZUH_DATA_DOWNLOADS_DIRECTORY_PATH = path.join(
WAZUH_DATA_ABSOLUTE_PATH,
Expand Down Expand Up @@ -862,6 +836,33 @@ export const PLUGIN_SETTINGS: { [key: string]: TPluginSetting } = {
return schema.boolean();
},
},
'checks.fim.pattern': {
title: 'Fim index pattern',
description:
'Enable or disable the fim index pattern health check when opening the app.',
category: SettingCategory.HEALTH_CHECK,
type: EpluginSettingType.switch,
defaultValue: true,
isConfigurableFromFile: true,
isConfigurableFromUI: true,
options: {
switch: {
values: {
disabled: { label: 'false', value: false },
enabled: { label: 'true', value: true },
},
},
},
uiFormTransformChangedInputValue: function (
value: boolean | string,
): boolean {
return Boolean(value);
},
validate: SettingsValidator.isBoolean,
validateBackend: function (schema) {
return schema.boolean();
},
},
'cron.prefix': {
title: 'Cron prefix',
description: 'Define the index prefix of predefined jobs.',
Expand Down Expand Up @@ -1476,38 +1477,6 @@ export const PLUGIN_SETTINGS: { [key: string]: TPluginSetting } = {
return schema.boolean();
},
},
'logs.level': {
title: 'Log level',
description: 'Logging level of the App.',
category: SettingCategory.GENERAL,
type: EpluginSettingType.select,
options: {
select: [
{
text: 'Info',
value: 'info',
},
{
text: 'Debug',
value: 'debug',
},
],
},
defaultValue: 'info',
isConfigurableFromFile: true,
isConfigurableFromUI: true,
requiresRestartingPluginPlatform: true,
validate: function (value) {
return SettingsValidator.literal(
this.options.select.map(({ value }) => value),
)(value);
},
validateBackend: function (schema) {
return schema.oneOf(
this.options.select.map(({ value }) => schema.literal(value)),
);
},
},
pattern: {
title: 'Index pattern',
description:
Expand Down
3 changes: 0 additions & 3 deletions plugins/main/common/plugin-settings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,6 @@ describe('[settings] Input validation', () => {
${'ip.ignore'} | ${['test', 'test#']} | ${'It can\'t contain invalid characters: \\, /, ?, ", <, >, |, ,, #.'}
${'ip.selector'} | ${true} | ${undefined}
${'ip.selector'} | ${''} | ${'It should be a boolean. Allowed values: true or false.'}
${'logs.level'} | ${'info'} | ${undefined}
${'logs.level'} | ${'debug'} | ${undefined}
${'logs.level'} | ${''} | ${'Invalid value. Allowed values: info, debug.'}
${'pattern'} | ${'test'} | ${undefined}
${'pattern'} | ${'test*'} | ${undefined}
${'pattern'} | ${''} | ${'Value can not be empty.'}
Expand Down
1 change: 0 additions & 1 deletion plugins/main/common/wazu-menu/wz-menu-settings.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export enum WAZUH_MENU_SETTINGS_SECTIONS_CY_TEST_ID {
MODULES = 'menuSettingsModulesLink',
SAMPLE_DATA = 'menuSettingsSampleDataLink',
CONFIGURATION = 'menuSettingsConfigurationLink',
LOGS = 'menuSettingsLogsLink',
MISCELLANEOUS = 'menuSettingsMiscellaneousLink',
ABOUT = 'menuSettingsAboutLink',
}
6 changes: 4 additions & 2 deletions plugins/main/opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "wazuh",
"version": "4.8.2-00",
"version": "4.9.0-00",
"opensearchDashboardsVersion": "opensearchDashboards",
"configPath": [
"wazuh"
Expand All @@ -19,7 +19,9 @@
"opensearchDashboardsReact",
"opensearchDashboardsUtils",
"opensearchDashboardsLegacy",
"wazuhCheckUpdates"
"wazuhCheckUpdates",
"wazuhCore",
"wazuhEndpoints"
],
"optionalPlugins": [
"security",
Expand Down
13 changes: 9 additions & 4 deletions plugins/main/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "wazuh",
"version": "4.8.2",
"version": "4.9.0",
"revision": "00",
"pluginPlatform": {
"version": "2.10.0"
"version": "2.11.0"
},
"description": "Wazuh dashboard",
"keywords": [
Expand Down Expand Up @@ -44,8 +44,10 @@
"prebuild": "node scripts/generate-build-version"
},
"dependencies": {
"angular": "^1.8.2",
"angular-animate": "1.8.3",
"angular-material": "1.2.5",
"angular-sanitize": "^1.8.0",
"axios": "^1.6.1",
"install": "^0.13.0",
"js2xmlparser": "^5.0.0",
Expand All @@ -62,13 +64,16 @@
"react-cookie": "^4.0.3",
"read-last-lines": "^1.7.2",
"timsort": "^0.3.0",
"typescript": "^5.0.4",
"winston": "3.9.0"
"typescript": "^5.0.4"
},
"devDependencies": {
"@types/node-cron": "^2.0.3",
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"angular-aria": "^1.8.0",
"angular-route": "^1.8.0",
"angular-mocks": "^1.8.2",
"ngreact": "^0.5.1",
"eslint": "^8.46.0",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-typescript": "3.5.5",
Expand Down
Loading

0 comments on commit 2df2d6d

Please sign in to comment.