From 820819dcd5b44094665961f03cd58d90ff0d4efe Mon Sep 17 00:00:00 2001 From: GGP1 Date: Wed, 8 May 2024 12:58:18 -0300 Subject: [PATCH 1/2] Update API script file name --- deps/wazuh_testing/wazuh_testing/tools/performance/binary.py | 2 +- .../test_config/test_drop_privileges/test_drop_privileges.py | 4 ++-- tests/scans/code_analysis/known_flaws/known_flaws_api.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deps/wazuh_testing/wazuh_testing/tools/performance/binary.py b/deps/wazuh_testing/wazuh_testing/tools/performance/binary.py index eb02eef076..17b3fdb977 100644 --- a/deps/wazuh_testing/wazuh_testing/tools/performance/binary.py +++ b/deps/wazuh_testing/wazuh_testing/tools/performance/binary.py @@ -74,7 +74,7 @@ def get_process_pids(cls, process_name, check_children=True) -> list: # These two binaries are executed using the Python interpreter instead of # directly execute them as daemons. That's why we need to search the .py file in # the cmdline instead of searching it in the name - if process_name in ['wazuh_clusterd', 'wazuh-apid']: + if process_name in ['wazuh_clusterd', 'wazuh_apid']: if any(filter(lambda x: f'{process_name}.py' in x, proc.cmdline())): pid = proc.pid break diff --git a/tests/integration/test_api/test_config/test_drop_privileges/test_drop_privileges.py b/tests/integration/test_api/test_config/test_drop_privileges/test_drop_privileges.py index d41e290f4c..f3143c0527 100644 --- a/tests/integration/test_api/test_config/test_drop_privileges/test_drop_privileges.py +++ b/tests/integration/test_api/test_config/test_drop_privileges/test_drop_privileges.py @@ -128,9 +128,9 @@ def test_drop_privileges(tags_to_apply, get_configuration, configure_api_environ drop_privileges = get_configuration['configuration']['drop_privileges'] # Get wazuh-apid process info - api_process = get_process_cmd('/api/scripts/wazuh-apid.py') + api_process = get_process_cmd('/api/scripts/wazuh_apid.py') if not api_process: - pytest.fail("The process '/api/scripts/wazuh-apid.py' could not be found") + pytest.fail("The process '/api/scripts/wazuh_apid.py' could not be found") # Get current user of the process proc_stat_file = os.stat("/proc/%d" % api_process.pid) diff --git a/tests/scans/code_analysis/known_flaws/known_flaws_api.json b/tests/scans/code_analysis/known_flaws/known_flaws_api.json index dd26854cd1..8fac50b5b6 100644 --- a/tests/scans/code_analysis/known_flaws/known_flaws_api.json +++ b/tests/scans/code_analysis/known_flaws/known_flaws_api.json @@ -17,7 +17,7 @@ }, { "code": " )\n app.add_api('spec.yaml',\n arguments={'title': 'Wazuh API',\n 'protocol': 'https' if api_conf['https']['enabled'] else 'http',\n 'host': api_conf['host'],\n 'port': api_conf['port']\n },\n strict_validation=True,\n validate_responses=False,\n82 pass_context_arg_name='request',\n83 options={\"middlewares\": [response_postprocessing, security_middleware, request_logging,\n84 set_secure_headers]})\n85 \n", - "filename": "api/scripts/wazuh-apid.py", + "filename": "api/scripts/wazuh_apid.py", "issue_confidence": "MEDIUM", "issue_severity": "LOW", "issue_text": "Possible hardcoded password: 'request'", From 199409dfe0c7399ad9fe8dd6e336b719287bae85 Mon Sep 17 00:00:00 2001 From: GGP1 Date: Wed, 8 May 2024 13:09:52 -0300 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c7d9ccd1c..9d8b0994e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file. ### Changed - Enhance the PR template. ([#4881](https://github.com/wazuh/wazuh-qa/pull/4881)) \- (Framework) +- Updated the API script file name. ([#5351](https://github.com/wazuh/wazuh-qa/pull/5351)) \- (Framework) ### Fixed @@ -724,4 +725,4 @@ Release report: https://github.com/wazuh/wazuh/issues/13321 - Avoid problematic race-condition on VD integration tests for Windows [#1047](https://github.com/wazuh/wazuh-qa/pull/1047) - QA Integration tests stabilization [#1002](https://github.com/wazuh/wazuh-qa/pull/1002) ### Deleted -- Deleted `behind_proxy_server` API config test. ([#1065](https://github.com/wazuh/wazuh-qa/pull/1065)) \ No newline at end of file +- Deleted `behind_proxy_server` API config test. ([#1065](https://github.com/wazuh/wazuh-qa/pull/1065))