Skip to content

Commit

Permalink
Bandit issue - subprocess corrected
Browse files Browse the repository at this point in the history
Signed-off-by: noopur <[email protected]>
  • Loading branch information
noopurintel committed Jan 20, 2025
1 parent e469850 commit 245b2e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/end_to_end/utils/federation_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,8 @@ def download_data(collaborators, model_name, local_bind_path):

log.info("Downloading the data for the model. This will take some time to complete based on the data size ..")
try:
subprocess.run(f"cd {local_bind_path}; python {constants.DATA_SETUP_FILE} {len(collaborators)}", shell=True) # nosec B602
command = ["python", constants.DATA_SETUP_FILE, str(len(collaborators))]
subprocess.run(command, cwd=local_bind_path, check=True)

Check notice

Code scanning / Bandit

subprocess call - check for execution of untrusted input. Note test

subprocess call - check for execution of untrusted input.
except Exception:
raise ex.DataSetupException(f"Failed to download data for {model_name}")

Expand Down

0 comments on commit 245b2e3

Please sign in to comment.