Skip to content

Codebase Refactor: Remove shell=True from subprocess calls #2555

@arav-agarwal2

Description

@arav-agarwal2

In general, using shell=True can lead to security issues. It's best to remove these calls when possible.

Using Ruff rule S602:

compliance/TEST01/run_verification.py:124:17: S602 subprocess call with shell=True identified, security issue
compliance/TEST01/run_verification.py:165:17: S602 subprocess call with shell=True identified, security issue
compliance/TEST04/run_verification.py:77:17: S602 subprocess call with shell=True identified, security issue
compliance/TEST07/run_verification.py:194:17: S602 subprocess call with shell=True identified, security issue
language/bert/accuracy-squad.py:524:32: S602 subprocess call with shell=True identified, security issue
language/bert/run.py:210:40: S602 subprocess call with shell=True identified, security issue
loadgen/version_generator.py:57:91: S602 subprocess call with shell=True identified, security issue
retired_benchmarks/speech_recognition/rnnt/run.py:120:36: S602 subprocess call with shell=True identified, security issue
retired_benchmarks/translation/gnmt/tensorflow/nmt/utils/evaluation_utils.py:165:45: S602 subprocess call with shell=True identified, security issue
retired_benchmarks/translation/gnmt/tensorflow/nmt/utils/evaluation_utils.py:166:67: S602 subprocess call with shell=True identified, security issue
retired_benchmarks/translation/gnmt/tensorflow/nmt/utils/evaluation_utils.py:180:48: S602 subprocess call with shell=True identified, security issue
retired_benchmarks/translation/gnmt/tensorflow/run_task.py:131:36: S602 subprocess call with shell=True identified, security issue
retired_benchmarks/vision/medical_imaging/3d-unet-brats19/run.py:138:36: S602 subprocess call with shell=True identified, security issue
vision/medical_imaging/3d-unet-kits19/run.py:185:36: S602 subprocess call with shell=True identified, security issue
Found 14 errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions