Detected subprocess popen call with shell equals True BAN-B602
Security
Major
4 days ago2 years old
subprocess call with shell=True identified, security issue.
62        import platform
63        import subprocess
64        subprocess.run(f'title Python {platform.python_version()} Shell',
65                       shell=True, check=True)66        del subprocess
67        del platform
68    args = []
subprocess call with shell=True identified, security issue.
123
124                creation_date = path.stat().st_mtime
125                cmd = self._command(filename, text, jumpIndex)
126                subprocess.run(cmd, shell=platform == 'win32', check=True)127                last_change_date = path.stat().st_mtime
128
129                if last_change_date == creation_date:
subprocess call with shell=True identified, security issue.
120                except ModuleNotFoundError:
121                    check_call(f'pip install {module}', shell=True)
122                else:
123                    check_call(f'pip install --upgrade {module}', shell=True)124        else:
125            for module in ('build', 'twine'):
126                try:
subprocess call with shell=True identified, security issue.
118                try:
119                    import_module(module)
120                except ModuleNotFoundError:
121                    check_call(f'pip install {module}', shell=True)122                else:
123                    check_call(f'pip install --upgrade {module}', shell=True)
124        else: