Repository navigation
feat: registered routes and suffix sinks - #60
Merged
Merged
Conversation
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
What
DjangoGoat(branchbroken) showed: its views are plain functions listed inurls.py, so none was an entry point, and its login builds a query forUser.objects.raw, a sink the models only knew underManager.raw.test: define URL-registered views and ORM suffix sinks), implementation follows.RouteRegistrarmodel: a call that registers a handler elsewhere, with the argument (or keyword) that references it.taint/routes.pyscans the module-level calls of a module, resolves the registrar through the symbol table and the handler to a project symbol,as_view()and routers included, and the engine merges every module's registrations into thetaint.routesinput before analysing, so a registered function, or the methods of a registered class, receive attacker-controlled parameters wherever they are defined. Routes reach the worker processes and are part of the cache key, so editingurls.pyre-analyses the views. Shipped for Django (path,re_path,url, REST framework routers), Flask (add_url_rule) and FastAPI (add_api_route).SuffixSinkmodel: a sink matched by the tail of a call's symbol;objects.rawandobjects.extraare SQL sinks for any model class, statement argument only.On
DjangoGoatthis reports the login injection the branch introduces, throughUser.objects.raw, and the notes views become entry points. Across the sixteen repositories nothing else changes.