AI Slop Code RIsk Monitor

Kludex/uvicorn

An ASGI web server, for Python. 🦄

23.9 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for Kludex/uvicorn, a Python project with 11,007 GitHub stars. SynthScan examined 21,992 lines of code across 117 source files, recording 409 pattern matches distributed across 11 syntactic categories. The legacy adjusted pattern signal is 23.9 (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.

23.9
Adjusted Signal
23.9
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
11.0K
Stars
Python
Language
22.0K
Lines of Code
117
Files
409
Pattern Hits
2026-10-12
Scan Date
0.26
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 45.6/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 16.6/100 · LOW

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

Agent Over-Engineering Ratio 60.8/100 · HIGH

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

PR Review Velocity Impact 72.9/100 · HIGH

Which changes need focused human review? 409 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 30MEDIUM 8LOW 371

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 409 distinct pattern matches across 11 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 Identifiers246 hits · 232 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py42def tls_certificate_authority() -> trustme.CA:CODE
LOW⚡tests/conftest.py58def tls_ca_certificate_pem_path(tls_certificate_authority: trustme.CA):CODE
LOW⚡tests/conftest.py64def tls_ca_certificate_private_key_path(tls_certificate_authority: trustme.CA):CODE
LOW⚡tests/conftest.py70def tls_certificate_private_key_encrypted_path(tls_certificate):CODE
LOW⚡tests/conftest.py86def tls_certificate_private_key_path(tls_certificate: trustme.CA):CODE
LOW⚡tests/conftest.py92def tls_certificate_key_and_chain_path(tls_certificate: trustme.LeafCert):CODE
LOW⚡tests/conftest.py98def tls_certificate_server_cert_path(tls_certificate: trustme.LeafCert):CODE
LOWtests/conftest.py111def reload_directory_structure(tmp_path_factory: pytest.TempPathFactory):CODE
LOWtests/test_server.py90async def test_shutdown_on_early_exit_during_startup(unused_tcp_port: int):CODE
LOWtests/test_server.py125def test_run_exits_with_startup_failure_on_unloadable_app() -> None:CODE
LOWtests/test_server.py140async def test_request_than_limit_max_requests_warn_log(CODE
LOWtests/test_server.py153async def test_limit_max_requests_jitter(CODE
LOWtests/test_server.py206async def test_contextvars_preserved_by_default(CODE
LOWtests/test_server.py229async def test_reset_contextvars_asyncio(CODE
LOWtests/test_ssl.py106async def test_run_ssl_context_factory_default(CODE
LOWtests/test_ssl.py133async def test_run_ssl_context_factory_custom(CODE
LOWtests/test_ssl.py159def test_ssl_context_factory_mutates_default(CODE
LOWtests/test_ssl.py182def test_default_ssl_context_factory_requires_ssl_certfile() -> None:CODE
LOWtests/test_ssl.py193def test_ssl_context_factory_must_return_ssl_context() -> None:CODE
LOWtests/test_ssl.py202def test_ssl_ciphers_applied_when_set(CODE
LOWtests/test_ssl.py216def test_is_ssl_true_when_only_factory_set() -> None:CODE
LOWtests/utils.py51def get_asyncio_default_loop_per_os() -> type[asyncio.AbstractEventLoop]:CODE
LOW⚡tests/test_compat.py17def test_asyncio_run__default_loop_factory() -> None:CODE
LOW⚡tests/test_compat.py21def test_asyncio_run__custom_loop_factory() -> None:CODE
LOW⚡tests/test_compat.py25def test_asyncio_run__passing_a_non_awaitable_callback_should_throw_error() -> None:CODE
LOWtests/test_config.py30def mocked_logging_config_module(mocker: MockerFixture) -> MagicMock:CODE
LOWtests/test_config.py56def test_config_should_reload_is_set(app: ASGIApplication, expected_should_reload: bool) -> None:CODE
LOWtests/test_config.py62def test_should_warn_on_invalid_reload_configuration(tmp_path: Path, caplog: pytest.LogCaptureFixture) -> None:CODE
LOWtests/test_config.py91def test_non_existant_reload_dir_is_not_set(reload_directory_structure: Path, caplog: pytest.LogCaptureFixture) -> None:CODE
LOWtests/test_config.py102def test_reload_subdir_removal(reload_directory_structure: Path) -> None:CODE
LOWtests/test_config.py112def test_reload_included_dir_is_added_to_reload_dirs(CODE
LOWtests/test_config.py129def test_reload_dir_subdirectories_are_removed(CODE
LOWtests/test_config.py151def test_reload_excluded_subdirectories_are_removed(CODE
LOWtests/test_config.py168def test_reload_includes_exclude_dir_patterns_are_matched(CODE
LOWtests/test_config.py208def test_app_unimportable_module() -> None:CODE
LOWtests/test_config.py214def test_app_unimportable_other(caplog: pytest.LogCaptureFixture) -> None:CODE
LOWtests/test_config.py375def test_log_config_yaml_missing_pyyaml(mocked_logging_config_module: MagicMock, mocker: MockerFixture) -> None:CODE
LOWtests/test_config.py432def test_forwarded_allow_ips_default(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_config.py490def test_config_log_effective_level(log_level: int, uvicorn_logger_level: int) -> None:CODE
LOWtests/test_config.py509def test_config_log_level_case_insensitive(log_level: str) -> None:CODE
LOWtests/test_config.py516def test_ws_websockets_emits_deprecation_warning() -> None:CODE
LOWtests/test_config.py544def test_bind_unix_socket_works_with_reload_or_workers(CODE
LOWtests/test_config.py565def test_bind_fd_works_with_reload_or_workers(reload: bool, workers: int): # pragma: py-win32CODE
LOWtests/test_config.py600def test_bind_stdin_works_with_reload_or_workers(CODE
LOWtests/test_config.py622def test_config_use_subprocess(reload: bool, workers: int, expected: bool):CODE
LOWtests/test_config.py628def test_warn_when_using_reload_and_workers(caplog: pytest.LogCaptureFixture) -> None:CODE
LOWtests/test_config.py653def test_custom_loop__importable_custom_loop_setup_function() -> None:CODE
LOWtests/test_config.py665def test_custom_loop__not_importable_custom_loop_setup_function(caplog: pytest.LogCaptureFixture) -> None:CODE
LOWtests/test_config.py679def test_setup_event_loop_is_removed(caplog: pytest.LogCaptureFixture) -> None:CODE
LOWtests/test_lifespan.py92def test_lifespan_auto_with_error():CODE
LOWtests/test_lifespan.py110def test_lifespan_on_with_error():CODE
LOWtests/test_lifespan.py131def test_lifespan_with_failed_startup(mode, raise_exception, caplog):CODE
LOWtests/test_lifespan.py210def test_lifespan_with_failed_shutdown(mode, raise_exception, caplog):CODE
LOWtests/test_cli.py80def test_cli_call_change_reload_run() -> None:CODE
LOWtests/test_cli.py92def test_cli_call_multiprocess_run() -> None:CODE
LOWtests/test_cli.py128def test_cli_incomplete_app_parameter() -> None:CODE
LOWtests/test_cli.py177def test_ignore_environment_variable_when_set_on_cli():CODE
LOWtests/test_cli.py208def test_set_app_via_environment_variable():CODE
LOWtests/test_main.py80def test_run_invalid_app_config_combination(caplog: pytest.LogCaptureFixture) -> None:CODE
LOWtests/test_main.py91def test_run_fails_fast_in_parent_on_bad_app_path(CODE
186 more matches not shown…
Cross-File Repetition19 hits · 95 pts
SeverityFileLineSnippetContext
HIGHuvicorn/protocols/websockets/websockets_sansio_impl.py0called by the transport when the write buffer exceeds the high water mark.STRING
HIGHuvicorn/protocols/websockets/wsproto_impl.py0called by the transport when the write buffer exceeds the high water mark.STRING
HIGHuvicorn/protocols/http/zttp_impl.py0called by the transport when the write buffer exceeds the high water mark.STRING
HIGHuvicorn/protocols/http/zttp_h2_impl.py0called by the transport when the write buffer exceeds the high water mark.STRING
HIGHuvicorn/protocols/http/h11_impl.py0called by the transport when the write buffer exceeds the high water mark.STRING
HIGHuvicorn/protocols/http/httptools_impl.py0called by the transport when the write buffer exceeds the high water mark.STRING
HIGHuvicorn/protocols/websockets/websockets_sansio_impl.py0called by the transport when the write buffer drops below the low water mark.STRING
HIGHuvicorn/protocols/websockets/wsproto_impl.py0called by the transport when the write buffer drops below the low water mark.STRING
HIGHuvicorn/protocols/http/zttp_impl.py0called by the transport when the write buffer drops below the low water mark.STRING
HIGHuvicorn/protocols/http/zttp_h2_impl.py0called by the transport when the write buffer drops below the low water mark.STRING
HIGHuvicorn/protocols/http/h11_impl.py0called by the transport when the write buffer drops below the low water mark.STRING
HIGHuvicorn/protocols/http/httptools_impl.py0called by the transport when the write buffer drops below the low water mark.STRING
HIGHuvicorn/protocols/http/zttp_impl.py0called by the server to commence a graceful shutdown.STRING
HIGHuvicorn/protocols/http/h11_impl.py0called by the server to commence a graceful shutdown.STRING
HIGHuvicorn/protocols/http/httptools_impl.py0called by the server to commence a graceful shutdown.STRING
HIGHuvicorn/protocols/http/zttp_impl.py0called on a keep-alive connection if no new data is received after a short delay.STRING
HIGHuvicorn/protocols/http/zttp_h2_impl.py0called on a keep-alive connection if no new data is received after a short delay.STRING
HIGHuvicorn/protocols/http/h11_impl.py0called on a keep-alive connection if no new data is received after a short delay.STRING
HIGHuvicorn/protocols/http/httptools_impl.py0called on a keep-alive connection if no new data is received after a short delay.STRING
Unused Imports83 hits · 80 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py1CODE
LOWtests/test_subprocess.py1CODE
LOWtests/test_server.py1CODE
LOWtests/test_ssl.py1CODE
LOWtests/utils.py1CODE
LOWtests/test_compat.py1CODE
LOWtests/test_config.py1CODE
LOWtests/custom_loop_utils.py1CODE
LOWtests/test_default_headers.py1CODE
LOWtests/middleware/test_logging.py1CODE
LOWtests/middleware/test_logging.py22CODE
LOWtests/middleware/test_logging.py23CODE
LOWtests/middleware/test_proxy_headers.py1CODE
LOWtests/middleware/test_wsgi.py1CODE
LOWtests/importer/circular_import_b.py2CODE
LOWtests/importer/circular_import_a.py2CODE
LOWtests/importer/raise_import_error.py5CODE
LOWtests/supervisors/test_multiprocess.py1CODE
LOWtests/supervisors/test_reload.py1CODE
LOWtests/benchmarks/ws.py1CODE
LOWtests/benchmarks/test_http.py1CODE
LOWtests/benchmarks/http.py1CODE
LOWtests/benchmarks/test_ws.py1CODE
LOWtests/protocols/test_utils.py1CODE
LOWtests/protocols/test_websocket.py1CODE
LOWtests/protocols/test_websocket.py44CODE
LOWtests/protocols/test_websocket.py45CODE
LOWtests/protocols/test_http.py1CODE
LOWtests/protocols/test_http2.py1CODE
LOWuvicorn/logging.py1CODE
LOWuvicorn/_types.py31CODE
LOWuvicorn/server.py1CODE
LOWuvicorn/_ansi.py1CODE
LOWuvicorn/config.py1CODE
LOWuvicorn/_subprocess.py6CODE
LOWuvicorn/__init__.py1CODE
LOWuvicorn/__init__.py2CODE
LOWuvicorn/__init__.py2CODE
LOWuvicorn/__init__.py2CODE
LOWuvicorn/workers.py1CODE
LOWuvicorn/_compat.py1CODE
LOWuvicorn/_compat.py11CODE
LOWuvicorn/_compat.py13CODE
LOWuvicorn/main.py1CODE
LOWuvicorn/middleware/asgi2.py1CODE
LOWuvicorn/middleware/asgi2.py1CODE
LOWuvicorn/middleware/asgi2.py1CODE
LOWuvicorn/middleware/asgi2.py1CODE
LOWuvicorn/middleware/proxy_headers.py1CODE
LOWuvicorn/middleware/message_logger.py4CODE
LOWuvicorn/middleware/message_logger.py4CODE
LOWuvicorn/middleware/message_logger.py4CODE
LOWuvicorn/middleware/message_logger.py4CODE
LOWuvicorn/middleware/message_logger.py4CODE
LOWuvicorn/middleware/message_logger.py4CODE
LOWuvicorn/middleware/wsgi.py1CODE
LOWuvicorn/supervisors/statreload.py1CODE
LOWuvicorn/supervisors/__init__.py1CODE
LOWuvicorn/supervisors/__init__.py6CODE
LOWuvicorn/supervisors/watchfilesreload.py1CODE
23 more matches not shown…
Empty Error Handlers11 hits · 55 pts
SeverityFileLineSnippetContext
HIGHtests/test_main.py36except Exception: # pragma: no coverCODE
HIGHtests/protocols/test_http.py1042except Exception: # pragma: no coverCODE
HIGHtests/protocols/test_http2.py1163except ssl.SSLWantReadError:CODE
HIGHtests/protocols/test_http2.py1171except ssl.SSLWantReadError:CODE
HIGHuvicorn/config.py331except ValueError: # pragma: full coverageCODE
HIGHuvicorn/_subprocess.py81except KeyboardInterrupt: # pragma: no coverCODE
HIGHuvicorn/main.py633except KeyboardInterrupt: # pragma: full coverageCODE
HIGHuvicorn/protocols/websockets/websockets_sansio_impl.py403except ClientDisconnected:CODE
HIGHuvicorn/protocols/websockets/wsproto_impl.py363except ClientDisconnected:CODE
HIGHuvicorn/protocols/http/h11_impl.py119except h11.LocalProtocolError:CODE
HIGHuvicorn/protocols/http/httptools_impl.py66except AttributeError: # pragma: no coverCODE
Deep Nesting32 hits · 30 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py182CODE
LOWtests/test_server.py90CODE
LOWtests/test_server.py95CODE
LOWtests/supervisors/test_reload.py76CODE
LOWtests/protocols/test_websocket.py468CODE
LOWtests/protocols/test_websocket.py504CODE
LOWtests/protocols/test_websocket.py475CODE
LOWtests/protocols/test_websocket.py507CODE
LOWtests/protocols/test_http2.py210CODE
LOWuvicorn/server.py115CODE
LOWuvicorn/config.py151CODE
LOWuvicorn/config.py196CODE
LOWuvicorn/config.py387CODE
LOWuvicorn/middleware/proxy_headers.py28CODE
LOWuvicorn/middleware/proxy_headers.py108CODE
LOWuvicorn/supervisors/watchfilesreload.py37CODE
LOWuvicorn/lifespan/on.py102CODE
LOWuvicorn/protocols/websockets/websockets_sansio_impl.py195CODE
LOWuvicorn/protocols/websockets/websockets_sansio_impl.py425CODE
LOWuvicorn/protocols/websockets/websockets_impl.py277CODE
LOWuvicorn/protocols/websockets/wsproto_impl.py177CODE
LOWuvicorn/protocols/websockets/wsproto_impl.py377CODE
LOWuvicorn/protocols/http/zttp_impl.py144CODE
LOWuvicorn/protocols/http/zttp_impl.py359CODE
LOWuvicorn/protocols/http/zttp_impl.py405CODE
LOWuvicorn/protocols/http/zttp_h2_impl.py162CODE
LOWuvicorn/protocols/http/zttp_h2_impl.py380CODE
LOWuvicorn/protocols/http/zttp_h2_impl.py432CODE
LOWuvicorn/protocols/http/h11_impl.py177CODE
LOWuvicorn/protocols/http/h11_impl.py405CODE
LOWuvicorn/protocols/http/httptools_impl.py416CODE
LOWuvicorn/protocols/http/httptools_impl.py459CODE
Decorative Section Separators7 hits · 21 pts
SeverityFileLineSnippetContext
MEDIUMtests/middleware/test_proxy_headers.py80 ## -----------------------------COMMENT
MEDIUMtests/middleware/test_proxy_headers.py117 ## -----------------------------COMMENT
MEDIUMtests/middleware/test_proxy_headers.py157 ## -----------------------------COMMENT
MEDIUMtests/middleware/test_proxy_headers.py194 ## -----------------------------COMMENT
MEDIUMtests/middleware/test_proxy_headers.py231 ## -----------------------------COMMENT
MEDIUMtests/middleware/test_proxy_headers.py268 ## -----------------------------COMMENT
MEDIUMtests/middleware/test_proxy_headers.py305 ## -----------------------------COMMENT
Modern Structural Boilerplate4 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/benchmarks/http.py109 def set_protocol(self, protocol: asyncio.Protocol) -> None:CODE
LOWuvicorn/__init__.py5__all__ = ["main", "run", "Config", "Server"]CODE
LOWuvicorn/_compat.py8__all__ = ["asyncio_run", "iscoroutinefunction"]CODE
LOWuvicorn/supervisors/__init__.py16__all__ = ["Multiprocess", "ChangeReload"]CODE
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMuvicorn/server.py167 # Create a socket using UNIX domain socket.COMMENT
Excessive Try-Catch Wrapping3 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/test_main.py36 except Exception: # pragma: no coverCODE
LOWtests/protocols/test_websocket.py1141 except Exception as exc:CODE
LOWtests/protocols/test_http.py1042 except Exception: # pragma: no coverCODE
AI Structural Patterns2 hits · 2 pts
SeverityFileLineSnippetContext
LOWuvicorn/config.py196CODE
LOWuvicorn/main.py503CODE
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWuvicorn/protocols/http/zttp_h2_impl.py192 def handle_request(self, event: zttp.Request) -> None:CODE