-
Notifications
You must be signed in to change notification settings - Fork 197
Add sample data to File integrity monitoring and inventory #7373
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
Draft
yenienserrano
wants to merge
29
commits into
change/wz-27903-fim-system-inventory-tables-indexer-data
Choose a base branch
from
enhancement/7369-sample-data-it-hygiene-fim-vulnerabiities
base: change/wz-27903-fim-system-inventory-tables-indexer-data
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
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
…nd 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.
9 tasks
…a' into enhancement/7369-sample-data-it-hygiene-fim-vulnerabiities
…a' into enhancement/7369-sample-data-it-hygiene-fim-vulnerabiities
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.
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.
…e 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.
…a' into enhancement/7369-sample-data-it-hygiene-fim-vulnerabiities
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.
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.
…a' into enhancement/7369-sample-data-it-hygiene-fim-vulnerabiities
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.
…a' into enhancement/7369-sample-data-it-hygiene-fim-vulnerabiities
…a' into enhancement/7369-sample-data-it-hygiene-fim-vulnerabiities
… 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.
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.
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.
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.
…bility 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.
…a' into enhancement/7369-sample-data-it-hygiene-fim-vulnerabiities
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.
…a' into enhancement/7369-sample-data-it-hygiene-fim-vulnerabiities
…ta 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.
|
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.
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.
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.
|
|
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
Adds the option to add sample data for File integrity monitoring, Inventory and Vulnerability.
Issues Resolved
Evidence
UI
CLI
Test
Check List