andrewmusselman opened a new issue, #720: URL: https://github.com/apache/tooling-trusted-releases/issues/720
**ASVS Requirement:** 5.3.2 **Description:** Two functions in `atr/storage/writers/release.py` join user-controlled relative paths to base directories without `resolve().relative_to()` containment checks, despite this exact pattern being correctly used in the adjacent `delete_empty_directory()` function in the same file. 1. **`delete_file()`** (lines 199-221): `creating.interim_path / rel_path_to_delete` is passed directly to `aiofiles.os.remove()` without containment validation. 2. **`generate_hash_file()`** (lines 223-247): Both the source path and hash output path are constructed from user input without containment validation. **CWE:** CWE-22 (Path Traversal) **Recommended remediation:** Apply the same `path_in_new_revision.resolve().relative_to(creating.interim_path.resolve())` check already used in `delete_empty_directory()` to both `delete_file()` and `generate_hash_file()`. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
