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

Fix high-severity security vulnerabilities found in allure-docker-api/app.py #270

Open
mikliapko opened this issue Dec 5, 2024 · 0 comments

Comments

@mikliapko
Copy link

mikliapko commented Dec 5, 2024

The repository was scanned on the subject of security vulnerabilities using Snyk tool.

Here is a list with high severity vulnerabilities:

  1. CWE-23: Unsanitized input from an HTTP parameter flows into open, where it is used as a path. This may result in a Path Traversal vulnerability and allow an attacker to write arbitrary files.

    file = open(emailable_report_path, "w")

  2. CWE-23: Unsanitized input from an HTTP parameter flows into flask.send_file, where it is used as a path. This may result in a Path Traversal vulnerability and allow an attacker to write arbitrary files.

    report = send_file(emailable_report_path, as_attachment=True)

  3. CWE-23: Unsanitized input from an HTTP parameter flows into shutil.rmtree, where it is used as a path. This may result in a Path Traversal vulnerability and allow an attacker to write arbitrary files.

    shutil.rmtree(project_path)

  4. CWE-78: Unsanitized input from an HTTP parameter flows into os.popen, where it is used as a shell command. This may result in a Command Injection vulnerability.

    tmp = os.popen('ps -Af | grep -w {}'.format(project_id)).read()

Is it possible to fix them?
Thanks!

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

No branches or pull requests

1 participant