Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@ All notable changes to the Wazuh app project will be documented in this file.
- Fixed sorting by agent count in top 5 groups visualization in endpoints summary [#7783](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7783)
- Fixed System Inventory displaying incorrect agent data after switching agents in Endpoint Details [#7803](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7803)

## Wazuh v4.14.0 - OpenSearch Dashboards 2.19.3 - Revision 00
## Wazuh v4.14.0 - OpenSearch Dashboards 2.19.3 - Revision 03

### Added

- Support for Wazuh 4.14.0
- Create Users & Groups inventories [#7554](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7554) [#7587](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7587)
- Added visualizations field validations when creating wazuh-states index patterns [#7777](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7777)
- Create Users & Groups inventories [#7554](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7554) [#7587](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7587) [#7792](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7792) [#7787](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7787)
- Added ability to set the Wazuh data path (wazuh directory) within the directory defined through `path.data` setting [#7586](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7586)
- Added a new Browser Extensions tab in IT Hygiene [#7641](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7641) [#7696](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7696) [#7729](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7729)
- Added a new Browser Extensions tab in IT Hygiene [#7641](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7641) [#7696](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7696) [#7729](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7729) [#7774](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7774) [#7785](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7785)
- Added Microsoft Graph API module [#7516](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7516) [#7644](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7644) [#7661](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7661)
- Added a new Services tab in IT Hygiene [#7646](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7646) [#7695](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7695) [#7729](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7729)
- Added a new Services tab in IT Hygiene [#7646](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7646) [#7695](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7695) [#7729](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7729) [#7773](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7773) [#7790](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7790)
- Added a final step in the Deploy new agent section to navigate back to the agent list [#7711](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7711)

### Changed
Expand All @@ -42,6 +43,8 @@ All notable changes to the Wazuh app project will be documented in this file.

### Fixed

- Fixed missing scan settings in Inventory Data [#7811](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7811)
- Fixed the Endpoint summary to correctly display outdated agents without using filters, resolving previous inconsistencies [#7796](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7796)
- Fixed missing provider and queue_size fields in whodata configuration [#7596](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7596)
- Fixed an error that caused PDF report tables to overflow the page width [#7630](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7630)
- Fixed TypeError when changing API host ID in wazuh.yml configuration [#7611](https://github.com/wazuh/wazuh-dashboard-plugins/issues/7611)
Expand Down
4 changes: 4 additions & 0 deletions docker/imposter/agents/configuration/wmodules-wmodules.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
"ports": "yes",
"ports_all": "no",
"processes": "yes",
"groups": "yes",
"users": "yes",
"services": "yes",
"browser_extensions": "yes",
"sync_max_eps": 10
}
},
Expand Down
4 changes: 4 additions & 0 deletions docker/imposter/cluster/configuration/wmodules_wmodules.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
"ports": "yes",
"ports_all": "no",
"processes": "yes",
"groups": "yes",
"users": "yes",
"services": "yes",
"browser_extensions": "yes",
"sync_max_eps": 10
}
},
Expand Down
4 changes: 4 additions & 0 deletions docker/imposter/manager/configuration/wmodules_wmodules.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
"ports": "yes",
"ports_all": "no",
"processes": "yes",
"groups": "yes",
"users": "yes",
"services": "yes",
"browser_extensions": "yes",
"sync_max_eps": 10
}
},
Expand Down
30 changes: 30 additions & 0 deletions plugins/main/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,36 @@ export const WAZUH_VULNERABILITIES_PATTERN = 'wazuh-states-vulnerabilities-*';
export const WAZUH_INDEX_TYPE_VULNERABILITIES = 'vulnerabilities';
export const VULNERABILITY_IMPLICIT_CLUSTER_MODE_FILTER = 'wazuh.cluster.name';

// Wazuh states index types
export const WAZUH_INDEX_TYPE_STATES_VULNERABILITIES = 'states-vulnerabilities';
export const WAZUH_INDEX_TYPE_STATES_FIM_FILES = 'states-fim-files';
export const WAZUH_INDEX_TYPE_STATES_FIM_REGISTRIES = 'states-fim-registries';
export const WAZUH_INDEX_TYPE_STATES_INVENTORY = 'states-inventory';
export const WAZUH_INDEX_TYPE_STATES_INVENTORY_SYSTEM =
'states-inventory-system';
export const WAZUH_INDEX_TYPE_STATES_INVENTORY_HARDWARE =
'states-inventory-hardware';
export const WAZUH_INDEX_TYPE_STATES_INVENTORY_NETWORKS =
'states-inventory-networks';
export const WAZUH_INDEX_TYPE_STATES_INVENTORY_PACKAGES =
'states-inventory-packages';
export const WAZUH_INDEX_TYPE_STATES_INVENTORY_PORTS = 'states-inventory-ports';
export const WAZUH_INDEX_TYPE_STATES_INVENTORY_PROCESSES =
'states-inventory-processes';
export const WAZUH_INDEX_TYPE_STATES_INVENTORY_PROTOCOLS =
'states-inventory-protocols';
export const WAZUH_INDEX_TYPE_STATES_INVENTORY_USERS = 'states-inventory-users';
export const WAZUH_INDEX_TYPE_STATES_INVENTORY_GROUPS =
'states-inventory-groups';
export const WAZUH_INDEX_TYPE_STATES_INVENTORY_SERVICES =
'states-inventory-services';
export const WAZUH_INDEX_TYPE_STATES_INVENTORY_INTERFACES =
'states-inventory-interfaces';
export const WAZUH_INDEX_TYPE_STATES_INVENTORY_HOTFIXES =
'states-inventory-hotfixes';
export const WAZUH_INDEX_TYPE_STATES_INVENTORY_BROWSER_EXTENSIONS =
'states-inventory-browser-extensions';

// FIM
export const WAZUH_FIM_PATTERN = 'wazuh-states-fim-*';
export const WAZUH_FIM_FILES_PATTERN = 'wazuh-states-fim-files-*';
Expand Down
1 change: 1 addition & 0 deletions plugins/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"test:jest": "node scripts/jest --runInBand",
"test:jest:runner": "node scripts/runner test",
"generate:api-data": "node scripts/generate-api-data.js --spec https://raw.githubusercontent.com/wazuh/wazuh/$(node -e \"console.log(require('./package.json').version)\")/api/api/spec/spec.yaml --output file --output-directory common/api-info --display-configuration",
"generate:known-fields": "node ../../scripts/generate-known-fields.js",
"prebuild": "node scripts/generate-build-version",
"knip": "knip --files"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,19 @@ describe('PatternDataSource', () => {
patternDataSource.patternService = patternService;
});

it('should throw error when pattern not found', () => {
it('should throw error when pattern not found', async () => {
patternService.get.mockResolvedValue(undefined);
expect(async () => {
await patternDataSource.select();
}).rejects.toThrow(
await expect(patternDataSource.select()).rejects.toThrow(
'Error selecting index pattern: Error: Error selecting index pattern: pattern not found',
);
});

it('should throw error when get fields for index pattern rejects', () => {
patternService.getFieldsForIndexPattern.mockRejectedValue(null);
expect(async () => {
await patternDataSource.select();
}).rejects.toThrow('Error selecting index pattern: null');
it('should not throw error when get fields for index pattern rejects', async () => {
// The catch block in select() silently catches errors from getFieldsForIndexPattern
patternService.getFieldsForIndexPattern.mockRejectedValue(
new Error('Fields error'),
);
await expect(patternDataSource.select()).resolves.not.toThrow();
});

it('should not throw error when selecting from pattern data source', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@ export class PatternDataSource implements tDataSource {
try {
const pattern = await this.patternService.get(this.id);
if (pattern) {
const fields = await this.patternService.getFieldsForIndexPattern(
pattern,
);
const scripted = pattern.getScriptedFields().map(field => field.spec);
pattern.fields.replaceAll([...fields, ...scripted]);
try {
const fields = await this.patternService.getFieldsForIndexPattern(
pattern,
);
const scripted = pattern.getScriptedFields().map(field => field.spec);
pattern.fields.replaceAll([...fields, ...scripted]);

await this.patternService.updateSavedObject(pattern);
} catch {}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ export const ERROR_ENSURE_INDEX_PATTERN = 'ERROR_ENSURE_INDEX_PATTERN';

export const ensureIndexPatternIsCreated =
({
indexType,
mapSavedObjectAttributesCreation,
}: {
indexType: string;
mapSavedObjectAttributesCreation?: (parameters: {
indexPatternID: string;
fields: any[];
}) => any;
} = {}) =>
}) =>
async ({ indexPatternID }) => {
try {
// Check the existence of related index pattern
Expand All @@ -36,7 +38,10 @@ export const ensureIndexPatternIsCreated =
existIndexPattern?.error?.statusCode === HTTP_STATUS_CODES.NOT_FOUND
) {
// Check the existence of indices
const { exist, fields } = await existsIndices(indexPatternID);
const { exist, fields } = await existsIndices(
indexPatternID,
indexType,
);

if (!exist) {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ import {
import { ButtonExploreAgent } from '../../wz-agent-selector/button-explore-agent';
import {
DashboardITHygiene,
ITHygieneBrowserExtensionsInventory,
ITHygieneNetworksInventory,
ITHygienePackagesInventory,
ITHygieneProcessesInventory,
Expand Down Expand Up @@ -566,12 +565,6 @@ export const ModulesDefaults = {
buttons: [ButtonExploreAgent],
component: ITHygieneServicesInventory,
},
{
id: 'browser-extensions',
name: 'Browser extensions',
buttons: [ButtonExploreAgent],
component: ITHygieneBrowserExtensionsInventory,
},
],
availableFor: ['manager', 'agent'],
},
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading