Skip to content

Commit

Permalink
Bandit issue resolved
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 b5064eb commit 2f31d3b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/end_to_end/utils/federation_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import os
import json
import re
import subprocess

Check notice

Code scanning / Bandit

Consider possible security implications associated with the subprocess module. Note test

Consider possible security implications associated with the subprocess module.
import papermill as pm
from pathlib import Path
import shutil
Expand Down Expand Up @@ -710,9 +711,7 @@ 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:
# Data setup file has logic to show progress bar
# Using os.system to make sure it is displayed
os.system(f"cd {local_bind_path}; python {constants.DATA_SETUP_FILE} {len(collaborators)}")
subprocess.run(f"cd {local_bind_path}; python {constants.DATA_SETUP_FILE} {len(collaborators)}", shell=True)

Check failure

Code scanning / Bandit

subprocess call with shell=True identified, security issue. Error test

subprocess call with shell=True identified, security issue.
except Exception:
raise ex.DataSetupException(f"Failed to download data for {model_name}")

Expand Down

0 comments on commit 2f31d3b

Please sign in to comment.