Repository navigation
Add aiohttp and database-driver security models - #88
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
First two items of #70: aiohttp and database-driver models. dvpwa, the intentionally vulnerable aiohttp application of the regression corpus, was silent; its documented SQL injection is now found.
test: define the aiohttp and database-driver models), implementation follows.aiohttp-models: an annotatedweb.Requestparameter, a handler registered on the router (app.router.add_route,add_get,web.get(...)inadd_routes) or a function decorated by aRouteTableDefreceives HTTP input;web.Responseis an HTML sink,FileResponsea path sink, the redirect exceptions redirect sinks;ClientSessionrequests are SSRF sinks whose responses are untrustedhttp-responseinput.db-driver-models: the statement argument of aiopg, asyncpg, psycopg2 and PyMySQL query methods is a SQL sink, reached through connections, pools, cursors and annotated classes; the parameter tuple is not a statement.def setup_routes(app: Application), where a call on an annotated parameter denotes the class's method; andawait f()denotes whatf()denotes, soconn = await asyncpg.connect()givesconn.fetchits sink.Student.createformatting the name into the statement, reached from thestudentshandler; its stored XSS lives in a template|safefilter and its session fixation in session handling, both outside static taint. Nothing else moves; 28 bundled plugins, documented in the usage guide.Part of #70.