Skip to content

feat(storage): Implement robust path validation and structured skip reporting#7546

Open
thiyaguk09 wants to merge 2 commits intogoogleapis:mainfrom
thiyaguk09:fix/download-directory-path-traversal
Open

feat(storage): Implement robust path validation and structured skip reporting#7546
thiyaguk09 wants to merge 2 commits intogoogleapis:mainfrom
thiyaguk09:fix/download-directory-path-traversal

Conversation

@thiyaguk09
Copy link
Contributor

  • Adds protection against path traversal (../) using normalized path resolution.
  • Prevents Windows-style drive letter injection while allowing GCS timestamps.
  • Implements directory jail logic to ensure absolute-style paths are relative to destination.
  • Preserves backward compatibility by returning an augmented DownloadResponse array.
  • Automates recursive directory creation for validated nested files.
  • Adds a comprehensive 13-scenario test suite for edge-case parity.

- Adds protection against path traversal (../) using normalized path
resolution.
- Prevents Windows-style drive letter injection while allowing GCS
timestamps.
- Implements directory jail logic to ensure absolute-style paths are
relative to destination.
- Preserves backward compatibility by returning an augmented
DownloadResponse array.
- Automates recursive directory creation for validated nested files.
- Adds comprehensive 13-scenario test suite for edge-case parity.
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Mar 10, 2026
@thiyaguk09 thiyaguk09 marked this pull request as ready for review March 10, 2026 08:26
@thiyaguk09 thiyaguk09 requested a review from a team as a code owner March 10, 2026 08:26
@quirogas quirogas added the priority: p2 Moderately-important priority. Fix may not be included in next release. label Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API. priority: p2 Moderately-important priority. Fix may not be included in next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants