-
Notifications
You must be signed in to change notification settings - Fork 203
Merge 4.13.0 into 4.14.0 #7471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Merge 4.13.0 into 4.14.0 #7471
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… vulnerabilities dashboard (#7424) * fix(ui): Change X-axis label in vulnerabilities visualization - Update "vulnerability.published_at per year" to "Year published" Signed-off-by: gonzaarancibia <[email protected]> * docs(changelog): Add Fixed X-axis label in "Vulnerabilities by year of publication" visualization changes to changelog #7422 Signed-off-by: gonzaarancibia <[email protected]> --------- Signed-off-by: gonzaarancibia <[email protected]>
* feat(imposter): Update API configuration to support UUID - Configure manager/info endpoint to return UUID - Ensure proper API simulation for testing Signed-off-by: gonzaarancibia <[email protected]> * "feat(api): Add UUID extraction and validation - Extract UUID from manager/info response - Implement validation for UUID existence - Include UUID in checkAPI endpoint response Signed-off-by: gonzaarancibia <[email protected]> * feat(ui): Add UUID display to API table - Implement UUID column in API table - Add PopOver for better UUID visualization - Include clipboard copy functionality Signed-off-by: gonzaarancibia <[email protected]> * fix: Improve UI UUID popover toggle in API table Signed-off-by: gonzaarancibia <[email protected]> * doc: Add UUID field to APIs table to changelog Signed-off-by: gonzaarancibia <[email protected]> * fix: replace useles number error code with default error status Signed-off-by: gonzaarancibia <[email protected]> * feat: add method togglePopoverUUID to replace inline function Signed-off-by: gonzaarancibia <[email protected]> --------- Signed-off-by: gonzaarancibia <[email protected]> Co-authored-by: Federico Rodriguez <[email protected]>
* fix(register-agent): update macOS start command to use launchctl The previous command used `wazuh-control start`, which is deprecated. The new command uses `launchctl load` to properly start the Wazuh agent as a macOS service. * Add changelog * Update CHANGELOG.md
* feat(endpoints-summary-ui): Add back button to endpoints summary Signed-off-by: gonzaarancibia <[email protected]> * fix: apply prettier formatting Signed-off-by: gonzaarancibia <[email protected]> * fix: apply prettier formatting to register-agent component Signed-off-by: gonzaarancibia <[email protected]> * doc(changelog): Added back button to Deploy Agent page that redirects to Endpoints Summary #7443 Signed-off-by: gonzaarancibia <[email protected]> --------- Signed-off-by: gonzaarancibia <[email protected]>
* add wazuh manager dev service and update cert generation Introduces a development service for the manager with custom install steps and network settings. Updates certificate generation to include the new service, improving local dev parity and security. * updates Wazuh manager setup and improves certificate handling Switches Wazuh manager service to use a custom image and build context, updates certificate generation to include proper client and server distinctions, and aligns configuration to support the new manager endpoint and credentials. Simplifies startup by removing inline installation commands. * Reorders service definitions for improved clarity Moves the manager service lower in the configuration file to maintain a more logical and readable service order, aiding maintainability and ease of navigation. * Add Docker setup for Wazuh manager with Filebeat Introduces Docker configuration and scripts to automate Wazuh manager and Filebeat installation, certificate setup, and service initialization to streamline local development and deployment. * Add usage documentation for manager container Introduces a README detailing how to build, run, and configure the Wazuh Manager container for development and testing within the OSD environment. Improves onboarding and clarifies intended use. * feat(dev.yml): add server-local profile and update wazuh manager and agent configurations This commit introduces a new `server-local` profile to the development environment, allowing for local server configurations. It also updates the Wazuh manager and agent settings to support this new profile, including renaming `wazuh.manager.dev` to `wazuh.manager.local` and adding a new `wazuh.agent.deb.local` service. Additionally, the `dev.sh` script is updated to handle the new `server-local` profile. * refactor(docker): update manager URL and add RPM agent service Update the manager URL from 'wazuh.manager.dev' to 'wazuh.manager.local' in the wazuh.yml configuration file. Additionally, introduce a new RPM-based agent service for CentOS 8 in the dev.yml file, ensuring compatibility and consistency across different package managers. * refactor(docker): remove unused option from dev.sh script The '-a' option was removed from the getopts loop in dev.sh as it was not being used in the script. This simplifies the script and removes unnecessary code. * Update docker/osd-dev/manager/entrypoint.sh Co-authored-by: Copilot <[email protected]> * remove commented-out certificate directory creation Cleans up obsolete code by deleting a commented line related to certificate directory setup, improving script readability and maintainability. * add .gitkeep to ensure agents directory is tracked Ensures the empty agents directory is included in version control, maintaining directory structure in the repository. * feat(dev.sh): add start command to docker compose script This commit introduces a new 'start' command to the docker compose script, allowing users to start the containers without rebuilding them. Additionally, it updates the Dockerfile to handle wildcard filenames for the wazuh-manager package and corrects the file paths in the installer script to ensure proper certificate handling. * feat(docker): add WAZUH_VERSION args and enhance server-local profiles Add WAZUH_VERSION_FILEBEAT and WAZUH_VERSION_DEVELOPMENT as build args in the Dockerfile to allow dynamic versioning. Enhance server-local profiles in dev.yml to support different agent deployment options (rpm, deb, without). Update installer.sh to handle WAZUH_VERSION_FILEBEAT dynamically and modify dev.sh to include agent deployment options. * docs(docker/osd-dev): update README with detailed dev.sh usage and parameters Expand the README to include a comprehensive explanation of the `dev.sh` script's parameters, usage examples, and important notes for different deployment modes. This update ensures developers have clear guidance on how to use the script effectively. * feat(docker): add manager-local-up action to dev.sh This commit introduces a new action `manager-local-up` to the `dev.sh` script, allowing users to start the Wazuh manager locally in detached mode. This enhances the development workflow by providing a quick way to bring up the manager without starting all services. --------- Co-authored-by: Ian Yenien Serrano <[email protected]> Co-authored-by: Copilot <[email protected]>
* feat: add sample data script based on datasets * change(fim): replace FIM inventory table based on indexer data - Replace FIM inventory table based on indexer data - Add `fim.pattern` setting to define the FIM index pattern * feat: add a basic grid table component to display indexer data * fix(fim): updated sample data and template for FIM inventory * feat(system-inventory): replace the tables of agent system inventory based on indexer data - Replace the tables of agent system inventory based on indexer data - Create sample datasets for system inventory * change(sample-data-generator): refactor the sample data generator - Create a OpenSearch Dashboards client with ability to: - Saved objects/index patterns: create, delete, get all, exists - Add the ability to create the index pattern into Wazuh dashboard - Move repeated logic from datasets to common file * chore(sample-data): removed unused functions * chore(sample-data): rename system inventory datasets and add new ones * feat(system-inventory): guard sytem inventory tables with index pattern creation requirement * fix(system-inventory): avoid index pattern creation error due to conflicts because the this was created due to component is mounted 2 times triggering the creation 2 times in parallel * feat(sample-data): simplify dataset generators * chore(system-inventory): add cluster name filter to data sources * feat: enhance table discover * feat(fim): add cluster name filter * feat(fim): replace inventory table * chore(sample-data): update fim and system invnetory datasets * fix(system-inventory): default columns of network settings * feat(fim): add events to fim document details - Add useNewFilterManager hook - Add additional tabs for document details * chore(sample-data): add path to FIM alerts sample data to match with states * feat: add global system inventory apps and FIM files and registry tabs - Add data sources - Add system inventory apps: - Hosts - Network - Software - Processes - Split FIM inventory into files and registries * remove: unused GET /api/syscollector endpoint * fix(sysmte-inventory): rename setting from system_inventory_system.pattern to system_inventory_systems.pattern * feat(system-inventory): add apps to agent menu * feat(system-inventory): add sytem inventory panel to agent overview * fix(sample-data): add generation for host.ip to states-invnetory-interfaces dataset * feat(it-hygiene): add IT Hygiene app and inventory tab * fix(it-hygiene): fix name in breadcrumb and agent menu * feat(it-hygiene): add dashboard scafolding * fix: remove console.log * feat(system-inventory): remove inventory data from agent overview * feat(system-inventory): move system inventory to it hygiene - Remove uneeded data sources related to system inventory - Move table columns definitions to IT Hygiene directory - Use the sytem inventory datasource instead of different ones in system inventory metrics * feat(it-hygiene): add reporting to dashboard tab * chore(changelog): add entries * fix(fim): rename files and registries tabs * feat(data-source): add initialization error to useDataSource * change: move logic to ensure the creation of index pattern to common that pplies to system inventory and fim * fix(table): initial hits count stats at 0 instead of undefined * feat: refactor WzTableDiscover and adapt FIM inventory files and regitries tables * adjust grid styling for full width Ensures the data grid spans the full width of its container by overriding width property with important flag for consistent layout. * update .gitignore to exclude virtual environment Adds 'venv/' to the .gitignore file to prevent committing Python virtual environment files, ensuring a cleaner repository. * scope virtualized grid styles to app container Prevents style conflicts by scoping the virtualized grid class to the application’s container. Enhances compatibility with other components or external styles. * fix: minor fixes * feat: add Explore events button to recent events tables in FIM inventory flyouts * feat(fim): unify FIM inventories tabs - Create fim.pattern setting - Create data source related to unified FIM - Create Inventory data in FIM - Remove fim_files.pattern setting - Remove fim_registries.pattern setting - Remove data source related to FIM files and registries - Remove Files and Registries tabs * change: replace recent events button * fix: missing application redirection * fix: remove unused imports * fix: missing import react * feat: replace FIM inventory details in agent overview by data based on indexer * chore: remove deprecated FIM inventory * fix: remove unused files and fix filters in system inventory data of agent * chore(chagnelog): add entry * remove: references to agent inventory data tabs * remove: references to agent inventory data tabs * fix(workaround): return from full screen in data grid in same row * refactor date generation to use shared utility Replaces custom date generation logic with a shared utility function from the randomize library. Simplifies code and ensures consistency across modules. * replace hardcoded default count with constant Refactors multiple scripts to use a centralized constant for the default count value, enhancing maintainability and consistency across the codebase. * standardizes index name generation Replaces hardcoded index name strings with a dynamic index name generation function for consistency and maintainability. Updates constants to include default prefix and suffix values. * refactors timestamp generation logic Replaces duplicate timestamp generation functions with a shared method in the randomize module. Updates references in related scripts to use the new method, improving code reusability and maintainability. * refactor data stream generation logic Removes redundant `generate_random_data_stream` functions from multiple modules. Refactors data stream generation to use a centralized method in the `randomize` library for consistency and maintainability. * refactors event generation logic Moves event generation to a reusable method in the randomize module. Replaces duplicate code with the new method to improve maintainability and reduce redundancy. * replace inline wazuh generator with centralized function Moves the Wazuh data generation logic to a reusable method in the randomize library, reducing code duplication and improving maintainability across multiple scripts. * remove unused function for random operation generation Eliminates an unused function that generated random operations to streamline the code and improve maintainability. * refactor agent generation to use centralized randomize method Replaces inline agent generation logic across multiple modules with a centralized method in the randomize library. Simplifies code and ensures consistency in agent creation logic. * refactor document generation to use reusable method Replaces inline document generation logic with a reusable method in the generate library. Simplifies code structure and ensures consistency across multiple modules by centralizing common functionality. * rename random_event to event in randomize module Updates method name from random_event to event for clarity and consistency. Adjusts references across related modules to reflect the change. * fix method definitions in Randomize class Adds missing 'self' parameter to instance methods in the Randomize class to correct method definitions and ensure proper functionality. * remove redundant agent generation logic Eliminates repeated agent and host generation functions across multiple scripts. Centralizes host generation into a new `common_host` method in the randomization library. Refactors related document generation to simplify parameters and avoid passing agent details explicitly. * simplifies agent generation logic Removes the requirement to pass a host dictionary to the agent method by directly invoking common_host internally. Enhances code clarity and reduces coupling between methods. * refactors MAC address generation logic Replaces inline MAC address generation with a reusable method in the randomization utility class for better modularity. Updates references in relevant functions to use the new randomization method. * remove unused imports across dataset scripts Cleans up unused imports such as `datetime` and `randomize` to improve code readability and reduce clutter in dataset generation scripts. * refactors architecture randomization logic Moves architecture selection to a dedicated method in the randomize module for reuse and improved maintainability. Updates relevant scripts to utilize the new method. * feat(it-hygiene): add dashboard definitions * change(fim): replace loading effect in document detail of FIM in agent welcome * fix(it-hygiene): responsive system table in inventory * fix(it-hygiene): remove unused colors definitions in visualization * remove: unused controller related to GET /api/syscollector * change(it-hygiene): visualization definitions * remove: endpoint POST /reports/agents/{agentID}/inventory and extended reporting information related to syscollector * remove(dev-tools): example request related to syscollector * chore(changelog): add entries * fix(sample-data): wrong imports in sample data generator * fix(sample-data): define a path for fim files and registries that matches with the alerts sample data * fix(fim): error generating link to explore events * feat: enhance Explore events button getting the href * fix(fim): documentation link * remove: title en prompt * fix(fim): remove h2 from prompt title * fix(discover-table): workaround a problem when rendering some tables and the index pattern has the expected fields WORKAROUND: - Avoid the table is rendered until the fetch data request got results - Use displayOnlyNoResultsCalloutOnNoResults=true trusting in the fetch data request got no results. * fix(prettier): code format * fix(changelog): move entries * fix(test): monaco transpiling tests * fix(settings): move fim.pattern and system_inventory.pattern settings from category and remove unused pattern settings * fix(sample-data): some bugs related to refactor * fix: warnings related to unexpected HTML attributes in EuiDataGrid and EuiPanel * fix: infine state change loop in EuiDataGrid caused by flex containers in FIM * fix: match the height of table cell items to the tallest item * feat: enhance WzTableFlexGroup and WzTableFlexItem * feat: replace visualiztion in IT hygiene dashboard * feat: move default columns in packages table of IT Hygiene * feat: add mobile responsible to WzTableFlexRow and WzTableFlexItem components * fix(it-hygiene): prompt error message validating index pattern creation * fix: refactor the data source repository to use the setting key value instead, fix the related to vulnerabilities * chore: add a warning message related to components are remounted when changing the window width under the EuiPageTemplate * fix(vulnerabilities): export vulnreabilities data source name * feat(it-hygiene): create different inventory tabs, settings for index pattern and index pattern creation checks through HOCs * feat: add useWithManagedSearchBarFilters hook that integrates with WzSearchBar * fix(sample-data): replace the wazuh.cluster.name in the sample data to wazuh * feat: add missing index * feat(it-hygiene): split components in the inventory view * update .gitignore to exclude virtual environment files Adds entries to ignore Python virtual environment directories and files, including bin, site-packages, pyvenv.cfg, and lib64. Improves repository cleanliness by preventing unnecessary files from being tracked. * refactor helper for office365 field mappings Replaces generic type annotations with more specific ones Renames variables for clarity and consistency Simplifies data mappings structure for readability and maintainability * remove managedFilters usage in inventory component Eliminates dependency on managedFilters by replacing it with an empty array for filterInputs. Simplifies the component props and ensures consistent behavior. * improve value suggestion hook flexibility and performance Refactors the hook to accept an optional index pattern as a parameter. Removes unused imports and updates type declaration for better clarity. Optimizes filtering logic and ensures proper handling of empty options. Fixes potential issues with asynchronous value suggestions. * refactor multi-select component for enhanced usability Replaces hardcoded switch values with a typed constant for clarity Extends props to support index patterns and drill-down filtering Improves item handling logic and enforces consistent code style Ensures compatibility with updated value suggestion hook * refactor custom search bar for enhanced flexibility Refactors custom search bar component by introducing a `FilterInput` interface for better type safety and flexibility. Enhances state management with stricter typing and adjusts logic to support optional filter drill-down values. Updates dependency array in `useEffect` hooks to include missing variables, ensuring proper reactivity. * feat(it-hygiene): add packages and system main tabs * feat(search-bar): add managed combo box input * fix(it-hygiene): remome old iteration of inventory and rever change related to managed filters * feat(it-hygiene): change size for subtabs * feat(it-hygiene): enhance managed filters * change(it-hygiene): sub tabs navigation based on search URL parameter * feat(custom-search-bar): add support to customize the flex items of custom inputs * fix: remove hardcoding field type in useValuSuggestion and use the field from the index pattern instead * feat: add value suggestions for fields that are not supported by the autocomplete.getValueSuggestions frunction provided by the platform * chore: remove unused variable * Prevents rendering dashboard without data source Adds a check to ensure the data source exists before attempting to render the dashboard panels. This avoids potential issues when panel configurations are present but the data is not yet available. * Adds default style constants for saved visualizations Introduces shared style constants to provide default styling configurations for saved visualization components. * Adds saved vis data creation utilities Introduces helper functions to generate the search source and index pattern references required for saved visualizations. * Adds types for saved visualizations Introduces TypeScript interfaces to define the structure and configuration of saved visualization objects. Ensures type safety and clarifies the data model for visualization parameters and data sources within the IT Hygiene feature. * Adds visualization generation helper Introduces a utility function to create structured visualization configuration objects based on input parameters like dimensions, position, and saved visualization data. Includes validation for maximum width. * change(it-hygiene): managed filters * change(it-hygiene): managed filters * Adds dashboard visualizations for Networks inventory Defines metric and metrics visualizations for unique IPs, average route priority, UDP traffic percentage, and DHCP-enabled interfaces. Integrates these panels into the Networks inventory view. * Uses constant for visualization height Replaces hardcoded height value in dashboard visualizations with a shared constant. Improves code readability and maintainability. * Types props for network inventory component Adds explicit type annotation for the component props to improve type safety and code clarity. * Updates UDP metric in network overview dashboard Replaces the visualization showing the percentage of UDP traffic with a metric counting interfaces operating only on UDP. Modifies the visualization configuration, including title, ID, type, and aggregation logic, to reflect the new metric. * Shortens labels in DHCP network interfaces viz Updates labels for the count metric and DHCP filter for improved brevity and readability in the network overview dashboard. * Adds packet loss rate panel to network interfaces inventory Defines a metric visualization to calculate and display the global packet loss rate based on ingress/egress drops and packets. Integrates this visualization as a dashboard panel within the network interfaces inventory view. * Refactors network dashboard function name Renames the function used to retrieve dashboard panels for the networks inventory to enhance clarity and specificity. * remove: unused styles file * fix: minor fixes * fix(vulnerabilites): error in inventory caused by post fixed filters * fix(changelog): rephrase entries * Calculates packet loss rate as ratio Updates the Painless script for global packet loss rate to return a raw ratio instead of a percentage. Improves script readability. * Adds inactive interfaces count to dashboard Introduces a new metric visualization. Displays the total count of network interfaces with an 'Inactive' state. Places the visualization on the Network Interfaces overview tab. * Arrange network visualizations horizontally Calculates visualization width and position dynamically based on total width and column count. Ensures visualizations are evenly spaced and aligned in a single row. Replaces hardcoded layout values for better maintainability. * Adds 'Unknown' state visualization to network interfaces Introduces a metric visualization showing the count of network interfaces with an 'Unknown' state. Refactors visualization layout calculations using constants for responsive sizing and adjusts existing elements accordingly. * Add wireless interface count visualization Introduces a new metric visualization to the network interfaces dashboard. This visualization displays the total count of interfaces identified as type 'wireless'. * Adds comment explaining error monitoring Includes a comment to clarify that the logic for monitoring packet drops can also be applied to network interface errors. * feat: add useEffectAvoidOnNotMount hook * feat: add table ID to IT Hygiene and FIM inventory tables * Refactors dashboard KPI panel creation Extracts the logic for generating dashboard Key Performance Indicator (KPI) panels into a reusable function. This centralizes layout calculations, dynamically determining panel width based on the total number of KPIs. Simplifies the network interfaces dashboard implementation by utilizing the new shared function. * Refactors network dashboard KPI creation Uses the `createDashboardPanelsKPIs` helper function to generate KPI panels. Removes manual layout calculations, simplifying the dashboard definition. * Renames dashboard width constant for clarity Updates the constant name related to dashboard width constraints to improve code readability. * Improves uniqueness of dashboard panel keys Generates keys using the visualization ID along with its index. Prevents potential key collisions or instability by incorporating the visualization ID into the key generation. * Rename function to build dashboard KPI panels Renames `createDashboardPanelsKPIs` to `buildDashboardKPIPanels` for improved clarity and consistency. Updates usages of the function across related files. * Renames network dashboard visualization functions Improves clarity and consistency in function names used for generating network visualization states. * Adds dashboard panels to protocols inventory Integrates the ability to display relevant dashboard panels within the network protocols inventory table. * Rename network interface metric functions for clarity Standardizes the naming convention for functions generating visualization states for network interface metrics. Updates function suffixes to consistently use 'Metric' for improved readability and uniformity. * Clarifies naming for network metric functions Renames functions generating network dashboard data visualizations to use the suffix 'Metric' instead of 'Visualization' for improved clarity and consistency. * Renames DHCP metric function for clarity Updates the function name to specify 'Interfaces' instead of 'Network' to more accurately reflect the DHCP enabled metric, improving code readability. * Refactor shared dashboard visualization functions Moves `getVisStateNetworkAveragePriorityMetric` and `getVisStateDHCPEnabledInterfacesMetric` to a common dashboard utility file. Reduces code duplication between the networks and protocols inventory dashboards. * Adds wireless network interfaces metric Introduces a new Key Performance Indicator (KPI) to display the count of wireless network interfaces. Integrates the new metric into the networks protocols dashboard tab. * Adds dynamic dashboard panels to processes inventory Passes `getDashboardPanels` prop to enable fetching specific dashboard configurations for the processes tab. * Parameterize visualization state ID and title Sets the visualization state ID and title dynamically based on the process state. This ensures uniqueness when handling different process states. * Integrates process panels into port inventory Reuses dashboard panel generation from the processes tab for the ports inventory view. * Updates dashboard panels for ports inventory Corrects the function used to retrieve dashboard panels, ensuring the appropriate visualization is displayed for the ports inventory. * Adds UDP-only transport metric to ports dashboard Introduces a new KPI visualization to display the count of network transports operating exclusively over UDP. Adds explicit return type annotation to an existing visualization function. * Adds dashboard panels for packages tab Integrates the specific dashboard panel configuration for the overview packages tab. * Adds dashboard panel retrieval to system inventory Passes a function to dynamically fetch dashboard panels for the inventory table component. * Adds dashboard panels to system hardware inventory Integrates dashboard panel retrieval for the hardware inventory tab using the `getDashboardPanels` prop. * Fixes data grid cell filter malfunction Removes memoization (`useMemo`) from the visible column calculation. This prevents an issue where the memoized value caused the data grid cell filter to not work correctly. * Refactors data grid hooks to use index pattern object Updates data grid hooks (`useDataGrid`, `useDataGridColumns`) to accept the `IndexPattern` object directly. Derives `columnSchemaDefinitionsMap` and existence checks internally within these hooks, simplifying prop drilling. Removes the now redundant `indexPatternExists` prop from `useDataGridStatePersistenceManager` and its consumers. * Removes obsolete TODO comment * Refactors data grid hooks to use indexPattern directly Updates `useDataGridColumns` and `useDataGrid` to accept the `indexPattern` object as a prop instead of a pre-processed map of column definitions. Derives column definitions internally within the hooks, simplifying their signatures and usage. Adjusts tests to align with the updated hook APIs. * Ensures data grid column definitions have an ID Sets the `id` property on column schema definitions using the field name. Removes redundant calculation of the column schema map. * Refines type definition for data grid column schema map Updates the type for `columnSchemaDefinitionsMap` from `Record<string, unknown>` to `Record<string, tDataGridColumn`. Improves type safety and code clarity within data grid components. * feat(it-hygiene): replace some inventory visualizations * fix: typo * feat(it-hygiene): add viuslization for hotfixes inventory * Revert "Refines type definition for data grid column schema map" This reverts commit 2d5c311. * Revert "Ensures data grid column definitions have an ID" This reverts commit 8d89e48. * Revert "Refactors data grid hooks to use indexPattern directly" This reverts commit 75850e2. * Revert "Refactors data grid hooks to use index pattern object" This reverts commit 8306fdf. * Provides default type for data grid state persistence manager Assigns `DataGridState` as the default for the generic type parameter, removing the need to specify it explicitly in common use cases. * Adds module ID prop to data grid components Passes a unique identifier (`moduleId` or `tableId`) to the `useDataGrid` hook. * Persists data grid page size Retrieves the configured page size from local storage state management when the data grid initializes. Ensures user preference for page size persists between sessions. * Standardizes table identifier prop name Updates the `tableId` prop to `tableID` for consistency with naming conventions. * Disables ESLint in workspace settings Turns off the ESLint extension within the VS Code workspace. * fix(table): reset pagination when change some filter and add a reload to refetch the data * feat(it-hygiene): wrap dashboard to discover no results callout - Refactor TableDataGrid component and create a new hook to create the new dashboard layout * fix: console error related to unexpected prop * fix(multi-select): multiple request to get the suggestions * fix(it-hygiene): dashboard responsive and error viewing the document details * remove(it-hygiene): remove direct selector for network.ip due to perfomance problems getting the suggestions using a query with script * change(it-hygiene): kpi visualization of dashboard * fix(it hygiene): dashboard title and id * chore(it-hygiene): removed number field from direct filters * feat: add format map to some number fields as bytes * change(it-hygiene): replace some visualization in dashboard and inventories * Prevents unnecessary suggestion updates Removes options from suggestion hook dependencies to avoid re-fetching when only options change. * fix: replace logic ensuring the component is mounted in agent welcome view * Apply suggestions from code review Remove console.log Co-authored-by: Guido Modarelli <[email protected]> * fix: variable value * fix: comment * chore: remove unused imports * feat: enhance comment * change(it-hygiene): icon * fix(it-hygiene): refactor inventory and dashboard tabs to mitigate the problem with embedables destroyed and unable to create dashboards * fix(vulnerabilities): refactor inventory and dashboard tabs to mitigate the problem with embedables destroyed and unable to create dashboards * changelog: add entry * Sets filter button size to small Sets the size property of the filter button component to 's' for a smaller appearance. * fix(sample-data): match file path in alerts and invnetories used in the FIM: recent events table of agent overview * change: rename useEffectAvoidOnNotMount to useEffectEnsureComponentMounted * fix: missing error information in FIM files inventory document details * fix: add data source guard to FIM file flyout * remove(it-hygiene): visualization of dashboard * test: add for new settings * fix(prettier): wrong file format * Add sample data to file integrity monitoring, IT Hygiene and vulnerabilities inventory (#7373) * feat(sample-data): add sample data generation for various inventory and FIM datasets This commit introduces new modules for generating sample data for different inventory and FIM (File Integrity Monitoring) datasets. The modules include functions to generate random data for agents, hosts, packages, processes, networks, and more. Additionally, JSON templates for Elasticsearch mappings are provided to ensure proper indexing of the generated data. This feature is essential for testing and development purposes, allowing for realistic data simulation in the Wazuh ecosystem. * feat(sample-data): add file integrity monitoring sample data support * feat(inventory): add sample inventory data and configurations Introduce sample inventory data for various categories such as hardware, hotfixes, interfaces, networks, packages, ports, processes, protocols, and system. This includes adding new constants, routes, and sample data generation logic to support inventory-related functionalities. Additionally, remove unnecessary console log and update module paths for consistency. * refactor: update constants and improve sample alerts indexing Update WAZUH_SAMPLE_ALERTS_DEFAULT_NUMBER_ALERTS to 3000 and refactor WAZUH_SETTING_FIM_FILES_PREFIX and WAZUH_SETTING_FIM_REGISTRIES_PREFIX to include dataSet. Improve sample alerts indexing by using Promise.all for concurrent operations and adding error handling. * Add the template when adding sample data * refactor(sample-data): consolidate shared utility functions and rename generateSampleData Moved common utility functions like `generate_random_agent`, `generate_random_host`, and `generate_random_wazuh` to a new `shared-utils.js` file to reduce code duplication. Renamed `generateSampleData` to `generateAlertsWithDataset` for better clarity and consistency. Simplified the `generateAlerts` function by removing redundant logic related to sample data generation. * feat(sample-data): add CLI tool for generating sample data Introduce a new CLI tool in the sample-data scripts directory to generate sample data for Wazuh. The tool supports multiple datasets, formats, and output options, including ndjson and bulk-api. This enhances the ability to create and manage sample data programmatically. * chore: remove sample-data scripts and related files This commit removes the sample-data scripts and all related files, including configuration, templates, and utility modules. The removal is part of cleaning up unused or outdated code to improve maintainability and reduce clutter in the codebase. * Fix prettier * Fix prettier * refactor(cli): improve code readability by formatting strings Refactor the CLI scripts to enhance readability by breaking long strings into multiple lines. This change does not affect functionality but makes the code easier to maintain and understand. * refactor(sample-data): rename functions and variables for clarity and consistency Rename `generateAlertsWithDataset` to `generateSampleDataWithDataset` and update related variables to reflect the broader scope of sample data generation. This change improves code readability and aligns with the functionality of generating various types of sample data, not just alerts. * feat(visualize): add sample data warning component to dashboards Introduce a new `SampleDataWarning` component to display a warning when dashboards contain sample data. This enhances user awareness and provides a link to configure sample data settings. * refactor: remove debug log and update sample data generation Removed the debug console log in the WazuhElasticCtrl class and updated the sample data generation logic to include network and observer details instead of protocol information. This improves code cleanliness and aligns with the updated data structure requirements. * refactor(sample-data): rename functions to use camelCase for consistency Rename all snake_case function names to camelCase to align with JavaScript naming conventions. This improves code readability and maintainability across the sample data generation modules. Additionally, remove unused default constants to simplify the codebase. * feat(vulnerabilities): add sample data and configurations for vulnerability detection Introduce new sample data, templates, and configurations for vulnerability detection. This includes adding a new dataset for vulnerabilities, updating constants, and enhancing the random data generation utility to support vulnerability-related fields. The changes ensure that vulnerability data can be sampled and visualized within the system. * refactor(sample-data): rename endpoints and variables for clarity Update endpoint paths from `/elastic/samplealerts` to `/indexer/sampledata` and rename related variables to reflect the broader scope of sample data handling. This change improves consistency and clarity in the codebase. * refactor(wazuh-elastic): optimize index name generation and sample data handling Replace synchronous loop with Promise.all for index name generation to improve performance. Refactor sample data processing logic to handle multiple data sets and templates more efficiently. Simplify bulk operation response handling by removing redundant logging. * refactor(sample-data-warning): update to support multiple categories The SampleDataWarning component has been refactored to handle multiple sample data categories. This change ensures that the component can check for the existence of sample data across multiple categories and display a warning if any of them are found. The changes include updating the component's props, logic, and API calls to support this functionality. Additionally, the component has been integrated into various dashboards and modules to provide consistent sample data warnings across the application. * refactor(wazuh-elastic): rename sample alerts to sample data for clarity This change renames all references to "sample alerts" to "sample data" in both routes and controllers. The update improves clarity and consistency in the codebase by using a more generic term that better represents the data being handled. * feat: add script to update template files from GitHub repository This commit introduces a new script that downloads and updates template.json files from a public GitHub repository. The script reads the version from a VERSION.json file, determines the branch, and updates the templates for all relevant datasets. It also creates backups of existing files before overwriting them and provides a summary of the update process. * feat(inventory): add SampleDataWarning component to ITHygieneInventoryDashboard The SampleDataWarning component has been added to alert users when sample data is being used, specifically for the WAZUH_SAMPLE_INVENTORY_AGENT category. This improves user awareness and transparency regarding the data being displayed. * refactor(sample-data): enhance data generation and template structure Refactor sample data generation to include additional fields and improve template structure. Added new fields such as 'type' in system data, 'args_count' and 'start' in processes, and 'multiarch', 'priority', 'size', 'source', and 'type' in packages. Simplified template structure by moving 'order' to 'priority' and consolidating settings and mappings under 'template'. This improves data richness and consistency across datasets. * refactor(update-templates-sample-data): update URLs and simplify template file naming Update the GitHub repository base URLs to point to the correct directories for templates. Simplify the template file naming logic and remove the backup creation step to streamline the file saving process. * Fix test * refactor(wazuh-elastic): remove unused sample data endpoint and related code The `/indexer/sampledata` endpoint and its associated controller methods (`haveSampleData`, `buildVisualizationsRaw`, `buildClusterVisualizationsRaw`) were removed as they are no longer used. This cleanup improves maintainability by reducing unnecessary code. * feat(scripts): add support for branch argument in update script Add command line argument parsing to allow specifying a branch when running the update-templates-sample-data.js script. This provides flexibility for testing or updating templates from different branches. * Fix prettier * Add changelog * refactor: centralize random data generation and improve error handling - Export WAZUH_STATUS_CODES enum for reuse across modules - Replace direct Math.random usage with centralized random utility functions - Refactor plugin settings to use a common function for sample data prefixes - Improve error handling in WazuhElasticCtrl by using HTTP_STATUS_CODES and WAZUH_STATUS_CODES * change(sample-data): path for FIM files inventories match with path in the alerts sample data * change(sample-data): move script to update the sample data template files * fix: minor changes in the sample data * change(it-hygiene): settings related to index name prefix for sample data indices * chore(changelog): add entry * fix(sample-data): add instructions to create the index with the expected mappings for the dataset CLI * fix(sample-data): add requirements * fix(sample-data): error in Sample data app due to unregistered setting * fix: move sample data callout * test(settings): add tests for new settings * fix(eslint): error related to installation of unspecified version of eslint * Revert "fix(eslint): error related to installation of unspecified version of eslint" This reverts commit 08ea349. * Fixes typo in README Corrects a spelling error in the sample data documentation. --------- Co-authored-by: Antonio David Gutiérrez <[email protected]> Co-authored-by: Guido Modarelli <[email protected]> * Refine Inventory visualizations * fix(it-hygiene): data was not requested in inventories * fix(it-hygiene): fix dashboard was not displayed due to the generic request was not done * Refine dashboard visualizations * feat(it-hygiene): add format map for some index pattern fields * Refine visualizations * refactor(sample-data): simplify sample data generation and deletion logic Refactor the sample data generation and deletion logic to improve maintainability and clarity. This includes removing redundant code, simplifying the generation process, and enhancing error handling during deletion. The changes also ensure consistent handling of index patterns and data sets across the codebase. * Clean code comments * Prettier * Fix prettier * fix(it-hygiene): use the registry.key as value to set the syscheck.path field to filter in the alerts and use the registry.key exist filter to get the related data in the main table * fix(fim): add a filter to relation fim registries inventory data with alerts WORKAROUND: this uses a wildcard query, because the alerts contain a prefix related to the hive (HKEY_LOCAL_MACHINE, etc...), that is not included in the registr.key used as "file" parameter of this method. The registry.hive of inventory data includes a reference to the hive but this uses an acronym (HKLM instead of HKEY_LOCAL_MACHINE) in the current state, so we could not rebuild the expected syscheck.path in the alert. This should be changed if: - the registry.hive is fixed to represent the real hive name (HKEY_LOCAL_MACHINE, etc...) composing the syscheck.path = registry.hive + "\" + registry.key - registry.key or other property includes all the path to the registry.key so the syscheck.path = registry.key or <related_prop> See wazuh/wazuh#27903 (comment) --------- Co-authored-by: Guido Modarelli <[email protected]> Co-authored-by: Guido Modarelli <[email protected]> Co-authored-by: Ian Yenien Serrano <[email protected]> Co-authored-by: Federico Rodriguez <[email protected]>
…lnerabilites (#7449) * fix(sample-data): define wazuh.cluster.name property when the manager is in manager mode * chore(changelog): add entry
Merge 4.12.1 into 4.12.2 > [!CAUTION] > Merge PR strategy: Create a merge commit
Merge 4.12.2 into 4.13.0 > [!CAUTION] > Merge PR strategy: Create a merge commit
|
|
|
Machi3mfl
approved these changes
May 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
guidomodarelli
approved these changes
May 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🟢
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Merge 4.13.0 into 4.14.0