AI Slop Code RIsk Monitor

Kludex/starlette

The little ASGI framework that shines. 🌟

19.7 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for Kludex/starlette, a Python project with 12,657 GitHub stars. SynthScan examined 29,318 lines of code across 132 source files, recording 550 pattern matches distributed across 14 syntactic categories. The legacy adjusted pattern signal is 19.7 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

19.7
Adjusted Signal
19.7
Raw Pattern Score
100%
Time Factor
2026-10-09
Last Push
12.7K
Stars
Python
Language
29.3K
Lines of Code
132
Files
550
Pattern Hits
2026-10-12
Scan Date
0.10
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 52.2/100 · HIGH

Can maintainers explain intent, assumptions, and trade-offs? 456 finding(s).

Hallucinated Dependency & Supply Chain Risk 11.9/100 · LOW

Are imports declared and package/API names verified? 70 finding(s).

Agent Over-Engineering Ratio 54.8/100 · HIGH

Are wrappers, guards, and repeated structures necessary? 448 finding(s).

PR Review Velocity Impact 65.4/100 · HIGH

Which changes need focused human review? 550 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 13MEDIUM 4LOW 533

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 550 distinct pattern matches across 14 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers417 hits · 390 pts
SeverityFileLineSnippetContext
LOWstarlette/responses.py157 def _wrap_websocket_denial_send(self, send: Send) -> Send:CODE
LOWstarlette/routing.py553def _wrap_gen_lifespan_context(CODE
LOWstarlette/_exception_handler.py16def _lookup_exception_handler(exc_handlers: ExceptionHandlers, exc: Exception) -> ExceptionHandler | None:CODE
LOWstarlette/_exception_handler.py23def wrap_app_handling_exceptions(app: ASGIApp, conn: Request | WebSocket) -> ASGIApp:CODE
LOWstarlette/_utils.py102async def create_collapsing_task_group() -> AsyncGenerator[anyio.abc.TaskGroup, None]:CODE
LOWstarlette/middleware/gzip.py33def _get_gzip_capacity_limiter() -> anyio.CapacityLimiter:CODE
LOWtests/test_datastructures.py209def test_url_from_scope_with_invalid_host(host: bytes) -> None:CODE
LOWtests/test_datastructures.py245def test_url_from_scope_with_ipvfuture() -> None:CODE
LOWtests/test_datastructures.py268def test_url_from_scope_with_authority_in_path(path: str, expected_path: str, with_host_header: bool) -> None:CODE
LOW⚡tests/test_datastructures.py328def test_mutable_headers_merge() -> None:CODE
LOW⚡tests/test_datastructures.py337def test_mutable_headers_merge_dict() -> None:CODE
LOW⚡tests/test_datastructures.py346def test_mutable_headers_update() -> None:CODE
LOW⚡tests/test_datastructures.py355def test_mutable_headers_update_dict() -> None:CODE
LOW⚡tests/test_datastructures.py364def test_mutable_headers_merge_not_mapping() -> None:CODE
LOWtests/test_datastructures.py380def test_mutable_headers_from_scope() -> None:CODE
LOWtests/test_datastructures.py432async def test_upload_file_file_input() -> None:CODE
LOWtests/test_datastructures.py446async def test_upload_file_without_size() -> None:CODE
LOWtests/test_datastructures.py516async def test_upload_file_repr_headers() -> None:CODE
LOWtests/test_concurrency.py16async def test_run_until_first_complete() -> None:CODE
LOWtests/test_concurrency.py33def test_accessing_context_from_threaded_sync_endpoint(CODE
LOWtests/test_concurrency.py50async def test_iterate_in_threadpool() -> None:CODE
LOWtests/test_templates.py37def test_templates_autoescape(tmp_path: Path) -> None:CODE
LOWtests/test_templates.py49def test_calls_context_processors(tmp_path: Path, test_client_factory: TestClientFactory) -> None:CODE
LOWtests/test_templates.py77def test_template_with_middleware(tmpdir: Path, test_client_factory: TestClientFactory) -> None:CODE
LOWtests/test_templates.py103def test_templates_with_directories(tmp_path: Path, test_client_factory: TestClientFactory) -> None:CODE
LOW⚡tests/test_templates.py138def test_templates_require_directory_or_environment() -> None:CODE
LOW⚡tests/test_templates.py143def test_templates_require_directory_or_environment_not_both() -> None:CODE
LOW⚡tests/test_templates.py148def test_templates_with_directory(tmpdir: Path) -> None:CODE
LOW⚡tests/test_templates.py158def test_templates_with_environment(tmpdir: Path, test_client_factory: TestClientFactory) -> None:CODE
LOW⚡tests/test_endpoints.py42def test_http_endpoint_route_path_params(client: TestClient) -> None:CODE
LOW⚡tests/test_endpoints.py48def test_http_endpoint_route_method(client: TestClient) -> None:CODE
LOW⚡tests/test_endpoints.py55def test_http_endpoint_route_query_method(client: TestClient) -> None:CODE
LOW⚡tests/test_endpoints.py62async def test_http_endpoint_supports_early_hints() -> None:CODE
LOWtests/test_endpoints.py92def test_http_endpoint_does_not_dispatch_non_verb_method(test_client_factory: TestClientFactory) -> None:CODE
LOWtests/test_endpoints.py109def test_websocket_endpoint_on_connect(test_client_factory: TestClientFactory) -> None:CODE
LOWtests/test_endpoints.py120def test_websocket_endpoint_on_receive_bytes(CODE
LOWtests/test_endpoints.py140def test_websocket_endpoint_on_receive_json(CODE
LOWtests/test_endpoints.py160def test_websocket_endpoint_on_receive_json_binary(CODE
LOWtests/test_endpoints.py176def test_websocket_endpoint_on_receive_text(CODE
LOWtests/test_endpoints.py196def test_websocket_endpoint_on_default(test_client_factory: TestClientFactory) -> None:CODE
LOWtests/test_endpoints.py210def test_websocket_endpoint_on_default_with_empty_text(test_client_factory: TestClientFactory) -> None:CODE
LOWtests/test_endpoints.py225async def test_websocket_endpoint_decode_text_rejects_message_without_text() -> None:CODE
LOWtests/test_endpoints.py250async def test_websocket_endpoint_decode_bytes_rejects_message_without_bytes() -> None:CODE
LOWtests/test_endpoints.py272def test_websocket_endpoint_on_disconnect(CODE
LOWtests/test_convertors.py63def test_default_float_convertor(test_client_factory: TestClientFactory, param: str, status_code: int) -> None:CODE
LOWtests/test_convertors.py86def test_default_uuid_convertor(test_client_factory: TestClientFactory, param: str, status_code: int) -> None:CODE
LOW⚡tests/test_exceptions.py113def test_non_standard_status_code(client: TestClient) -> None:CODE
LOW⚡tests/test_exceptions.py119def test_websockets_should_raise(client: TestClient) -> None:CODE
LOW⚡tests/test_exceptions.py125def test_handled_exc_after_response(test_client_factory: TestClientFactory, client: TestClient) -> None:CODE
LOWtests/test_exceptions.py196def test_request_in_app_and_handler_is_the_same_object(client: TestClient) -> None:CODE
LOWtests/test_exceptions.py202def test_http_exception_does_not_use_threadpool(client: TestClient, monkeypatch: MonkeyPatch) -> None:CODE
LOWtests/test_exceptions.py221def test_handlers_annotations() -> None:CODE
LOWtests/test_testclient.py49def test_use_testclient_in_endpoint(test_client_factory: TestClientFactory) -> None:CODE
LOWtests/test_testclient.py69def test_testclient_headers_behavior() -> None:CODE
LOWtests/test_testclient.py88def test_use_testclient_as_contextmanager(test_client_factory: TestClientFactory, anyio_backend_name: str) -> None:CODE
LOWtests/test_testclient.py179def test_exception_in_middleware(test_client_factory: TestClientFactory) -> None:CODE
LOWtests/test_testclient.py232def test_debug_info_in_response_extensions(test_client_factory: TestClientFactory) -> None:CODE
LOWtests/test_testclient.py250def test_debug_info_in_response_extensions_with_template(test_client_factory: TestClientFactory) -> None:CODE
LOWtests/test_testclient.py271def test_websocket_blocking_receive(test_client_factory: TestClientFactory) -> None:CODE
LOWtests/test_testclient.py296def test_websocket_not_block_on_close(test_client_factory: TestClientFactory) -> None:CODE
357 more matches not shown…
Unused Imports66 hits · 62 pts
SeverityFileLineSnippetContext
LOWstarlette/responses.py1CODE
LOWstarlette/config.py1CODE
LOWstarlette/templating.py1CODE
LOWstarlette/websockets.py1CODE
LOWstarlette/applications.py1CODE
LOWstarlette/concurrency.py1CODE
LOWstarlette/background.py1CODE
LOWstarlette/types.py6CODE
LOWstarlette/types.py7CODE
LOWstarlette/types.py8CODE
LOWstarlette/convertors.py1CODE
LOWstarlette/staticfiles.py1CODE
LOWstarlette/schemas.py1CODE
LOWstarlette/routing.py1CODE
LOWstarlette/authentication.py1CODE
LOWstarlette/testclient.py1CODE
LOWstarlette/_exception_handler.py1CODE
LOWstarlette/exceptions.py1CODE
LOWstarlette/requests.py1CODE
LOWstarlette/datastructures.py1CODE
LOWstarlette/endpoints.py1CODE
LOWstarlette/formparsers.py1CODE
LOWstarlette/_utils.py1CODE
LOWstarlette/status.py9CODE
LOWstarlette/middleware/gzip.py1CODE
LOWstarlette/middleware/sessions.py1CODE
LOWstarlette/middleware/cors.py1CODE
LOWstarlette/middleware/__init__.py1CODE
LOWstarlette/middleware/opentelemetry.py1CODE
LOWstarlette/middleware/body_limit.py1CODE
LOWstarlette/middleware/trustedhost.py1CODE
LOWstarlette/middleware/authentication.py1CODE
LOWstarlette/middleware/exceptions.py1CODE
LOWstarlette/middleware/errors.py1CODE
LOWstarlette/middleware/base.py1CODE
LOWstarlette/middleware/wsgi.py1CODE
LOWtests/test_datastructures.py1CODE
LOWtests/conftest.py1CODE
LOWtests/test_templates.py1CODE
LOWtests/test_testclient.py1CODE
LOWtests/types.py1CODE
LOWtests/test_authentication.py1CODE
LOWtests/test_routing.py1CODE
LOWtests/test_applications.py1CODE
LOWtests/test_requests.py1CODE
LOWtests/test_responses.py1CODE
LOWtests/test_formparsers.py1CODE
LOWtests/middleware/test_gzip.py1CODE
LOWtests/middleware/test_trusted_host.py1CODE
LOWtests/middleware/test_opentelemetry.py1CODE
LOWtests/middleware/test_body_limit.py1CODE
LOWtests/middleware/test_https_redirect.py1CODE
LOWtests/middleware/test_base.py1CODE
LOWbenchmarks/routing_benchmark.py1CODE
LOWbenchmarks/conftest.py1CODE
LOWbenchmarks/gzip_benchmark.py1CODE
LOWbenchmarks/json_benchmark.py1CODE
LOWbenchmarks/__init__.py1CODE
LOWbenchmarks/file_response_benchmark.py1CODE
LOWbenchmarks/request_benchmark.py1CODE
6 more matches not shown…
Empty Error Handlers11 hits · 55 pts
SeverityFileLineSnippetContext
HIGHstarlette/websockets.py154except WebSocketDisconnect:CODE
HIGHstarlette/websockets.py161except WebSocketDisconnect:CODE
HIGHstarlette/websockets.py168except WebSocketDisconnect:CODE
HIGHstarlette/staticfiles.py228except KeyError:CODE
HIGHstarlette/routing.py641except NoMatchFound:CODE
HIGHstarlette/routing.py452except NoMatchFound:CODE
HIGHstarlette/routing.py518except NoMatchFound:CODE
HIGHstarlette/datastructures.py132except ValueError:CODE
HIGHstarlette/middleware/body_limit.py95except _RequestBodyLimitResponseSent:CODE
HIGHtests/test_testclient.py285except WebSocketDisconnect:CODE
HIGHtests/middleware/test_base.py1090except ClientDisconnect:CODE
Deep Nesting24 hits · 24 pts
SeverityFileLineSnippetContext
LOWstarlette/responses.py456CODE
LOWstarlette/websockets.py65CODE
LOWstarlette/staticfiles.py115CODE
LOWstarlette/schemas.py40CODE
LOWstarlette/routing.py429CODE
LOWstarlette/routing.py499CODE
LOWstarlette/authentication.py25CODE
LOWstarlette/authentication.py32CODE
LOWstarlette/testclient.py142CODE
LOWstarlette/testclient.py217CODE
LOWstarlette/testclient.py288CODE
LOWstarlette/testclient.py316CODE
LOWstarlette/requests.py270CODE
LOWstarlette/datastructures.py27CODE
LOWstarlette/datastructures.py116CODE
LOWstarlette/endpoints.py70CODE
LOWstarlette/endpoints.py91CODE
LOWstarlette/formparsers.py109CODE
LOWstarlette/middleware/gzip.py106CODE
LOWstarlette/middleware/cors.py102CODE
LOWstarlette/middleware/opentelemetry.py47CODE
LOWstarlette/middleware/errors.py149CODE
LOWstarlette/middleware/base.py101CODE
LOWstarlette/middleware/base.py112CODE
Cross-Language Confusion2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHstarlette/config.py90 default: Any = undefined,CODE
HIGHstarlette/config.py98 default: Any = undefined,CODE
Excessive Try-Catch Wrapping8 hits · 8 pts
SeverityFileLineSnippetContext
LOWstarlette/_exception_handler.py43 except Exception as exc:CODE
LOWstarlette/endpoints.py85 except Exception as exc:CODE
LOWstarlette/middleware/opentelemetry.py108 except Exception as exc:CODE
LOWstarlette/middleware/errors.py165 except Exception as exc:STRING
LOWstarlette/middleware/base.py150 except Exception as exc:CODE
LOW⚡tests/middleware/test_base.py1317 except Exception:CODE
LOW⚡tests/middleware/test_base.py1323 except Exception as e:CODE
LOWdocs/middleware.md771 except Exception as exc:CODE
Self-Referential Comments2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMstarlette/requests.py194 # Create a state instance with a reference to the dict in which it shouldCOMMENT
MEDIUMstarlette/formparsers.py119 # Create the parser.COMMENT
AI Structural Patterns7 hits · 6 pts
SeverityFileLineSnippetContext
LOWstarlette/responses.py90CODE
LOWstarlette/testclient.py384CODE
LOWstarlette/testclient.py432CODE
LOWstarlette/middleware/cors.py16CODE
LOWtests/test_staticfiles.py68CODE
LOWtests/middleware/test_base.py133CODE
LOWtests/middleware/test_base.py955CODE
Dead Code2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_testclient.py170CODE
MEDIUMtests/test_routing.py754CODE
Modern Structural Boilerplate3 hits · 3 pts
SeverityFileLineSnippetContext
LOWstarlette/responses.py334 def set_stat_headers(self, stat_result: os.stat_result) -> None:CODE
LOWstarlette/templating.py101 def _setup_env_defaults(self, env: jinja2.Environment) -> None:CODE
LOWstarlette/status.py15__all__ = [CODE
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippetContext
LOWstarlette/staticfiles.py142 # Check if we have 'index.html' file to serve.COMMENT
LOWstarlette/formparsers.py283 # Write file data, it needs to use await with the UploadFile methodsCOMMENT
AI Slop Vocabulary2 hits · 3 pts
SeverityFileLineSnippetContext
LOWstarlette/routing.py630 # returning the response. For plain ASGI apps, just return the response.COMMENT
LOWstarlette/endpoints.py51 # returning the response. For plain ASGI apps, just return the response.COMMENT
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippetContext
LOWdocs/applications.md27 username = "John Doe"CODE
LOWdocs/applications.md65app.state.ADMIN_EMAIL = 'admin@example.org'CODE
Overly Generic Function Names2 hits · 2 pts
SeverityFileLineSnippetContext
LOWstarlette/testclient.py217 def handle_request(self, request: httpx.Request) -> httpx.Response:CODE
LOWtests/test_routing.py826 async def my_method(self, request: Request) -> None: ... # pragma: no coverCODE