dfgvaetyj3456356-hash opened a new pull request, #67847: URL: https://github.com/apache/airflow/pull/67847
S3Hook.sync_to_local_dir() and GCSHook.sync_to_local_dir() derive local target paths from object keys after removing the configured prefix. This change resolves each candidate target and rejects keys that would land outside the requested local directory before creating parent directories or downloading content.\n\nRegression tests cover traversal-shaped object keys for both S3 and GCS sync helpers.\n\nValidation performed locally:\n- python -m py_compile providers\\amazon\\src\\airflow\\providers\\amazon\\aws\\hooks\\s3.py providers\\google\\src\\airflow\\providers\\google\\cloud\\hooks\\gcs.py providers\\amazon\\tests\\unit\\amazon\\aws\\hooks\\test_s3.py providers\\google\\tests\\unit\\google\\cloud\\hooks\\test_gcs.py\n- python -m ruff check providers\\amazon\\src\\airflow\\providers\\amazon\\aws\\hooks\\s3.py providers\\google\\src\\airflow\\providers\\google\\cloud\\hooks\\gcs.py providers\\amazon\\tests\\unit\\amazon\\aws\\hooks\\test_s3.py providers\\google\\tests\\unit\\go ogle\\cloud\\hooks\\test_gcs.py\n- git diff --check -- providers\\amazon\\src\\airflow\\providers\\amazon\\aws\\hooks\\s3.py providers\\google\\src\\airflow\\providers\\google\\cloud\\hooks\\gcs.py providers\\amazon\\tests\\unit\\amazon\\aws\\hooks\\test_s3.py providers\\google\\tests\\unit\\google\\cloud\\hooks\\test_gcs.py\n\nThe focused pytest commands could not run in this local checkout because the Airflow pytest plugin dependency time_machine is not installed in the current environment. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
