From 87df3a9282d8848672f433f8951ad0487837cdfe Mon Sep 17 00:00:00 2001 From: ymugoder <125180503+ymugoder@users.noreply.github.com> Date: Tue, 4 Mar 2025 19:45:16 +0530 Subject: [PATCH] Potential fix for code scanning alert no. 5: Uncontrolled command line Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- insta_monitering/subpinsta.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/insta_monitering/subpinsta.py b/insta_monitering/subpinsta.py index 6e234063c75..6fdaa5f61a1 100644 --- a/insta_monitering/subpinsta.py +++ b/insta_monitering/subpinsta.py @@ -18,8 +18,8 @@ def instasubprocess(user, tags, type, productId): + " " + productId ) - command = child_env + " " + file_pocessing - result = subprocess.Popen(command, shell=True) + command = [child_env, os.path.join(os.getcwd(), "insta_datafetcher.py"), user, tags, type, productId] + result = subprocess.Popen(command) result.wait() except: print("error::instasubprocess>>", sys.exc_info()[1])