Skip to content

Can we use shell=False? #102

@jsf9k

Description

@jsf9k

Can we use the default of shell=False here?

subprocess.call(
"docker run --rm --volume /etc/cyhy:/etc/cyhy --volume {}:/home/cyhy {}/cyhy-reports:stable cyhy-report -h".format(
WEEKLY_REPORT_BASE_DIR, NCATS_DHUB_URL
),
shell=True,
)

shell=True means that the subprocess Python module spawns the command using the shell process, which makes it much easier for a malicious actor to execute commands.

Originally posted by @dv4harr10 in #101 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementThis issue or pull request will add or improve functionality, maintainability, or ease of use

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions