sdk/python/Web Frameworks

Web Frameworks

Flask, Django, FastAPI request sources and response sinks

All 30Source: 8Sink: 8Sanitizer: 6
PyCelery
celery

Celery is a distributed task queue. Celery(broker=..., backend=...) configures brokers — findings when broker URL has insecure defaults (redis:// without TLS, amqp:// without TLS). @task decorators accept arbitrary user-controlled args via the queue.

1 source2 methods
PyCgi
cgi

The cgi module (deprecated in 3.11, removed in 3.13). cgi.FieldStorage collects form data for CGI scripts — each field value is a source. Any new code should not use cgi.

2 sources2 methods
PyCgitb
cgitb

Python stdlib module — cgitb. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

10 methods
PyChannels
channels

Third-party Python package module — channels. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

10 methods
PyDjango
django

Django is a full-featured Python web framework. HttpRequest exposes request data; the ORM Manager.raw() and Cursor.execute() are SQL injection sinks when the SQL is built from user input. Template rendering via mark_safe bypasses auto-escaping (XSS sink).

4 sources2 sinks6 methods
PyDjangoFilters
django_filters

django-filter builds Django QuerySet filters from query params. FilterSet.qs runs the filtered query — injection is impossible via the FilterSet, but custom filter methods that build raw SQL are sinks.

1 sanitizer1 methods
PyFanstatic
fanstatic

Third-party Python package module — fanstatic. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

10 methods
PyFastAPI
fastapi

FastAPI is a modern Python web framework built on Starlette and Pydantic. Path / query / body parameters declared on endpoints are sources. Response helpers inherited from Starlette include HTMLResponse and RedirectResponse (XSS and open-redirect sinks).

4 sources2 sinks6 methods
PyFlask
flask

Flask is a popular Python web microframework. The flask.request global exposes all HTTP input (args, form, json, files, headers, cookies) as taint sources. Response helpers like render_template (SSTI if template is user-controlled) and redirect (open-redirect) are sinks.

5 sources3 sinks8 methods
PyFlaskCors
flask_cors

flask-cors configures CORS headers on Flask apps. CORS(app, origins='*') with supports_credentials=True is a major finding (wildcard origin with credentials is explicitly forbidden by browsers but some configurations still emit it).

2 sinks2 methods
PyFlaskMigrate
flask_migrate

Third-party Python package module — flask_migrate. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

10 methods
PyFlaskSocketio
flask_socketio

Third-party Python package module — flask_socketio. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

10 methods
PyGevent
gevent

Third-party Python package module — gevent. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

10 methods
PyGreenlet
greenlet

Third-party Python package module — greenlet. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

6 methods
PyGrpc
grpc

Third-party Python package module — grpc. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

10 methods
PyGrpcChannelz
grpc_channelz

Third-party Python package module — grpc_channelz. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

10 methods
PyGrpcHealth
grpc_health

Third-party Python package module — grpc_health. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

8 methods
PyGrpcReflection
grpc_reflection

Third-party Python package module — grpc_reflection. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

10 methods
PyGrpcStatus
grpc_status

Third-party Python package module — grpc_status. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

2 methods
PyGunicorn
gunicorn

gunicorn is a production WSGI server. Commonly run via CLI but programmatic use via Application() is possible. bind '0.0.0.0:*' on internal apps is a finding.

1 methods
PyJsonschema
jsonschema

jsonschema validates JSON documents against a schema. validate() is a sanitizer for shape-checking untrusted JSON before passing fields to other sinks.

1 sanitizer1 methods
PyPydantic
pydantic

Pydantic provides strict type-validated models. BaseModel parses / coerces input and raises on mismatch — the parsed model is a sanitizer for the raw input. Still, string fields on the model can remain tainted (not magically escaped).

3 sanitizers3 methods
PyRestFramework
rest_framework

Django REST Framework (DRF). request.data is the primary source for JSON / form payloads; serializers validate input (sanitizer when is_valid is called with raise_exception=True). Response() with tainted data is generally safe due to DRF's renderers but render_template is still worth watching.

2 sources1 sanitizer4 methods
PySimpleWebsocket
simple_websocket

Third-party Python package module — simple_websocket. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

10 methods
PyStarlette
starlette

Starlette is the ASGI toolkit behind FastAPI. Request exposes HTTP input; the responses module provides HTMLResponse / RedirectResponse / FileResponse (sinks for XSS, open-redirect, path-traversal respectively).

3 sources3 sinks6 methods
PyUwsgi
uwsgi

Third-party Python package module — uwsgi. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

10 methods
PyWaitress
waitress

waitress is a production WSGI server. serve() with host='0.0.0.0' exposes the app to all interfaces — finding for internal-only services.

1 sink1 methods
PyWerkzeug
werkzeug

Werkzeug is the WSGI toolkit Flask is built on. safe_join() is the canonical path-traversal sanitizer for serving files. utils.redirect is where Flask's open-redirect surface originates.

2 sinks1 sanitizer3 methods
PyWsgiref
wsgiref

The wsgiref module for WSGI utilities. simple_server.make_server is dev-only — production should use gunicorn or waitress. util.request_uri reconstructs the URL from environ and is a source.

1 source1 sink2 methods
PyWtforms
wtforms

WTForms provides form validation for Flask / Django-style apps. Form().validate_on_submit() is a sanitizer for field-level validation. Still, string field values reach templates / SQL if fed directly without additional escaping.

1 sanitizer2 methods