An ASGI web server, for Python. 🦄
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.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 282 finding(s).
Are imports declared and package/API names verified? 83 finding(s).
Are wrappers, guards, and repeated structures necessary? 292 finding(s).
Which changes need focused human review? 409 finding(s).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/conftest.py | 42 | def tls_certificate_authority() -> trustme.CA: | CODE |
| LOW⚡ | tests/conftest.py | 58 | def tls_ca_certificate_pem_path(tls_certificate_authority: trustme.CA): | CODE |
| LOW⚡ | tests/conftest.py | 64 | def tls_ca_certificate_private_key_path(tls_certificate_authority: trustme.CA): | CODE |
| LOW⚡ | tests/conftest.py | 70 | def tls_certificate_private_key_encrypted_path(tls_certificate): | CODE |
| LOW⚡ | tests/conftest.py | 86 | def tls_certificate_private_key_path(tls_certificate: trustme.CA): | CODE |
| LOW⚡ | tests/conftest.py | 92 | def tls_certificate_key_and_chain_path(tls_certificate: trustme.LeafCert): | CODE |
| LOW⚡ | tests/conftest.py | 98 | def tls_certificate_server_cert_path(tls_certificate: trustme.LeafCert): | CODE |
| LOW | tests/conftest.py | 111 | def reload_directory_structure(tmp_path_factory: pytest.TempPathFactory): | CODE |
| LOW | tests/test_server.py | 90 | async def test_shutdown_on_early_exit_during_startup(unused_tcp_port: int): | CODE |
| LOW | tests/test_server.py | 125 | def test_run_exits_with_startup_failure_on_unloadable_app() -> None: | CODE |
| LOW | tests/test_server.py | 140 | async def test_request_than_limit_max_requests_warn_log( | CODE |
| LOW | tests/test_server.py | 153 | async def test_limit_max_requests_jitter( | CODE |
| LOW | tests/test_server.py | 206 | async def test_contextvars_preserved_by_default( | CODE |
| LOW | tests/test_server.py | 229 | async def test_reset_contextvars_asyncio( | CODE |
| LOW | tests/test_ssl.py | 106 | async def test_run_ssl_context_factory_default( | CODE |
| LOW | tests/test_ssl.py | 133 | async def test_run_ssl_context_factory_custom( | CODE |
| LOW | tests/test_ssl.py | 159 | def test_ssl_context_factory_mutates_default( | CODE |
| LOW | tests/test_ssl.py | 182 | def test_default_ssl_context_factory_requires_ssl_certfile() -> None: | CODE |
| LOW | tests/test_ssl.py | 193 | def test_ssl_context_factory_must_return_ssl_context() -> None: | CODE |
| LOW | tests/test_ssl.py | 202 | def test_ssl_ciphers_applied_when_set( | CODE |
| LOW | tests/test_ssl.py | 216 | def test_is_ssl_true_when_only_factory_set() -> None: | CODE |
| LOW | tests/utils.py | 51 | def get_asyncio_default_loop_per_os() -> type[asyncio.AbstractEventLoop]: | CODE |
| LOW⚡ | tests/test_compat.py | 17 | def test_asyncio_run__default_loop_factory() -> None: | CODE |
| LOW⚡ | tests/test_compat.py | 21 | def test_asyncio_run__custom_loop_factory() -> None: | CODE |
| LOW⚡ | tests/test_compat.py | 25 | def test_asyncio_run__passing_a_non_awaitable_callback_should_throw_error() -> None: | CODE |
| LOW | tests/test_config.py | 30 | def mocked_logging_config_module(mocker: MockerFixture) -> MagicMock: | CODE |
| LOW | tests/test_config.py | 56 | def test_config_should_reload_is_set(app: ASGIApplication, expected_should_reload: bool) -> None: | CODE |
| LOW | tests/test_config.py | 62 | def test_should_warn_on_invalid_reload_configuration(tmp_path: Path, caplog: pytest.LogCaptureFixture) -> None: | CODE |
| LOW | tests/test_config.py | 91 | def test_non_existant_reload_dir_is_not_set(reload_directory_structure: Path, caplog: pytest.LogCaptureFixture) -> None: | CODE |
| LOW | tests/test_config.py | 102 | def test_reload_subdir_removal(reload_directory_structure: Path) -> None: | CODE |
| LOW | tests/test_config.py | 112 | def test_reload_included_dir_is_added_to_reload_dirs( | CODE |
| LOW | tests/test_config.py | 129 | def test_reload_dir_subdirectories_are_removed( | CODE |
| LOW | tests/test_config.py | 151 | def test_reload_excluded_subdirectories_are_removed( | CODE |
| LOW | tests/test_config.py | 168 | def test_reload_includes_exclude_dir_patterns_are_matched( | CODE |
| LOW | tests/test_config.py | 208 | def test_app_unimportable_module() -> None: | CODE |
| LOW | tests/test_config.py | 214 | def test_app_unimportable_other(caplog: pytest.LogCaptureFixture) -> None: | CODE |
| LOW | tests/test_config.py | 375 | def test_log_config_yaml_missing_pyyaml(mocked_logging_config_module: MagicMock, mocker: MockerFixture) -> None: | CODE |
| LOW | tests/test_config.py | 432 | def test_forwarded_allow_ips_default(monkeypatch: pytest.MonkeyPatch) -> None: | CODE |
| LOW | tests/test_config.py | 490 | def test_config_log_effective_level(log_level: int, uvicorn_logger_level: int) -> None: | CODE |
| LOW | tests/test_config.py | 509 | def test_config_log_level_case_insensitive(log_level: str) -> None: | CODE |
| LOW | tests/test_config.py | 516 | def test_ws_websockets_emits_deprecation_warning() -> None: | CODE |
| LOW | tests/test_config.py | 544 | def test_bind_unix_socket_works_with_reload_or_workers( | CODE |
| LOW | tests/test_config.py | 565 | def test_bind_fd_works_with_reload_or_workers(reload: bool, workers: int): # pragma: py-win32 | CODE |
| LOW | tests/test_config.py | 600 | def test_bind_stdin_works_with_reload_or_workers( | CODE |
| LOW | tests/test_config.py | 622 | def test_config_use_subprocess(reload: bool, workers: int, expected: bool): | CODE |
| LOW | tests/test_config.py | 628 | def test_warn_when_using_reload_and_workers(caplog: pytest.LogCaptureFixture) -> None: | CODE |
| LOW | tests/test_config.py | 653 | def test_custom_loop__importable_custom_loop_setup_function() -> None: | CODE |
| LOW | tests/test_config.py | 665 | def test_custom_loop__not_importable_custom_loop_setup_function(caplog: pytest.LogCaptureFixture) -> None: | CODE |
| LOW | tests/test_config.py | 679 | def test_setup_event_loop_is_removed(caplog: pytest.LogCaptureFixture) -> None: | CODE |
| LOW | tests/test_lifespan.py | 92 | def test_lifespan_auto_with_error(): | CODE |
| LOW | tests/test_lifespan.py | 110 | def test_lifespan_on_with_error(): | CODE |
| LOW | tests/test_lifespan.py | 131 | def test_lifespan_with_failed_startup(mode, raise_exception, caplog): | CODE |
| LOW | tests/test_lifespan.py | 210 | def test_lifespan_with_failed_shutdown(mode, raise_exception, caplog): | CODE |
| LOW | tests/test_cli.py | 80 | def test_cli_call_change_reload_run() -> None: | CODE |
| LOW | tests/test_cli.py | 92 | def test_cli_call_multiprocess_run() -> None: | CODE |
| LOW | tests/test_cli.py | 128 | def test_cli_incomplete_app_parameter() -> None: | CODE |
| LOW | tests/test_cli.py | 177 | def test_ignore_environment_variable_when_set_on_cli(): | CODE |
| LOW | tests/test_cli.py | 208 | def test_set_app_via_environment_variable(): | CODE |
| LOW | tests/test_main.py | 80 | def test_run_invalid_app_config_combination(caplog: pytest.LogCaptureFixture) -> None: | CODE |
| LOW | tests/test_main.py | 91 | def test_run_fails_fast_in_parent_on_bad_app_path( | CODE |
| 186 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | uvicorn/protocols/websockets/websockets_sansio_impl.py | 0 | called by the transport when the write buffer exceeds the high water mark. | STRING |
| HIGH | uvicorn/protocols/websockets/wsproto_impl.py | 0 | called by the transport when the write buffer exceeds the high water mark. | STRING |
| HIGH | uvicorn/protocols/http/zttp_impl.py | 0 | called by the transport when the write buffer exceeds the high water mark. | STRING |
| HIGH | uvicorn/protocols/http/zttp_h2_impl.py | 0 | called by the transport when the write buffer exceeds the high water mark. | STRING |
| HIGH | uvicorn/protocols/http/h11_impl.py | 0 | called by the transport when the write buffer exceeds the high water mark. | STRING |
| HIGH | uvicorn/protocols/http/httptools_impl.py | 0 | called by the transport when the write buffer exceeds the high water mark. | STRING |
| HIGH | uvicorn/protocols/websockets/websockets_sansio_impl.py | 0 | called by the transport when the write buffer drops below the low water mark. | STRING |
| HIGH | uvicorn/protocols/websockets/wsproto_impl.py | 0 | called by the transport when the write buffer drops below the low water mark. | STRING |
| HIGH | uvicorn/protocols/http/zttp_impl.py | 0 | called by the transport when the write buffer drops below the low water mark. | STRING |
| HIGH | uvicorn/protocols/http/zttp_h2_impl.py | 0 | called by the transport when the write buffer drops below the low water mark. | STRING |
| HIGH | uvicorn/protocols/http/h11_impl.py | 0 | called by the transport when the write buffer drops below the low water mark. | STRING |
| HIGH | uvicorn/protocols/http/httptools_impl.py | 0 | called by the transport when the write buffer drops below the low water mark. | STRING |
| HIGH | uvicorn/protocols/http/zttp_impl.py | 0 | called by the server to commence a graceful shutdown. | STRING |
| HIGH | uvicorn/protocols/http/h11_impl.py | 0 | called by the server to commence a graceful shutdown. | STRING |
| HIGH | uvicorn/protocols/http/httptools_impl.py | 0 | called by the server to commence a graceful shutdown. | STRING |
| HIGH | uvicorn/protocols/http/zttp_impl.py | 0 | called on a keep-alive connection if no new data is received after a short delay. | STRING |
| HIGH | uvicorn/protocols/http/zttp_h2_impl.py | 0 | called on a keep-alive connection if no new data is received after a short delay. | STRING |
| HIGH | uvicorn/protocols/http/h11_impl.py | 0 | called on a keep-alive connection if no new data is received after a short delay. | STRING |
| HIGH | uvicorn/protocols/http/httptools_impl.py | 0 | called on a keep-alive connection if no new data is received after a short delay. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/conftest.py | 1 | CODE | |
| LOW | tests/test_subprocess.py | 1 | CODE | |
| LOW | tests/test_server.py | 1 | CODE | |
| LOW | tests/test_ssl.py | 1 | CODE | |
| LOW | tests/utils.py | 1 | CODE | |
| LOW | tests/test_compat.py | 1 | CODE | |
| LOW | tests/test_config.py | 1 | CODE | |
| LOW | tests/custom_loop_utils.py | 1 | CODE | |
| LOW | tests/test_default_headers.py | 1 | CODE | |
| LOW | tests/middleware/test_logging.py | 1 | CODE | |
| LOW | tests/middleware/test_logging.py | 22 | CODE | |
| LOW | tests/middleware/test_logging.py | 23 | CODE | |
| LOW | tests/middleware/test_proxy_headers.py | 1 | CODE | |
| LOW | tests/middleware/test_wsgi.py | 1 | CODE | |
| LOW | tests/importer/circular_import_b.py | 2 | CODE | |
| LOW | tests/importer/circular_import_a.py | 2 | CODE | |
| LOW | tests/importer/raise_import_error.py | 5 | CODE | |
| LOW | tests/supervisors/test_multiprocess.py | 1 | CODE | |
| LOW | tests/supervisors/test_reload.py | 1 | CODE | |
| LOW | tests/benchmarks/ws.py | 1 | CODE | |
| LOW | tests/benchmarks/test_http.py | 1 | CODE | |
| LOW | tests/benchmarks/http.py | 1 | CODE | |
| LOW | tests/benchmarks/test_ws.py | 1 | CODE | |
| LOW | tests/protocols/test_utils.py | 1 | CODE | |
| LOW | tests/protocols/test_websocket.py | 1 | CODE | |
| LOW | tests/protocols/test_websocket.py | 44 | CODE | |
| LOW | tests/protocols/test_websocket.py | 45 | CODE | |
| LOW | tests/protocols/test_http.py | 1 | CODE | |
| LOW | tests/protocols/test_http2.py | 1 | CODE | |
| LOW | uvicorn/logging.py | 1 | CODE | |
| LOW | uvicorn/_types.py | 31 | CODE | |
| LOW | uvicorn/server.py | 1 | CODE | |
| LOW | uvicorn/_ansi.py | 1 | CODE | |
| LOW | uvicorn/config.py | 1 | CODE | |
| LOW | uvicorn/_subprocess.py | 6 | CODE | |
| LOW | uvicorn/__init__.py | 1 | CODE | |
| LOW | uvicorn/__init__.py | 2 | CODE | |
| LOW | uvicorn/__init__.py | 2 | CODE | |
| LOW | uvicorn/__init__.py | 2 | CODE | |
| LOW | uvicorn/workers.py | 1 | CODE | |
| LOW | uvicorn/_compat.py | 1 | CODE | |
| LOW | uvicorn/_compat.py | 11 | CODE | |
| LOW | uvicorn/_compat.py | 13 | CODE | |
| LOW | uvicorn/main.py | 1 | CODE | |
| LOW | uvicorn/middleware/asgi2.py | 1 | CODE | |
| LOW | uvicorn/middleware/asgi2.py | 1 | CODE | |
| LOW | uvicorn/middleware/asgi2.py | 1 | CODE | |
| LOW | uvicorn/middleware/asgi2.py | 1 | CODE | |
| LOW | uvicorn/middleware/proxy_headers.py | 1 | CODE | |
| LOW | uvicorn/middleware/message_logger.py | 4 | CODE | |
| LOW | uvicorn/middleware/message_logger.py | 4 | CODE | |
| LOW | uvicorn/middleware/message_logger.py | 4 | CODE | |
| LOW | uvicorn/middleware/message_logger.py | 4 | CODE | |
| LOW | uvicorn/middleware/message_logger.py | 4 | CODE | |
| LOW | uvicorn/middleware/message_logger.py | 4 | CODE | |
| LOW | uvicorn/middleware/wsgi.py | 1 | CODE | |
| LOW | uvicorn/supervisors/statreload.py | 1 | CODE | |
| LOW | uvicorn/supervisors/__init__.py | 1 | CODE | |
| LOW | uvicorn/supervisors/__init__.py | 6 | CODE | |
| LOW | uvicorn/supervisors/watchfilesreload.py | 1 | CODE | |
| 23 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/test_main.py | 36 | except Exception: # pragma: no cover | CODE |
| HIGH | tests/protocols/test_http.py | 1042 | except Exception: # pragma: no cover | CODE |
| HIGH | tests/protocols/test_http2.py | 1163 | except ssl.SSLWantReadError: | CODE |
| HIGH | tests/protocols/test_http2.py | 1171 | except ssl.SSLWantReadError: | CODE |
| HIGH | uvicorn/config.py | 331 | except ValueError: # pragma: full coverage | CODE |
| HIGH | uvicorn/_subprocess.py | 81 | except KeyboardInterrupt: # pragma: no cover | CODE |
| HIGH | uvicorn/main.py | 633 | except KeyboardInterrupt: # pragma: full coverage | CODE |
| HIGH | uvicorn/protocols/websockets/websockets_sansio_impl.py | 403 | except ClientDisconnected: | CODE |
| HIGH | uvicorn/protocols/websockets/wsproto_impl.py | 363 | except ClientDisconnected: | CODE |
| HIGH | uvicorn/protocols/http/h11_impl.py | 119 | except h11.LocalProtocolError: | CODE |
| HIGH | uvicorn/protocols/http/httptools_impl.py | 66 | except AttributeError: # pragma: no cover | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/conftest.py | 182 | CODE | |
| LOW | tests/test_server.py | 90 | CODE | |
| LOW | tests/test_server.py | 95 | CODE | |
| LOW | tests/supervisors/test_reload.py | 76 | CODE | |
| LOW | tests/protocols/test_websocket.py | 468 | CODE | |
| LOW | tests/protocols/test_websocket.py | 504 | CODE | |
| LOW | tests/protocols/test_websocket.py | 475 | CODE | |
| LOW | tests/protocols/test_websocket.py | 507 | CODE | |
| LOW | tests/protocols/test_http2.py | 210 | CODE | |
| LOW | uvicorn/server.py | 115 | CODE | |
| LOW | uvicorn/config.py | 151 | CODE | |
| LOW | uvicorn/config.py | 196 | CODE | |
| LOW | uvicorn/config.py | 387 | CODE | |
| LOW | uvicorn/middleware/proxy_headers.py | 28 | CODE | |
| LOW | uvicorn/middleware/proxy_headers.py | 108 | CODE | |
| LOW | uvicorn/supervisors/watchfilesreload.py | 37 | CODE | |
| LOW | uvicorn/lifespan/on.py | 102 | CODE | |
| LOW | uvicorn/protocols/websockets/websockets_sansio_impl.py | 195 | CODE | |
| LOW | uvicorn/protocols/websockets/websockets_sansio_impl.py | 425 | CODE | |
| LOW | uvicorn/protocols/websockets/websockets_impl.py | 277 | CODE | |
| LOW | uvicorn/protocols/websockets/wsproto_impl.py | 177 | CODE | |
| LOW | uvicorn/protocols/websockets/wsproto_impl.py | 377 | CODE | |
| LOW | uvicorn/protocols/http/zttp_impl.py | 144 | CODE | |
| LOW | uvicorn/protocols/http/zttp_impl.py | 359 | CODE | |
| LOW | uvicorn/protocols/http/zttp_impl.py | 405 | CODE | |
| LOW | uvicorn/protocols/http/zttp_h2_impl.py | 162 | CODE | |
| LOW | uvicorn/protocols/http/zttp_h2_impl.py | 380 | CODE | |
| LOW | uvicorn/protocols/http/zttp_h2_impl.py | 432 | CODE | |
| LOW | uvicorn/protocols/http/h11_impl.py | 177 | CODE | |
| LOW | uvicorn/protocols/http/h11_impl.py | 405 | CODE | |
| LOW | uvicorn/protocols/http/httptools_impl.py | 416 | CODE | |
| LOW | uvicorn/protocols/http/httptools_impl.py | 459 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/middleware/test_proxy_headers.py | 80 | ## ----------------------------- | COMMENT |
| MEDIUM | tests/middleware/test_proxy_headers.py | 117 | ## ----------------------------- | COMMENT |
| MEDIUM | tests/middleware/test_proxy_headers.py | 157 | ## ----------------------------- | COMMENT |
| MEDIUM | tests/middleware/test_proxy_headers.py | 194 | ## ----------------------------- | COMMENT |
| MEDIUM | tests/middleware/test_proxy_headers.py | 231 | ## ----------------------------- | COMMENT |
| MEDIUM | tests/middleware/test_proxy_headers.py | 268 | ## ----------------------------- | COMMENT |
| MEDIUM | tests/middleware/test_proxy_headers.py | 305 | ## ----------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/benchmarks/http.py | 109 | def set_protocol(self, protocol: asyncio.Protocol) -> None: | CODE |
| LOW | uvicorn/__init__.py | 5 | __all__ = ["main", "run", "Config", "Server"] | CODE |
| LOW | uvicorn/_compat.py | 8 | __all__ = ["asyncio_run", "iscoroutinefunction"] | CODE |
| LOW | uvicorn/supervisors/__init__.py | 16 | __all__ = ["Multiprocess", "ChangeReload"] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | uvicorn/server.py | 167 | # Create a socket using UNIX domain socket. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_main.py | 36 | except Exception: # pragma: no cover | CODE |
| LOW | tests/protocols/test_websocket.py | 1141 | except Exception as exc: | CODE |
| LOW | tests/protocols/test_http.py | 1042 | except Exception: # pragma: no cover | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | uvicorn/config.py | 196 | CODE | |
| LOW | uvicorn/main.py | 503 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | uvicorn/protocols/http/zttp_h2_impl.py | 192 | def handle_request(self, event: zttp.Request) -> None: | CODE |