Skip to content

Potentially unsafe subprocess execution (shell=True) #182

@mikewhiteman

Description

@mikewhiteman

Hello 👋 - Any particular reason that subprocess needs to be run with Shell=True?

An example:

https://github.com/OrkoHunter/pep8speaks/blob/837643bb95c18a5364cd0539b0f8edaeb3813a76/pep8speaks/helpers.py#L234

Shell=True is a more dangerous way of invoking subprocess that exposes you to potential command injection attacks. If you're not using any shell specific features (e.g. |), changing it to shell=False is a pretty easy fix.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions