KOSASIH / pipfs-hub

Detected subprocess popen call with shell equals True BAN-B602
Security
Major
4 months ago4 months old
subprocess call with shell=True identified, security issue.
 7    def test(self):
 8        """Test the project."""
 9        test_command = 'mvn test'
10        subprocess.run(test_command, cwd=self.project_dir, shell=True)
subprocess call with shell=True identified, security issue.
 8    def deploy(self):
 9        """Deploy the project to the target environment."""
10        deploy_command = f'mvn deploy -Dtarget-env={self.target_env}'
11        subprocess.run(deploy_command, cwd=self.project_dir, shell=True)
subprocess call with shell=True identified, security issue.
 7    def build(self):
 8        """Build the project."""
 9        build_command = 'mvn clean package'
10        subprocess.run(build_command, cwd=self.project_dir, shell=True)