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

Remove unused subprocess imports in core/utils.py and core/common.py #12101

Conversation

mcarmona99
Copy link
Contributor

This pull request is part of #10125.

As it was said in wazuh/wazuh-qa#2330 (comment), one of the required fixes has to do with a rebase conflict in some of the pull requests related to this epic.

In this case, this pull request removes the from subprocess import CalledProcessError, check_output line from framework/wazuh/core/utils.py since it's not being used and it's reported as a new framework flaw. It also removes import subprocess from framework/wazuh/core/common.py since it's not being used and it's known as a false positive.

@mcarmona99 mcarmona99 self-assigned this Feb 4, 2022
@mcarmona99 mcarmona99 force-pushed the dev-fix-python-code-vulnerabilities branch from 50df6c8 to 34905eb Compare February 4, 2022 14:33
Copy link
Contributor

@Kondent Kondent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@davidjiglesias davidjiglesias merged commit 8520e29 into dev-fix-python-code-vulnerabilities Feb 7, 2022
@davidjiglesias davidjiglesias deleted the feature/remove-unused-subprocess-imports branch February 7, 2022 16:30
davidjiglesias pushed a commit that referenced this pull request Feb 11, 2022
* Handle more exceptions in the wodles and remove duplicated functions from framework file (#10478)

* Remove unused functions from framework common.py

* Minor fixes

#10155

* Add requested changes

#10155

* Fix random values at cluster zip filename to be cryptographically secure (#10710)

* Changed permission mask (#10636)

* Remove execute method from core/utils.py since it is not being used (#10740)

* Fix tempfiles handling at `framework/wazuh/core/configuration.py` and `framework/wazuh/core/utils.py` (#10544)

* Fix tempfiles handling at configuration.py and utils.py

* Add requested changes

* Fixed flaws in XML calls at framework files (#10635)

* Fix possible XML flaws

* Add requested changes

* Fix a possible flaw regarding `try`, `except` and `pass` code block (#11951)

* Fix a possible flaw regarding try, except and pass code block

* Add requested changes

* Remove unused `subprocess` imports in `core/utils.py` and `core/common.py` (#12101)

* Remove execute method from core/utils.py since it is not being used (#10740)

* Fixed flaws in XML calls at framework files (#10635)

* Fix possible XML flaws

* Add requested changes

* Remove unused imports caused by rebase conflicts

Co-authored-by: Alexis Rivas <84642680+Kondent@users.noreply.github.com>

* Fix a rebase conflict related with #10782 and #10710

Co-authored-by: Gonzalo Abril Paniza <gonzalo.abril@wazuh.com>
Co-authored-by: Manuel Carmona Pérez <manuel.carmona@wazuh.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants