Fix for security vulnerability

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Giacomo Bertolazzi
2025-10-26 16:26:11 +01:00
committed by GitHub
parent 258da3a716
commit 739723bdd2

View File

@@ -32,8 +32,8 @@ class XWrapper(SocialWrapper):
posts: list[SocialPost] = []
for user in X_USERS:
cmd = f"rettiwt -k {self.api_key} tweet search {limit} -f {str(user)}"
process = subprocess.run(cmd, capture_output=True, shell=True)
cmd = ['rettiwt', '-k', self.api_key, 'tweet', 'search', str(limit), '-f', str(user)]
process = subprocess.run(cmd, capture_output=True)
results = process.stdout.decode()
json_result = json.loads(results)