Skip to content
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

Update API script file name #5351

Merged
merged 2 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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))
- Deleted `behind_proxy_server` API config test. ([#1065](https://github.com/wazuh/wazuh-qa/pull/1065))
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/scans/code_analysis/known_flaws/known_flaws_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -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'",
Expand Down