Skip to content

Commit 5fb7cd4

Browse files
authored
fix: prevent following symlinks when copying files in BentoStore (#5598)
Signed-off-by: Frost Ming <me@frostming.com>
1 parent 0ff0b9e commit 5fb7cd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bentoml/_internal/bento/bento.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def append_model(model: BentoModelInfo) -> None:
338338
target_fs.joinpath(dest_dir).mkdir(parents=True, exist_ok=True)
339339
src_file = ctx_path.joinpath(path)
340340
dst_file = target_fs.joinpath(dest_path)
341-
shutil.copy(src_file, dst_file)
341+
shutil.copy(src_file, dst_file, follow_symlinks=False)
342342
if image is None:
343343
# NOTE: we need to generate both Python and Conda
344344
# first to make sure we can generate the Dockerfile correctly.

0 commit comments

Comments
 (0)