-
Notifications
You must be signed in to change notification settings - Fork 186
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
Fix management of custom rule and decoders files #5734
Conversation
Legend: UI
Details 🟢 Rules: Create a new file. The file should be saved on `etc/rules` directory.Firefox - ⚫ Safari - ⚫ 🟢 Rules: Import a new file with overwrite enabled. The file should be saved on `etc/rules` directory and should overwrite the previous file if it exists.Firefox - ⚫ Safari - ⚫ 🟢 Rules: Import a new file with overwrite disabled. The file should be saved on `etc/rules` directory and should not overwrite the previous file if it exists.Firefox - ⚫ Safari - ⚫ 🟢 Rules: Read the file content of a file located in ruleset/rules. Its content should be displayed in the rule viewer.Firefox - ⚫ Safari - ⚫ 🟢 Rules: Read the file content of a file located in etc/rules/local_rules.xml. Its content should be displayed in the rule viewer.Firefox - ⚫ Safari - ⚫ 🟢 Rules: Read the file content of a file located in etc/rules/custom_directory/local_rules.xml. Its content should be displayed in the rule viewer. You should have a rule file in that directory, this could require configuration in the manager.Firefox - ⚫ Safari - ⚫ 🟢 Rules: Update the file content of a file located in etc/rules/local_rules.xml. Its content should be updated.Firefox - ⚫ Safari - ⚫ 🟢 Rules: Update the file content of a file located in etc/rules/custom_directory/local_rules.xml. Its content should be updated.Firefox - ⚫ Safari - ⚫ 🟢 Rules: Delete the file content of a file located in etc/rules/local_rules.xml. The file should be deleted.Firefox - ⚫ Safari - ⚫ 🟢 Rules: Delete the file content of a file located in etc/rules/custom_directory/local_rules.xml. The file should be deleted.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Create a new file. The file should be saved on `etc/decoders` directory.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Import a new file with overwrite enabled. The file should be saved on `etc/decoders` directory and should overwrite the previous file if it exists.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Import a new file with overwrite disabled. The file should be saved on `etc/decoders` directory and should not overwrite the previous file if it exists.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Read the file content of a file located in ruleset/decoders. Its content should be displayed in the rule viewer.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Read the file content of a file located in etc/decoders/local_decoders.xml. Its content should be displayed in the rule viewer.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Read the file content of a file located in etc/decoders/custom_directory/local_decoders.xml. Its content should be displayed in the rule viewer. You should have a rule file in that directory, this could require configuration in the manager.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Update the file content of a file located in etc/decoders/local_decoders.xml. Its content should be updated.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Update the file content of a file located in etc/decoders/custom_directory/local_decoders.xml. Its content should be updated.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Delete the file content of a file located in etc/decoders/local_rules.xml. The file should be deleted.Firefox - ⚫ Safari - ⚫ |
Legend: UI
Details 🟢 Rules: Create a new file. The file should be saved on `etc/rules` directory.Safari - ⚫ 🟢 Rules: Import a new file with overwrite enabled. The file should be saved on `etc/rules` directory and should overwrite the previous file if it exists.Safari - ⚫ 🟢 Rules: Import a new file with overwrite disabled. The file should be saved on `etc/rules` directory and should not overwrite the previous file if it exists.Safari - ⚫ 🟢 Rules: Read the file content of a file located in ruleset/rules. Its content should be displayed in the rule viewer.Safari - ⚫ 🟢 Rules: Read the file content of a file located in etc/rules/local_rules.xml. Its content should be displayed in the rule viewer.Safari - ⚫ 🟢 Rules: Read the file content of a file located in etc/rules/custom_directory/local_rules.xml. Its content should be displayed in the rule viewer. You should have a rule file in that directory, this could require configuration in the manager.Safari - ⚫ 🟢 Rules: Update the file content of a file located in etc/rules/local_rules.xml. Its content should be updated.Safari - ⚫ 🟢 Rules: Update the file content of a file located in etc/rules/custom_directory/local_rules.xml. Its content should be updated.Safari - ⚫ 🟢 Rules: Delete the file content of a file located in etc/rules/local_rules.xml. The file should be deleted.Firefox - ⚫ Safari - ⚫ 🟢 Rules: Delete the file content of a file located in etc/rules/custom_directory/local_rules.xml. The file should be deleted.Chrome - ⚫ Safari - ⚫ 🟢 Decoders: Create a new file. The file should be saved on `etc/decoders` directory.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Import a new file with overwrite enabled. The file should be saved on `etc/decoders` directory and should overwrite the previous file if it exists.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Import a new file with overwrite disabled. The file should be saved on `etc/decoders` directory and should not overwrite the previous file if it exists.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Read the file content of a file located in ruleset/decoders. Its content should be displayed in the rule viewer.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Read the file content of a file located in etc/decoders/local_decoders.xml. Its content should be displayed in the rule viewer.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Read the file content of a file located in etc/decoders/custom_directory/local_decoders.xml. Its content should be displayed in the rule viewer. You should have a rule file in that directory, this could require configuration in the manager.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Update the file content of a file located in etc/decoders/local_decoders.xml. Its content should be updated.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Update the file content of a file located in etc/decoders/custom_directory/local_decoders.xml. Its content should be updated.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Delete the file content of a file located in etc/decoders/local_rules.xml. The file should be deleted.Firefox - ⚫ Safari - ⚫ |
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.
TEST:✔️
CR:✔️
LGTM
Legend: UI
Details 🟢 Rules: Create a new file. The file should be saved on `etc/rules` directory.Firefox - ⚫ Safari - ⚫ 🟢 Rules: Import a new file with overwrite enabled. The file should be saved on `etc/rules` directory and should overwrite the previous file if it exists.Chrome - 🟢 Firefox - ⚫ Safari - ⚫ 🟢 Rules: Import a new file with overwrite disabled. The file should be saved on `etc/rules` directory and should not overwrite the previous file if it exists.Firefox - ⚫ Safari - ⚫ 🟢 Rules: Read the file content of a file located in ruleset/rules. Its content should be displayed in the rule viewer.Firefox - ⚫ Safari - ⚫ 🟢 Rules: Read the file content of a file located in etc/rules/local_rules.xml. Its content should be displayed in the rule viewer.Firefox - ⚫ Safari - ⚫ 🟢 Rules: Read the file content of a file located in etc/rules/custom_directory/local_rules.xml. Its content should be displayed in the rule viewer. You should have a rule file in that directory, this could require configuration in the manager.Firefox - ⚫ Safari - ⚫ 🟢 Rules: Update the file content of a file located in etc/rules/local_rules.xml. Its content should be updated.Firefox - ⚫ Safari - ⚫ 🟢 Rules: Update the file content of a file located in etc/rules/custom_directory/local_rules.xml. Its content should be updated.Firefox - ⚫ Safari - ⚫ 🟢 Rules: Delete the file content of a file located in etc/rules/local_rules.xml. The file should be deleted.Firefox - ⚫ Safari - ⚫ 🟢 Rules: Delete the file content of a file located in etc/rules/custom_directory/local_rules.xml. The file should be deleted.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Create a new file. The file should be saved on `etc/decoders` directory.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Import a new file with overwrite enabled. The file should be saved on `etc/decoders` directory and should overwrite the previous file if it exists.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Import a new file with overwrite disabled. The file should be saved on `etc/decoders` directory and should not overwrite the previous file if it exists.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Read the file content of a file located in ruleset/decoders. Its content should be displayed in the rule viewer.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Read the file content of a file located in etc/decoders/local_decoders.xml. Its content should be displayed in the rule viewer.Chrome - 🟢 Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Read the file content of a file located in etc/decoders/custom_directory/local_decoders.xml. Its content should be displayed in the rule viewer. You should have a rule file in that directory, this could require configuration in the manager.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Update the file content of a file located in etc/decoders/local_decoders.xml. Its content should be updated.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Update the file content of a file located in etc/decoders/custom_directory/local_decoders.xml. Its content should be updated.Firefox - ⚫ Safari - ⚫ 🟢 Decoders: Delete the file content of a file located in etc/decoders/local_rules.xml. The file should be deleted.Firefox - ⚫ Safari - ⚫ |
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
Test: #5734 (comment)
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.
TEST:✔️
CR:✔️
LGTM
…o fix/5176-manage-rules-decoders-file
5d16e9b
|
Description
This pull request fixes the management of custom rule or decoder file through the relative directory name.
TODO:
Issues Resolved
#5176
Evidence
[Provide screenshots or videos to prove this PR solves the issues]
Test
Wazuh dashboard
Legend:
⚫: none
🟢: pass
🟡: warning
🔴: fail
⚪: not applicable
UI
etc/rules
directory.etc/rules
directory and should overwrite the previous file if it exists.etc/rules
directory and should not overwrite the previous file if it exists.etc/decoders
directory.etc/decoders
directory and should overwrite the previous file if it exists.etc/decoders
directory and should not overwrite the previous file if it exists.Details
⚫ Rules: Create a new file. The file should be saved on `etc/rules` directory.
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Rules: Import a new file with overwrite enabled. The file should be saved on `etc/rules` directory and should overwrite the previous file if it exists.
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Rules: Import a new file with overwrite disabled. The file should be saved on `etc/rules` directory and should not overwrite the previous file if it exists.
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Rules: Read the file content of a file located in ruleset/rules. Its content should be displayed in the rule viewer.
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Rules: Read the file content of a file located in etc/rules/local_rules.xml. Its content should be displayed in the rule viewer.
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Rules: Read the file content of a file located in etc/rules/custom_directory/local_rules.xml. Its content should be displayed in the rule viewer. You should have a rule file in that directory, this could require configuration in the manager.
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Rules: Update the file content of a file located in etc/rules/local_rules.xml. Its content should be updated.
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Rules: Update the file content of a file located in etc/rules/custom_directory/local_rules.xml. Its content should be updated.
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Rules: Delete the file content of a file located in etc/rules/local_rules.xml. The file should be deleted.
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Rules: Delete the file content of a file located in etc/rules/custom_directory/local_rules.xml. The file should be deleted.
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Decoders: Create a new file. The file should be saved on `etc/decoders` directory.
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Decoders: Import a new file with overwrite enabled. The file should be saved on `etc/decoders` directory and should overwrite the previous file if it exists.
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Decoders: Import a new file with overwrite disabled. The file should be saved on `etc/decoders` directory and should not overwrite the previous file if it exists.
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Decoders: Read the file content of a file located in ruleset/decoders. Its content should be displayed in the rule viewer.
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Decoders: Read the file content of a file located in etc/decoders/local_decoders.xml. Its content should be displayed in the rule viewer.
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Decoders: Read the file content of a file located in etc/decoders/custom_directory/local_decoders.xml. Its content should be displayed in the rule viewer. You should have a rule file in that directory, this could require configuration in the manager.
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Decoders: Update the file content of a file located in etc/decoders/local_decoders.xml. Its content should be updated.
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Decoders: Update the file content of a file located in etc/decoders/custom_directory/local_decoders.xml. Its content should be updated.
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Decoders: Delete the file content of a file located in etc/decoders/local_rules.xml. The file should be deleted.
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Decoders: Delete the file content of a file located in etc/decoders/custom_directory/local_decoders.xml. The file should be deleted.
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
Check List
yarn test:jest