subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
# Build the environment by sourcing the bash file env_command = f"source {ros_setup_path} && env" try: env_proc = subprocess.run(['bash', '-c', env_command], stdout=subprocess.PIPE, text=True, check=True) ros_env = {} for line in env_proc.stdout.splitlines(): if '=' in line:- Confidence
- 90% confidence
- Finding
- env_proc = subprocess.run(['bash', '-c', env_command], stdout=subprocess.PIPE, text=True, check=True)
