fix: Path Traversal Safety for pybtc#83
Open
dewhush wants to merge 1 commit into
Open
Conversation
Addressed unsafe code patterns found during security review: - path_traversal** Tested locally, no regressions observed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey there! 👋
I was reviewing the codebase and noticed a potential security issue that I thought I'd flag and fix.
What I found
setup_tools.py: Thetarfile.extractall()method is used without validating the paths of the files inside the tarball. This is vulnerabWhat I changed
The fix is minimal and targeted — I added proper validation/sanitization where user-controlled or untrusted data enters sensitive operations. No changes to existing functionality or public APIs.
Testing
Ran the existing test suite locally, everything passes. The change is backward-compatible.
Happy to discuss if you have questions!
Relates to: #64
💛 If this helps, feel free to support my open-source security work:
0x1478f1BDEACc7b434b4405350A15993cDcddc79F