PrefectHQ
prefect
BlogDocsChangelog

fix: preserve symlinks in get_directory instead of following them

#19993
Comparing
majiayu000:fix/symlinks-in-copytree-7868
(
5cca006
) with
main
(
8f441a4
)
CodSpeed Performance Gauge
0%
Untouched
2
Ignored
6

Benchmarks

Passed

bench_import_prefect_flow
benches/bench_import.py
CodSpeed Performance Gauge
0%
1.4 s1.4 s
bench_task_decorator
benches/bench_tasks.py
CodSpeed Performance Gauge
-1%
600.3 µs605.5 µs

Ignored

bench_task_call
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
-6%
32.1 ms34 ms
bench_import_prefect
benches/bench_import.py
Ignored
CodSpeed Performance Gauge
0%
1.1 s1.1 s
bench_flow_call[options1]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
-1%
106.5 ms107.5 ms
bench_flow_call[options0]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
+4%
171.8 ms165.5 ms
bench_flow_decorator
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
+4%
5.4 ms5.2 ms
bench_task_submit
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
+14%
14.4 ms12.6 ms

Commits

Click on a commit to change the comparison range
Base
main
8f441a4
-0.46%
fix: preserve symlinks in get_directory instead of following them This fixes an issue where symlinks were being resolved and their target files copied during get_directory operations, which could potentially expose sensitive files that were symlinked (e.g., credential files). The fix adds symlinks=True to shutil.copytree calls in: - LocalFileSystem.get_directory (both sync and async versions) - GitHubRepository.get_directory With this change, symlinks are preserved as symlinks in the destination directory rather than being followed and their contents copied. Closes #7868 Signed-off-by: majiayu000 <1835304752@qq.com>
5cca006
4 hours ago
by majiayu000
© 2025 CodSpeed Technology
Home Terms Privacy Docs