Asynchronous HTTP client/server framework for asyncio and Python
This report summarizes scanner evidence for aio-libs/aiohttp, a Python project with 16,572 GitHub stars. SynthScan examined 113,282 lines of code across 239 source files, recording 3138 pattern matches distributed across 21 syntactic categories. The legacy adjusted pattern signal is 24.3 (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? 2734 finding(s).
Are imports declared and package/API names verified? 325 finding(s).
Are wrappers, guards, and repeated structures necessary? 2504 finding(s).
Which changes need focused human review? 3138 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 3138 distinct pattern matches across 21 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 | aiohttp/web_ws.py | 246 | def _handle_ping_pong_exception(self, exc: BaseException) -> None: | CODE |
| LOW⚡ | aiohttp/web_ws.py | 586 | def _set_code_close_transport(self, code: int) -> None: | CODE |
| LOW | aiohttp/client_middlewares.py | 35 | async def single_middleware_handler(req: ClientRequest) -> ClientResponse: | CODE |
| LOW | aiohttp/multipart.py | 85 | def parse_content_disposition( | CODE |
| LOW | aiohttp/multipart.py | 194 | def content_disposition_filename( | CODE |
| LOW | aiohttp/multipart.py | 568 | def _apply_content_transfer_decoding(self, data: bytes) -> bytes: | CODE |
| LOW | aiohttp/multipart.py | 889 | async def _read_until_first_boundary(self) -> None: | CODE |
| LOW | aiohttp/web_response.py | 318 | def _generate_content_type_header( | CODE |
| LOW | aiohttp/client_ws.py | 222 | def _handle_ping_pong_exception(self, exc: BaseException) -> None: | CODE |
| LOW | aiohttp/tracing.py | 136 | def on_response_chunk_received( | CODE |
| LOW | aiohttp/tracing.py | 158 | def on_connection_queued_start( | CODE |
| LOW | aiohttp/tracing.py | 170 | def on_connection_create_start( | CODE |
| LOW | aiohttp/tracing.py | 368 | async def send_response_chunk_received( | CODE |
| LOW⚡ | aiohttp/tracing.py | 416 | async def send_connection_queued_start(self) -> None: | CODE |
| LOW⚡ | aiohttp/tracing.py | 421 | async def send_connection_queued_end(self) -> None: | CODE |
| LOW⚡ | aiohttp/tracing.py | 426 | async def send_connection_create_start(self) -> None: | CODE |
| LOW⚡ | aiohttp/tracing.py | 431 | async def send_connection_create_end(self) -> None: | CODE |
| LOW⚡ | aiohttp/tracing.py | 436 | async def send_connection_reuseconn(self) -> None: | CODE |
| LOW⚡ | aiohttp/tracing.py | 441 | async def send_dns_resolvehost_start(self, host: str) -> None: | CODE |
| LOW | aiohttp/web_exceptions.py | 499 | def _initialize_default_reason() -> None: | CODE |
| LOW | aiohttp/web_middlewares.py | 49 | def normalize_path_middleware( | CODE |
| LOW | aiohttp/streams.py | 305 | def begin_http_chunk_receiving(self) -> None: | CODE |
| LOW | aiohttp/web_protocol.py | 132 | class RequestHandler(BaseProtocol, Generic[_Request]): | CODE |
| LOW | aiohttp/web_protocol.py | 535 | def _resume_reading_if_drained(self) -> None: | CODE |
| LOW | aiohttp/client.py | 255 | async def _connect_and_send_request(req: ClientRequest) -> ClientResponse: | CODE |
| LOW | aiohttp/web_urldispatcher.py | 642 | def _resolve_path_to_response(self, unresolved_path: Path) -> StreamResponse: | CODE |
| LOW | aiohttp/client_proto.py | 32 | class ResponseHandler(BaseProtocol, DataQueue[tuple[RawResponseMessage, StreamReader]]): | CODE |
| LOW | aiohttp/base_protocol.py | 76 | def _pause_reading_for_buffer(self) -> None: | CODE |
| LOW | aiohttp/base_protocol.py | 86 | def _resume_reading_for_buffer(self) -> None: | CODE |
| LOW | aiohttp/base_protocol.py | 101 | def _resume_transport_reading(self) -> None: | CODE |
| LOW | aiohttp/payload.py | 472 | def _set_or_restore_start_position(self) -> None: | CODE |
| LOW | aiohttp/client_reqrep.py | 136 | def _gen_default_accept_encoding() -> str: | CODE |
| LOW | aiohttp/client_reqrep.py | 877 | async def _on_chunk_response_received(self, chunk: bytes) -> None: | CODE |
| LOW | aiohttp/client_reqrep.py | 1424 | def _update_transfer_encoding(self) -> None: | CODE |
| LOW | aiohttp/connector.py | 639 | def _update_proxy_auth_header_and_build_proxy_req( | CODE |
| LOW | aiohttp/connector.py | 722 | async def _wait_for_available_connection( | CODE |
| LOW | aiohttp/connector.py | 1252 | async def _resolve_host_with_throttle( | CODE |
| LOW | aiohttp/connector.py | 1528 | def _convert_hosts_to_addr_infos( | CODE |
| LOW | aiohttp/connector.py | 1549 | async def _create_direct_connection( | CODE |
| LOW | aiohttp/web_fileresponse.py | 237 | def _get_file_path_stat_encoding( | CODE |
| LOW | aiohttp/_cookie_helpers.py | 96 | def preserve_morsel_with_coded_value(cookie: Morsel[str]) -> Morsel[str]: | STRING |
| LOW | aiohttp/http_writer.py | 133 | def _send_headers_with_payload( | CODE |
| LOW | aiohttp/helpers.py | 435 | def content_disposition_header( | CODE |
| LOW | aiohttp/helpers.py | 1190 | def should_remove_content_length(method: str, code: int) -> bool: | CODE |
| LOW | aiohttp/http_parser.py | 1268 | def begin_http_chunk_receiving(self) -> None: | CODE |
| LOW | aiohttp/cookiejar.py | 457 | def update_cookies_from_headers( | CODE |
| LOW | aiohttp/cookiejar.py | 716 | def _filter_cookies_within_limits( | CODE |
| LOW | aiohttp/cookiejar.py | 918 | def update_cookies_from_headers( | CODE |
| LOW | aiohttp/abc.py | 195 | def update_cookies_from_headers( | CODE |
| LOW | aiohttp/_websocket/writer.py | 198 | def _send_compressed_frame_sync( | CODE |
| LOW | aiohttp/_websocket/writer.py | 226 | async def _send_compressed_frame_async_locked( | CODE |
| LOW⚡ | tests/test_connector.py | 2956 | async def test_close_cancels_cleanup_handle(key: ConnectionKey) -> None: | CODE |
| LOW⚡ | tests/test_connector.py | 2964 | async def test_close_cancels_resolve_host(make_client_request: _RequestMaker) -> None: | CODE |
| LOW⚡ | tests/test_connector.py | 3338 | async def test_close_cancels_cleanup_closed_handle() -> None: | CODE |
| LOW⚡ | tests/test_connector.py | 3345 | async def test_ctor_with_default_loop() -> None: | CODE |
| LOW⚡ | tests/test_connector.py | 3352 | async def test_base_connector_allows_high_level_protocols() -> None: | CODE |
| LOW⚡ | tests/test_connector.py | 3875 | async def test_limit_per_host_property() -> None: | CODE |
| LOW⚡ | tests/test_connector.py | 3882 | async def test_limit_property_default() -> None: | CODE |
| LOW⚡ | tests/test_connector.py | 3888 | async def test_limit_per_host_property_default() -> None: | CODE |
| LOW⚡ | tests/test_connector.py | 3894 | async def test_force_close_and_explicit_keep_alive() -> None: | CODE |
| 2336 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | aiohttp/client_middlewares.py | 44 | # Create a new closure that captures the current state | COMMENT |
| MEDIUM | aiohttp/resolver.py | 228 | # Create a new resolver and client set for this loop if it doesn't exist | COMMENT |
| MEDIUM | aiohttp/connector.py | 1448 | tls_proto = self._factory() # Create a brand new proto for TLS | CODE |
| MEDIUM | aiohttp/client_middleware_digest_auth.py | 357 | # Define a dict mapping of header fields to their values | COMMENT |
| MEDIUM | aiohttp/_websocket/writer.py | 97 | # Create a task to shield from cancellation | COMMENT |
| MEDIUM | tests/test_connector.py | 2396 | # Create a mock SSL protocol | COMMENT |
| MEDIUM | tests/test_connector.py | 2426 | # Create a mock non-SSL protocol | COMMENT |
| MEDIUM | tests/test_connector.py | 4843 | # Create a connect tunnel connection | COMMENT |
| MEDIUM | tests/test_client_functional.py | 697 | # Create a BytesPayload directly - this ensures we test the path | COMMENT |
| MEDIUM | tests/test_client_functional.py | 774 | # Create a streaming response that continuously sends data | COMMENT |
| MEDIUM | tests/test_client_functional.py | 799 | # Create a background task that continuously reads data | COMMENT |
| MEDIUM | tests/test_client_functional.py | 2615 | # Create a highly compressible payload. | COMMENT |
| MEDIUM | tests/test_client_functional.py | 2647 | # Create a highly compressible payload | COMMENT |
| MEDIUM | tests/test_client_functional.py | 2678 | # Create a highly compressible payload. | COMMENT |
| MEDIUM | tests/test_client_functional.py | 5033 | # Create an async generator of data | COMMENT |
| MEDIUM | tests/test_client_functional.py | 5664 | # Create a mocked payload to verify close() is called | COMMENT |
| MEDIUM | tests/test_client_functional.py | 5694 | # Create a mocked payload to verify close() is called | COMMENT |
| MEDIUM | tests/test_client_functional.py | 5724 | # Create a mocked payload to verify close() is called | COMMENT |
| MEDIUM | tests/test_client_functional.py | 5752 | # Create a mocked payload to verify close() is called | COMMENT |
| MEDIUM | tests/test_client_functional.py | 5893 | # Create a new client session with our fake resolver | COMMENT |
| MEDIUM | tests/test_client_functional.py | 5999 | # Create a test file | COMMENT |
| MEDIUM | tests/test_client_functional.py | 6064 | # Create a test file | COMMENT |
| MEDIUM | tests/test_client_functional.py | 6137 | # Create a test file | COMMENT |
| MEDIUM | tests/test_websocket_parser.py | 50 | # This method is overridden to allow for patching in tests. | COMMENT |
| MEDIUM | tests/test_websocket_parser.py | 59 | # This method is overridden to allow for patching in tests. | COMMENT |
| MEDIUM | tests/test_client_request.py | 164 | # Create a response to test request_info | COMMENT |
| MEDIUM | tests/test_client_request.py | 186 | # Create a response to test request_info | COMMENT |
| MEDIUM | tests/test_client_request.py | 1179 | # Create a BytesPayload which has a size property | COMMENT |
| MEDIUM | tests/test_client_request.py | 1202 | # Create a payload with a known size | COMMENT |
| MEDIUM | tests/test_client_request.py | 1978 | # Create an empty async generator | COMMENT |
| MEDIUM | tests/test_client_request.py | 2000 | # Create a mock payload that tracks if it was closed | COMMENT |
| MEDIUM | tests/test_client_request.py | 2123 | # Create a mock writer and connection | COMMENT |
| MEDIUM | tests/test_client_request.py | 2127 | # Create a request | COMMENT |
| MEDIUM | tests/test_cookie_helpers.py | 47 | # Create a cookie with a coded_value different from value | COMMENT |
| MEDIUM | tests/test_cookiejar.py | 2508 | # Create a shared cookie (no domain/path restrictions) | COMMENT |
| MEDIUM | tests/test_cookiejar.py | 2636 | # Create a truly shared cookie | COMMENT |
| MEDIUM⚡ | tests/test_client_middleware_digest_auth.py | 269 | # Create a modified challenge with an unsupported algorithm | COMMENT |
| MEDIUM⚡ | tests/test_client_middleware_digest_auth.py | 285 | # Create a challenge with the specific algorithm case | COMMENT |
| MEDIUM | tests/test_client_middleware_digest_auth.py | 254 | # Create a modified challenge with the test algorithm | COMMENT |
| MEDIUM | tests/test_client_middleware_digest_auth.py | 305 | # Create a challenge with the specific algorithm case | COMMENT |
| MEDIUM | tests/test_client_middleware_digest_auth.py | 405 | # Create the auth object | COMMENT |
| MEDIUM | tests/test_client_middleware_digest_auth.py | 919 | # Create a session that uses the digest auth middleware | COMMENT |
| MEDIUM | tests/test_client_response.py | 1790 | # Create a SimpleCookie with some cookies | COMMENT |
| MEDIUM | tests/test_client_middleware.py | 877 | # Create a simple server for the allowed request | COMMENT |
| MEDIUM | tests/test_client_middleware.py | 1018 | # Create main server | COMMENT |
| MEDIUM | tests/test_client_middleware.py | 1087 | # Create main server | COMMENT |
| MEDIUM⚡ | tests/test_payload.py | 1354 | # Create a test file with known content | COMMENT |
| MEDIUM | tests/test_payload.py | 374 | # Create a large file that's multiple times larger than DEFAULT_CHUNK_SIZE | COMMENT |
| MEDIUM | tests/test_payload.py | 418 | # Create a custom file-like object that tracks read sizes | COMMENT |
| MEDIUM | tests/test_payload.py | 448 | # Create a large text file that's multiple times larger than DEFAULT_CHUNK_SIZE | COMMENT |
| MEDIUM | tests/test_payload.py | 493 | # Create a custom file-like object that tracks read sizes | COMMENT |
| MEDIUM | tests/test_http_parser.py | 3762 | # Create a large payload (3MiB) that compresses well | COMMENT |
| MEDIUM | tests/test_proxy_functional.py | 1023 | # Create a minimal proxy server | COMMENT |
| MEDIUM | tests/test_client_proto.py | 356 | # Create a mock transport | COMMENT |
| MEDIUM⚡ | tests/test_multipart.py | 1865 | # Create a mock BodyPartReader | COMMENT |
| MEDIUM⚡ | tests/test_multipart.py | 1871 | # Create the payload | COMMENT |
| MEDIUM | tests/test_web_urldispatcher.py | 280 | # This file is below the symlink target and should not be reachable | COMMENT |
| MEDIUM⚡ | tests/test_resolver.py | 549 | # Create a second manager and check it's the same instance | COMMENT |
| MEDIUM⚡ | tests/test_resolver.py | 566 | # Create a mock AsyncResolver for testing | COMMENT |
| MEDIUM⚡ | tests/test_resolver.py | 686 | # Create a mock resolver that will be None when accessed | COMMENT |
| 10 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | aiohttp/multipart.py | 74 | CODE | |
| LOW | aiohttp/web_response.py | 1 | CODE | |
| LOW | aiohttp/web_response.py | 49 | CODE | |
| LOW | aiohttp/test_utils.py | 19 | CODE | |
| LOW | aiohttp/tracing.py | 5 | CODE | |
| LOW | aiohttp/tracing.py | 12 | CODE | |
| LOW | aiohttp/web_middlewares.py | 21 | CODE | |
| LOW | aiohttp/web.py | 14 | CODE | |
| LOW | aiohttp/web.py | 14 | CODE | |
| LOW | aiohttp/web.py | 14 | CODE | |
| LOW | aiohttp/web.py | 17 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| LOW | aiohttp/web.py | 18 | CODE | |
| 256 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .coveragerc.toml | 41 | # NOTE: context. | COMMENT |
| LOW | .coveragerc.toml | 61 | ] | COMMENT |
| LOW | .coveragerc-cython.toml | 41 | # NOTE: context. | COMMENT |
| LOW | aiohttp/streams.py | 321 | # the body transfer. Each offset is the offset of the end of a chunk. | COMMENT |
| LOW | aiohttp/web_urldispatcher.py | 1001 | # the traversal algorithm below can't be applied, and that we likely | COMMENT |
| LOW | aiohttp/client_reqrep.py | 101 | # connection_acquiring_timeout: Optional[float] = None | COMMENT |
| LOW | aiohttp/client_middleware_digest_auth.py | 61 | # +--||--|--|----|------|---|---||-----|-> maybe whitespace | COMMENT |
| LOW | aiohttp/web_fileresponse.py | 321 | # https://www.rfc-editor.org/info/rfc9110/#section-13.1.5-10.2 | COMMENT |
| LOW | aiohttp/web_fileresponse.py | 341 | end: int | None = rng.stop | COMMENT |
| LOW | aiohttp/web_fileresponse.py | 361 | if start < 0: | COMMENT |
| LOW | aiohttp/web_fileresponse.py | 381 | # According to https://tools.ietf.org/html/rfc7233: | COMMENT |
| LOW | aiohttp/_websocket/writer.py | 81 | if not (compress or self.compress) or opcode >= WS_CONTROL_FRAME_OPCODE: | COMMENT |
| LOW | tests/test_web_urldispatcher.py | 261 | async def test_follow_symlink_directory_traversal_after_normalization( | COMMENT |
| LOW | requirements/base-ft.txt | 1 | # | COMMENT |
| LOW | requirements/base-ft.txt | 21 | cffi==2.1.1 | COMMENT |
| LOW | requirements/base-ft.txt | 41 | pycares==5.1.0 | COMMENT |
| LOW | requirements/multidict.txt | 1 | # | COMMENT |
| LOW | requirements/constraints.txt | 1 | # | COMMENT |
| LOW | requirements/constraints.txt | 21 | aiosignal==1.4.0 | COMMENT |
| LOW | requirements/constraints.txt | 41 | # via sphinx | COMMENT |
| LOW | requirements/constraints.txt | 61 | # pycares | COMMENT |
| LOW | requirements/constraints.txt | 81 | # via | COMMENT |
| LOW | requirements/constraints.txt | 101 | # via | COMMENT |
| LOW | requirements/constraints.txt | 121 | # -r requirements/test-common.in | COMMENT |
| LOW | requirements/constraints.txt | 141 | multidict==6.9.1 | COMMENT |
| LOW | requirements/constraints.txt | 161 | # sphinx | COMMENT |
| LOW | requirements/constraints.txt | 181 | # via | COMMENT |
| LOW | requirements/constraints.txt | 201 | # pytest | COMMENT |
| LOW | requirements/constraints.txt | 221 | # -r requirements/lint.in | COMMENT |
| LOW | requirements/constraints.txt | 241 | python-discovery==1.6.1 | COMMENT |
| LOW | requirements/constraints.txt | 261 | # via -r requirements/test-common-base.in | COMMENT |
| LOW | requirements/constraints.txt | 281 | # via sphinx | COMMENT |
| LOW | requirements/constraints.txt | 301 | # pip-tools | COMMENT |
| LOW | requirements/constraints.txt | 321 | # multidict | COMMENT |
| LOW | requirements/constraints.txt | 341 | # via pre-commit | COMMENT |
| LOW | requirements/dev.txt | 1 | # | COMMENT |
| LOW | requirements/dev.txt | 21 | aiosignal==1.4.0 | COMMENT |
| LOW | requirements/dev.txt | 41 | # via sphinx | COMMENT |
| LOW | requirements/dev.txt | 61 | # pycares | COMMENT |
| LOW | requirements/dev.txt | 81 | # sphinx | COMMENT |
| LOW | requirements/dev.txt | 101 | # aiohttp | COMMENT |
| LOW | requirements/dev.txt | 121 | # via | COMMENT |
| LOW | requirements/dev.txt | 141 | # -r requirements/runtime-deps.in | COMMENT |
| LOW | requirements/dev.txt | 161 | pathspec==1.1.1 | COMMENT |
| LOW | requirements/dev.txt | 181 | # yarl | COMMENT |
| LOW | requirements/dev.txt | 201 | # build | COMMENT |
| LOW | requirements/dev.txt | 221 | # via | COMMENT |
| LOW | requirements/dev.txt | 241 | # -r requirements/test-common.in | COMMENT |
| LOW | requirements/dev.txt | 261 | sphinx==8.1.3 | COMMENT |
| LOW | requirements/dev.txt | 281 | # via sphinx | COMMENT |
| LOW | requirements/dev.txt | 301 | # via | COMMENT |
| LOW | requirements/dev.txt | 321 | # via pydantic | COMMENT |
| LOW | requirements/cython.txt | 1 | # | COMMENT |
| LOW | requirements/runtime-deps.txt | 1 | # | COMMENT |
| LOW | requirements/runtime-deps.txt | 21 | cffi==2.1.1 | COMMENT |
| LOW | requirements/runtime-deps.txt | 41 | pycparser==3.0 | COMMENT |
| LOW | requirements/test-common-base.txt | 1 | # | COMMENT |
| LOW | requirements/test-common-base.txt | 21 | freezegun==1.5.5 | COMMENT |
| LOW | requirements/test-common-base.txt | 41 | # pytest | COMMENT |
| LOW | requirements/test-common-base.txt | 61 | pytest-asyncio==1.4.0 | COMMENT |
| 68 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | aiohttp/worker.py | 141 | except Exception: | CODE |
| HIGH | aiohttp/web_exceptions.py | 506 | except ValueError: | CODE |
| HIGH | aiohttp/web.py | 487 | except (GracefulExit, KeyboardInterrupt): | CODE |
| HIGH | aiohttp/web_protocol.py | 277 | except (TypeError, ValueError): | CODE |
| HIGH | aiohttp/web_runner.py | 341 | except NotImplementedError: | CODE |
| HIGH | aiohttp/web_runner.py | 374 | except NotImplementedError: | CODE |
| HIGH | aiohttp/base_protocol.py | 96 | except PAUSE_RESUME_READING_ERRORS: | CODE |
| HIGH | aiohttp/base_protocol.py | 105 | except PAUSE_RESUME_READING_ERRORS: | CODE |
| HIGH | aiohttp/_cookie_helpers.py | 236 | except CookieError: | CODE |
| HIGH | aiohttp/http_writer.py | 393 | except ImportError: | CODE |
| HIGH | aiohttp/helpers.py | 1000 | except KeyError: | CODE |
| HIGH | tests/test_client_session.py | 1404 | except Exception: | CODE |
| HIGH | tests/test_worker.py | 69 | except TypeError: | CODE |
| HIGH | docs/conf.py | 73 | except ImportError: | CODE |
| HIGH | examples/lowlevel_srv.py | 24 | except KeyboardInterrupt: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | aiohttp/web_ws.py | 520 | CODE | |
| LOW | aiohttp/web_ws.py | 611 | CODE | |
| LOW | aiohttp/worker.py | 72 | CODE | |
| LOW | aiohttp/multipart.py | 85 | CODE | |
| LOW | aiohttp/multipart.py | 194 | CODE | |
| LOW | aiohttp/web_response.py | 260 | CODE | |
| LOW | aiohttp/web_response.py | 298 | CODE | |
| LOW | aiohttp/web_response.py | 372 | CODE | |
| LOW | aiohttp/web_response.py | 542 | CODE | |
| LOW | aiohttp/web_response.py | 612 | CODE | |
| LOW | aiohttp/web_response.py | 702 | CODE | |
| LOW | aiohttp/client_ws.py | 400 | CODE | |
| LOW | aiohttp/web_exceptions.py | 499 | CODE | |
| LOW | aiohttp/web.py | 279 | CODE | |
| LOW | aiohttp/web.py | 426 | CODE | |
| LOW | aiohttp/streams.py | 381 | CODE | |
| LOW | aiohttp/streams.py | 479 | CODE | |
| LOW | aiohttp/web_protocol.py | 481 | CODE | |
| LOW | aiohttp/web_protocol.py | 718 | CODE | |
| LOW | aiohttp/client.py | 488 | CODE | |
| LOW | aiohttp/client.py | 1060 | CODE | |
| LOW | aiohttp/web_request.py | 367 | CODE | |
| LOW | aiohttp/web_request.py | 725 | CODE | |
| LOW | aiohttp/web_request.py | 787 | CODE | |
| LOW | aiohttp/client_proto.py | 117 | CODE | |
| LOW | aiohttp/web_runner.py | 319 | CODE | |
| LOW | aiohttp/payload.py | 122 | CODE | |
| LOW | aiohttp/payload.py | 1015 | CODE | |
| LOW | aiohttp/formdata.py | 83 | CODE | |
| LOW | aiohttp/connector.py | 464 | CODE | |
| LOW | aiohttp/connector.py | 543 | CODE | |
| LOW | aiohttp/connector.py | 722 | CODE | |
| LOW | aiohttp/connector.py | 764 | CODE | |
| LOW | aiohttp/connector.py | 1440 | CODE | |
| LOW | aiohttp/connector.py | 1549 | CODE | |
| LOW | aiohttp/connector.py | 1623 | CODE | |
| LOW | aiohttp/web_fileresponse.py | 301 | CODE | |
| LOW | aiohttp/_cookie_helpers.py | 180 | CODE | |
| LOW | aiohttp/http_writer.py | 284 | CODE | |
| LOW | aiohttp/helpers.py | 283 | CODE | |
| LOW | aiohttp/helpers.py | 435 | CODE | |
| LOW | aiohttp/http_parser.py | 180 | CODE | |
| LOW | aiohttp/http_parser.py | 342 | CODE | |
| LOW | aiohttp/http_parser.py | 674 | CODE | |
| LOW | aiohttp/http_parser.py | 825 | CODE | |
| LOW | aiohttp/http_parser.py | 889 | CODE | |
| LOW | aiohttp/http_parser.py | 953 | CODE | |
| LOW | aiohttp/http_parser.py | 984 | CODE | |
| LOW | aiohttp/cookiejar.py | 166 | CODE | |
| LOW | aiohttp/cookiejar.py | 223 | CODE | |
| LOW | aiohttp/cookiejar.py | 370 | CODE | |
| LOW | aiohttp/cookiejar.py | 476 | CODE | |
| LOW | aiohttp/_websocket/writer.py | 74 | CODE | |
| LOW | aiohttp/_websocket/helpers.py | 78 | CODE | |
| LOW | aiohttp/_websocket/reader_py.py | 152 | CODE | |
| LOW | aiohttp/_websocket/reader_py.py | 251 | CODE | |
| LOW | aiohttp/_websocket/reader_py.py | 405 | CODE | |
| LOW | tests/test_client_session.py | 589 | CODE | |
| LOW | tests/test_cookiejar.py | 1761 | CODE | |
| LOW | tests/test_cookiejar.py | 2029 | CODE | |
| 18 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | aiohttp/client.py | 952 | method, url.update_query(params), headers, e # type: ignore[possibly-undefined, arg-type] | CODE |
| HIGH | aiohttp/helpers.py | 939 | self._name = module + "." + name # type: ignore[possibly-undefined] | CODE |
| HIGH⚡ | tests/test_benchmarks_web_fileresponse.py | 199 | return resp # type: ignore[possibly-undefined] | CODE |
| HIGH | tests/test_client_functional.py | 5875 | "av-profile=null; Domain=.amazon.it; " | CODE |
| HIGH | tests/test_benchmarks_http_websocket.py | 27 | b'8","result":{"name":null,"id":"shellyplugus-c049ef8c30e4","mac":"C049EF8C30E' | CODE |
| HIGH | tests/test_benchmarks_http_websocket.py | 29 | b'4b5d4f","ver":"1.1.0","app":"PlugUS","auth_en":false,"auth_domain":null}}' | CODE |
| HIGH | docs/code/client_middleware_cookbook.py | 32 | return resp # type: ignore[possibly-undefined] | CODE |
| HIGH | docs/code/client_middleware_cookbook.py | 69 | return resp # type: ignore[possibly-undefined] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/test_client_middleware.py | 0 | middleware that retries failed requests with exponential backoff. | STRING |
| HIGH | examples/combined_middleware.py | 0 | middleware that retries failed requests with exponential backoff. | STRING |
| HIGH | examples/retry_middleware.py | 0 | middleware that retries failed requests with exponential backoff. | STRING |
| HIGH | examples/web_srv.py | 0 | \ type {url}/hello/john {url}/simple or {url}/change_body in browser url bar | STRING |
| HIGH | examples/web_srv_route_table.py | 0 | \ type {url}/hello/john {url}/simple or {url}/change_body in browser url bar | STRING |
| HIGH | examples/web_srv_route_deco.py | 0 | \ type {url}/hello/john {url}/simple or {url}/change_body in browser url bar | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | aiohttp/payload.py | 624 | # Check if we're done writing | COMMENT |
| LOW | aiohttp/connector.py | 1402 | # Check if uvloop is being used, which supports TLS in TLS, | COMMENT |
| LOW | aiohttp/connector.py | 1407 | # Check if aiofastnet is being used, which supports TLS in TLS | COMMENT |
| LOW | aiohttp/client_middleware_digest_auth.py | 398 | # Check if request starts with space URL | COMMENT |
| LOW | aiohttp/client_middleware_digest_auth.py | 501 | # Check if we need to authenticate | COMMENT |
| LOW | aiohttp/cookiejar.py | 360 | # Check if the cookie hasn't been re-added to the heap | COMMENT |
| LOW | tests/test_client_middleware.py | 409 | # Check if token needs refresh | COMMENT |
| LOW⚡ | tests/test_payload.py | 1295 | # Write file in executor | COMMENT |
| LOW⚡ | tests/test_payload.py | 1299 | # Open file in executor | COMMENT |
| LOW⚡ | tests/test_payload.py | 1360 | # Open the file and create payload | COMMENT |
| LOW⚡ | tests/test_payload.py | 1368 | # Read the file (simulating first request) | COMMENT |
| LOW | tests/test_payload.py | 1319 | # Write file in executor | COMMENT |
| LOW | tests/test_payload.py | 1327 | # Open file in executor | COMMENT |
| LOW | examples/token_refresh_middleware.py | 53 | # Check if another coroutine already refreshed the token | COMMENT |
| LOW | examples/token_refresh_middleware.py | 203 | # Check if token exists and is not expired | COMMENT |
| LOW | examples/basic_auth_middleware.py | 68 | # Check if Authorization header is present | COMMENT |
| LOW | examples/combined_middleware.py | 140 | # Check if we should retry | COMMENT |
| LOW | examples/retry_middleware.py | 69 | # Check if we should retry | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | aiohttp/web_ws.py | 258 | def _set_closed(self) -> None: | CODE |
| LOW⚡ | aiohttp/web_ws.py | 580 | def _set_closing(self, code: int) -> None: | CODE |
| LOW⚡ | aiohttp/web_ws.py | 586 | def _set_code_close_transport(self, code: int) -> None: | CODE |
| LOW | aiohttp/web_response.py | 155 | def _set_status(self, status: int, reason: str | None) -> None: | CODE |
| LOW | aiohttp/client_ws.py | 235 | def _set_closed(self) -> None: | CODE |
| LOW | aiohttp/client_ws.py | 243 | def _set_closing(self) -> None: | CODE |
| LOW | aiohttp/test_utils.py | 538 | def set_dict(app: Any, key: str, value: Any) -> None: | CODE |
| LOW | aiohttp/web_app.py | 206 | def _set_loop(self, loop: asyncio.AbstractEventLoop | None) -> None: | CODE |
| LOW | aiohttp/streams.py | 181 | def set_read_chunk_size(self, n: int) -> None: | CODE |
| LOW | aiohttp/streams.py | 664 | def set_read_chunk_size(self, n: int) -> None: | CODE |
| LOW | aiohttp/compression_utils.py | 159 | def set_zlib_backend(new_zlib_backend: ZLibBackendProtocol) -> None: | CODE |
| LOW | aiohttp/payload.py | 472 | def _set_or_restore_start_position(self) -> None: | CODE |
| LOW | aiohttp/client_reqrep.py | 402 | def _settle(self) -> None: | CODE |
| LOW | aiohttp/client_reqrep.py | 1092 | def _update_headers(self, headers: CIMultiDict[str]) -> None: | CODE |
| LOW | aiohttp/client_reqrep.py | 1366 | def _update_auto_headers(self, skip_auto_headers: Iterable[str] | None) -> None: | CODE |
| LOW | aiohttp/client_reqrep.py | 1385 | def _update_cookies(self, cookies: BaseCookie[str]) -> None: | CODE |
| LOW | aiohttp/client_reqrep.py | 1424 | def _update_transfer_encoding(self) -> None: | CODE |
| LOW | aiohttp/client_reqrep.py | 1443 | def _update_body_from_data(self, body: Any) -> None: | CODE |
| LOW | aiohttp/client_reqrep.py | 1488 | def _update_body(self, body: Any) -> None: | CODE |
| LOW | aiohttp/client_reqrep.py | 1505 | async def update_body(self, body: Any) -> None: | CODE |
| LOW | aiohttp/client_reqrep.py | 1567 | def _update_expect_continue(self, expect: bool = False) -> None: | CODE |
| LOW | aiohttp/http_writer.py | 257 | def set_eof(self) -> None: | CODE |
| LOW | aiohttp/helpers.py | 873 | def set_result(fut: "asyncio.Future[_T]", result: _T) -> None: | CODE |
| LOW | aiohttp/http_parser.py | 658 | def set_upgraded(self, val: bool) -> None: | CODE |
| LOW | tests/test_streams.py | 689 | async def set_err() -> None: | CODE |
| LOW | tests/test_streams.py | 1517 | async def set_err() -> None: | CODE |
| LOW | docs/code/client_middleware_cookbook.py | 98 | async def set_token(session: ClientSession, event: asyncio.Event) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | aiohttp/web_ws.py | 541 | except Exception as exc: | CODE |
| LOW⚡ | aiohttp/web_ws.py | 571 | except Exception as exc: | CODE |
| LOW | aiohttp/web_ws.py | 656 | except Exception as exc: | CODE |
| LOW | aiohttp/worker.py | 141 | except Exception: | CODE |
| LOW | aiohttp/multipart.py | 1238 | except Exception as exc: | CODE |
| LOW | aiohttp/client_ws.py | 352 | except Exception as exc: | CODE |
| LOW | aiohttp/client_ws.py | 370 | except Exception as exc: | CODE |
| LOW | aiohttp/client_ws.py | 450 | except Exception as exc: | CODE |
| LOW | aiohttp/streams.py | 212 | except Exception: | CODE |
| LOW | aiohttp/streams.py | 236 | except Exception: | CODE |
| LOW | aiohttp/streams.py | 646 | except Exception: | CODE |
| MEDIUM | aiohttp/streams.py | 44 | def __anext__(self) -> _T: | CODE |
| LOW | aiohttp/web_protocol.py | 706 | except Exception as exc: | CODE |
| LOW | aiohttp/web_protocol.py | 851 | except Exception as exc: | CODE |
| LOW | aiohttp/client_proto.py | 152 | except Exception as underlying_exc: | CODE |
| LOW | aiohttp/client_reqrep.py | 1718 | except Exception as underlying_exc: | CODE |
| LOW | aiohttp/web_log.py | 223 | except Exception: | CODE |
| LOW | aiohttp/formdata.py | 142 | except Exception as exc: | CODE |
| LOW | aiohttp/http_parser.py | 559 | except Exception as underlying_exc: | CODE |
| LOW | aiohttp/http_parser.py | 1245 | except Exception: | CODE |
| LOW | aiohttp/_websocket/reader_py.py | 244 | except Exception as exc: | CODE |
| LOW | tests/test_client_session.py | 1404 | except Exception: | CODE |
| LOW | tests/test_web_exceptions.py | 166 | except Exception as exc: | CODE |
| LOW | tests/test_web_websocket_functional.py | 140 | except Exception as exc: # pragma: no cover | CODE |
| LOW | tests/test_web_websocket_functional.py | 2106 | except Exception as exc: # pragma: no cover | CODE |
| MEDIUM | examples/client_ws.py | 31 | print("Error during receive %s" % ws.exception()) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | aiohttp/web_ws.py | 101 | CODE | |
| LOW | aiohttp/web_response.py | 740 | CODE | |
| LOW | aiohttp/web_response.py | 542 | CODE | |
| LOW | aiohttp/test_utils.py | 563 | CODE | |
| LOW | aiohttp/web.py | 279 | CODE | |
| LOW | aiohttp/web.py | 426 | CODE | |
| LOW | aiohttp/web_protocol.py | 203 | CODE | |
| LOW | aiohttp/client.py | 317 | CODE | |
| LOW | aiohttp/client.py | 488 | CODE | |
| LOW | aiohttp/client.py | 985 | CODE | |
| LOW | aiohttp/client.py | 1060 | CODE | |
| LOW | aiohttp/client.py | 1537 | CODE | |
| LOW | aiohttp/web_request.py | 233 | CODE | |
| LOW | aiohttp/web_request.py | 963 | CODE | |
| LOW | aiohttp/client_proto.py | 246 | CODE | |
| LOW | aiohttp/connector.py | 1008 | CODE | |
| LOW | aiohttp/helpers.py | 1052 | CODE | |
| LOW | aiohttp/http_parser.py | 267 | CODE | |
| LOW | aiohttp/http_parser.py | 889 | CODE | |
| LOW | tests/test_web_sendfile_functional.py | 1298 | CODE | |
| LOW | tests/test_web_sendfile_functional.py | 1339 | CODE | |
| LOW | tests/test_websocket_writer.py | 21 | CODE | |
| LOW | tests/test_client_middleware.py | 50 | CODE | |
| LOW | tests/test_client_middleware.py | 114 | CODE | |
| LOW | tests/test_client_middleware.py | 122 | CODE | |
| LOW | tests/test_client_middleware.py | 201 | CODE | |
| LOW | tests/test_client_middleware.py | 675 | CODE | |
| LOW | tests/test_client_middleware.py | 719 | CODE | |
| LOW | tests/test_client_middleware.py | 728 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/test_client_middleware.py | 302 | # Step 0: No auth, request client ID | COMMENT |
| LOW⚡ | tests/test_client_middleware.py | 309 | # Step 1: Has session, request credentials | COMMENT |
| LOW⚡ | tests/test_client_middleware.py | 316 | # Step 2: Has challenge response, authenticate | COMMENT |
| LOW | docs/code/client_middleware_cookbook.py | 124 | # WARNING: This is a simplified example for demonstration purposes only. | COMMENT |
| LOW | docs/code/client_middleware_cookbook.py | 140 | # WARNING: This is a simplified example - should also check ::1, private ranges, etc. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_web_app.py | 342 | CODE | |
| MEDIUM | tests/test_client_request.py | 1981 | CODE | |
| MEDIUM | tests/test_run_app.py | 177 | CODE | |
| MEDIUM | tests/test_run_app.py | 1132 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/test_client_middleware.py | 302 | # Step 0: No auth, request client ID | COMMENT |
| LOW⚡ | tests/test_client_middleware.py | 309 | # Step 1: Has session, request credentials | COMMENT |
| LOW⚡ | tests/test_client_middleware.py | 316 | # Step 2: Has challenge response, authenticate | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | aiohttp/compression_utils.py | 151 | # Everything not explicitly listed in the Protocol we just pass through | COMMENT |
| MEDIUM⚡ | tests/test_connector.py | 2968 | """Delay resolve() task in order to test cancellation.""" | STRING |
| MEDIUM | tests/test_client_ws_functional.py | 1541 | # The test harness will cleanup the unclosed websocket | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | aiohttp/client_middleware_digest_auth.py | 225 | Build digest authorization header for the current challenge. Args: method: The HTTP method | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docs/code/client_middleware_cookbook.py | 124 | # WARNING: This is a simplified example for demonstration purposes only. | COMMENT |
| MEDIUM | examples/token_refresh_middleware.py | 13 | Note: This is a simplified example for demonstration purposes. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docs/conf.py | 420 | # ------------------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | aiohttp/web_urldispatcher.py | 360 | # TODO: implement all abstract methods | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/fake_server.py | 73 | return web.json_response({"name": "John Doe", "id": "12345678901234567"}) | CODE |