Skip to content

Commit 756f4de

Browse files
committed
Fix eval security issue
1 parent d5508de commit 756f4de

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

brainles_preprocessing/cli.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,13 @@ def main(
118118
)
119119

120120
moving_modalities = []
121-
for modality in ["t1", "t2", "fla"]:
121+
for input_path, modality in zip(
122+
[input_t1, input_t2, input_fla], ["t1", "t2", "fla"]
123+
):
122124
moving_modalities.append(
123125
Modality(
124126
modality_name=modality,
125-
input_path=eval(f"input_{modality}"),
127+
input_path=input_path,
126128
normalizer=percentile_normalizer,
127129
# specify the output paths for the raw and normalized images of each step - here only for atlas registered and brain extraction
128130
raw_skull_output_path=output_dir / f"{modality}_skull_raw.nii.gz",

0 commit comments

Comments
 (0)