Repository navigation
fix: precision from real repositories - #54
Merged
Merged
Conversation
…script credentials, lower del
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.
Summary
Precision fixes from reading one real repository by hand,
uploadbox-cloud-storage-solution, around the two true path traversals the analyzer already reported.test: define item symbols, session authorization, credential names and del), fixes follow.request.files['file'].save(path)resolves toflask.request.files.save. The Flask models gain that call as a path sink andwerkzeug.utils.secure_filenameas the matching sanitiser: the upload route that saved a file under its client-provided name, the classic vulnerability of that repository, is now a third path traversal, and the sanitised form is clean.'logged_in' in sessionand the early-return formif 'logged_in' not in session: returnmake the flow behind them a hotspot with the evidencebehind authorization (session) at line N. The Flask models declareflask.session; an unrelated membership check stays an ordinary guard.app.config['SECRET_KEY'] = "find@me1290"is ahardcoded-credentialnamedSECRET_KEY.delstatements:Deletein the HIR,DelItemandDelAttreffects in PyIR,del namea no-op for the SSA form. It blocked one whole file of another repository.On the twelve repositories two syntax notes remain, a
matchstatement and a loopelseclause.