TGmeetup / TGmeetup

Detected subprocess popen call with shell equals True BAN-B602
Security
Major
5 years ago5 years old
subprocess call with shell=True identified, security issue.
 25            mydir = str(output.splitlines())
 26        cmd = "du -a " + mydir + "/community " + mydir + \
 27            "/conference | grep package.json | awk '{print $2}'"
 28        output = subprocess.check_output(cmd, shell=True)
 29        gf_all = []
 30        for gf in output.splitlines():
 31            try:
subprocess call with shell=True identified, security issue.
 18class GetFiles():
 19    def get_group_files(self):
 20        cmd = "find ~/ -name TGmeetup | sed -n '1p'"
 21        output = subprocess.check_output(cmd, shell=True)
 22        try:
 23            mydir = str(output.splitlines()).split("'")[1]
 24        except BaseException:
subprocess call with shell=True identified, security issue.
 33        pass
 34    cmd = "du -a " + mydir + "/community " + mydir + \
 35        "/conference | grep package.json | awk '{print $2}'"
 36    output = subprocess.check_output(cmd, shell=True)
 37    gf_all = []
 38    for gf in output.splitlines():
 39        try:
subprocess call with shell=True identified, security issue.
 63            pass
 64        cmd = "du -a " + mydir + "/community " + mydir + "/conference | grep " + \
 65            country + "/" + name + "/package.json | awk '{print $2}'"
 66        organization_file = subprocess.check_output(cmd, shell=True)
 67        data = json.load(
 68            open(str(organization_file.splitlines()).split("'")[1]))
 69        return data
subprocess call with shell=True identified, security issue.
 42            pass
 43        cmd = "du -a " + mydir + "/community " + mydir + "/conference | grep " + \
 44            country + " | grep package.json | awk '{print $2}'"
 45        organization_file = subprocess.check_output(cmd, shell=True)
 46        all_org = []
 47        for org in organization_file.splitlines():
 48            try: