AI Slop Code Risk Monitor

encode/httpx

SlopCodeMonitor badge for encode/httpx Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

A next generation HTTP client for Python. 🦋

14.8 Moderate pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for encode/httpx, a Python project with 15,799 GitHub stars. SynthScan examined 33,286 lines of code across 100 source files, recording 437 pattern matches distributed across 15 syntactic categories. The legacy adjusted pattern signal is 14.8 (Moderate 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.

14.8
Adjusted Signal
14.8
Raw Pattern Score
100%
Time Factor
2026-11-16
Last Push
15.8K
Stars
Python
Language
33.3K
Lines of Code
100
Files
437
Pattern Hits
2026-11-17
Scan Date
0.04
HC Hit Rate

Risk Review · Payload v1

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

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-11-17.

Cognitive Ownership Risk 40.1/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 11.9/100 · LOW

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

Agent Over-Engineering Ratio 42.9/100 · MEDIUM

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

PR Review Velocity Impact 51.5/100 · HIGH

Which changes need focused human review? 437 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

Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.

No multi-scan history yet — run the scanner again to build trend data.

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 4MEDIUM 12LOW 421

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 437 distinct pattern matches across 15 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 Identifiers262 hits · 278 pts
SeverityFileLineSnippetContext
LOWtests/test_utils.py31def test_bad_utf_like_encoding():CODE
LOWtests/test_utils.py68def test_logging_redirect_chain(server, caplog):CODE
LOWtests/test_utils.py109def test_get_environment_proxies(environment, proxies):CODE
LOWtests/conftest.py208def cert_encrypted_private_key_file(localhost_cert):CODE
LOWtests/test_auth.py120def test_digest_auth_setting_cookie_in_request():CODE
LOWtests/test_timeouts.py48async def test_async_client_new_request_send_timeout(server):CODE
LOWtests/test_exported_members.py4def test_all_imports_are_exported() -> None:CODE
LOWtests/test_asgi.py84async def test_asgi_transport_no_body():CODE
LOW⚡tests/test_asgi.py104async def test_asgi_urlencoded_path():CODE
LOW⚡tests/test_asgi.py126async def test_asgi_raw_path_should_not_include_querystring_portion():CODE
LOWtests/test_asgi.py176async def test_asgi_exc_after_response():CODE
LOWtests/test_asgi.py184async def test_asgi_disconnect_after_response_complete():CODE
LOWtests/test_exceptions.py14def test_httpcore_all_exceptions_mapped() -> None:CODE
LOWtests/test_exceptions.py39def test_httpcore_exception_mapping(server: TestServer) -> None:CODE
LOWtests/test_decoders.py216def test_decoders_empty_cases(header_value):CODE
LOWtests/test_decoders.py244async def test_text_decoder_with_autodetect(data, encoding):CODE
LOWtests/test_decoders.py267async def test_text_decoder_known_encoding():CODE
LOWtests/test_decoders.py283def test_text_decoder_empty_cases():CODE
LOWtests/test_decoders.py296def test_streaming_text_decoder(CODE
LOWtests/test_decoders.py346def test_invalid_content_encoding_header():CODE
LOW⚡tests/test_config.py17def test_load_ssl_config_verify_non_existing_file():CODE
LOW⚡tests/test_config.py23def test_load_ssl_with_keylog(monkeypatch: typing.Any) -> None:CODE
LOW⚡tests/test_config.py29def test_load_ssl_config_verify_existing_file():CODE
LOW⚡tests/test_config.py36def test_load_ssl_config_verify_directory():CODE
LOW⚡tests/test_config.py43def test_load_ssl_config_cert_and_key(cert_pem_file, cert_private_key_file):CODE
LOW⚡tests/test_config.py51def test_load_ssl_config_cert_and_encrypted_key(CODE
LOW⚡tests/test_config.py60def test_load_ssl_config_cert_and_key_invalid_password(CODE
LOW⚡tests/test_config.py70def test_load_ssl_config_cert_without_key_raises(cert_pem_file):CODE
LOW⚡tests/test_config.py76def test_load_ssl_config_no_verify():CODE
LOWtests/test_config.py108def test_timeout_all_parameters_set():CODE
LOWtests/test_config.py113def test_timeout_from_nothing():CODE
LOW⚡tests/test_config.py126def test_timeout_from_one_none_value():CODE
LOW⚡tests/test_config.py131def test_timeout_from_one_value():CODE
LOW⚡tests/test_config.py136def test_timeout_from_one_value_and_default():CODE
LOW⚡tests/test_config.py141def test_timeout_missing_default():CODE
LOW⚡tests/test_config.py151def test_timeout_from_config_instance():CODE
LOWtests/test_config.py173def test_proxy_with_auth_from_url():CODE
LOWtests/test_config.py182def test_invalid_proxy_scheme():CODE
LOWtests/test_content.py66async def test_async_bytesio_content():CODE
LOWtests/test_content.py256async def test_multipart_files_content():CODE
LOWtests/test_content.py299async def test_multipart_data_and_files_content():CODE
LOWtests/test_content.py368async def test_multipart_multiple_files_single_input_content():CODE
LOWtests/test_content.py419async def test_response_empty_content():CODE
LOWtests/test_content.py433async def test_response_bytes_content():CODE
LOWtests/test_content.py447async def test_response_iterator_content():CODE
LOWtests/test_content.py466async def test_response_aiterator_content():CODE
LOW⚡tests/test_content.py484def test_response_invalid_argument():CODE
LOW⚡tests/test_content.py489def test_ensure_ascii_false_with_french_characters():CODE
LOW⚡tests/test_content.py498def test_separators_for_compact_json():CODE
LOW⚡tests/test_status_codes.py10def test_status_code_value_lookup():CODE
LOW⚡tests/test_status_codes.py14def test_status_code_phrase_lookup():CODE
LOW⚡tests/test_status_codes.py18def test_lowercase_status_code():CODE
LOW⚡tests/test_status_codes.py22def test_reason_phrase_for_status_code():CODE
LOW⚡tests/test_status_codes.py26def test_reason_phrase_for_unknown_status_code():CODE
LOWtests/test_multipart.py57def test_multipart_explicit_boundary(header: str) -> None:CODE
LOWtests/test_multipart.py86def test_multipart_header_without_boundary(header: str) -> None:CODE
LOWtests/test_multipart.py98def test_multipart_invalid_key(key):CODE
LOWtests/test_multipart.py114def test_multipart_invalid_value(value):CODE
LOWtests/test_multipart.py124def test_multipart_file_tuple():CODE
LOWtests/test_multipart.py153def test_multipart_file_tuple_headers(file_content_type: str | None) -> None:CODE
202 more matches not shown…
Unused Imports57 hits · 56 pts
SeverityFileLineSnippetContext
LOWtests/test_exceptions.py1CODE
LOWtests/test_decoders.py1CODE
LOWtests/test_multipart.py1CODE
LOWtests/test_wsgi.py1CODE
LOWtests/client/test_async_client.py1CODE
LOWtests/client/test_client.py1CODE
LOWhttpx/_decoders.py7CODE
LOWhttpx/_types.py25CODE
LOWhttpx/_types.py26CODE
LOWhttpx/_types.py26CODE
LOWhttpx/_types.py27CODE
LOWhttpx/_types.py27CODE
LOWhttpx/_types.py27CODE
LOWhttpx/_types.py28CODE
LOWhttpx/_types.py28CODE
LOWhttpx/_main.py1CODE
LOWhttpx/_urls.py1CODE
LOWhttpx/_api.py1CODE
LOWhttpx/_multipart.py1CODE
LOWhttpx/__init__.py1CODE
LOWhttpx/__init__.py1CODE
LOWhttpx/__init__.py1CODE
LOWhttpx/__init__.py2CODE
LOWhttpx/__init__.py3CODE
LOWhttpx/__init__.py4CODE
LOWhttpx/__init__.py5CODE
LOWhttpx/__init__.py6CODE
LOWhttpx/__init__.py7CODE
LOWhttpx/__init__.py8CODE
LOWhttpx/__init__.py9CODE
LOWhttpx/__init__.py10CODE
LOWhttpx/__init__.py11CODE
LOWhttpx/__init__.py12CODE
LOWhttpx/__init__.py15CODE
LOWhttpx/_content.py1CODE
LOWhttpx/_client.py1CODE
LOWhttpx/_client.py678CODE
LOWhttpx/_client.py1392CODE
LOWhttpx/_urlparse.py19CODE
LOWhttpx/_models.py1CODE
LOWhttpx/_config.py1CODE
LOWhttpx/_status_codes.py1CODE
LOWhttpx/_exceptions.py34CODE
LOWhttpx/_auth.py1CODE
LOWhttpx/_utils.py1CODE
LOWhttpx/_transports/asgi.py1CODE
LOWhttpx/_transports/__init__.py1CODE
LOWhttpx/_transports/__init__.py2CODE
LOWhttpx/_transports/__init__.py3CODE
LOWhttpx/_transports/__init__.py4CODE
LOWhttpx/_transports/__init__.py5CODE
LOWhttpx/_transports/default.py27CODE
LOWhttpx/_transports/default.py189CODE
LOWhttpx/_transports/default.py333CODE
LOWhttpx/_transports/base.py1CODE
LOWhttpx/_transports/mock.py1CODE
LOWhttpx/_transports/wsgi.py1CODE
AI Structural Patterns27 hits · 27 pts
SeverityFileLineSnippetContext
LOWhttpx/_api.py39CODE
LOWhttpx/_api.py124CODE
LOWhttpx/_api.py174CODE
LOWhttpx/_api.py210CODE
LOWhttpx/_api.py246CODE
LOWhttpx/_api.py282CODE
LOWhttpx/_api.py323CODE
LOWhttpx/_api.py364CODE
LOWhttpx/_api.py405CODE
LOWhttpx/_client.py189CODE
LOWhttpx/_client.py340CODE
LOWhttpx/_client.py639CODE
LOWhttpx/_client.py771CODE
LOWhttpx/_client.py828CODE
LOWhttpx/_client.py1123CODE
LOWhttpx/_client.py1160CODE
LOWhttpx/_client.py1197CODE
LOWhttpx/_client.py1353CODE
LOWhttpx/_client.py1485CODE
LOWhttpx/_client.py1543CODE
LOWhttpx/_client.py1838CODE
LOWhttpx/_client.py1875CODE
LOWhttpx/_client.py1912CODE
LOWhttpx/_models.py383CODE
LOWhttpx/_models.py516CODE
LOWhttpx/_transports/default.py136CODE
LOWhttpx/_transports/default.py280CODE
Deep Nesting25 hits · 25 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py59CODE
LOWtests/client/test_redirects.py8CODE
LOWtests/client/test_client.py134CODE
LOWhttpx/_main.py194CODE
LOWhttpx/_main.py212CODE
LOWhttpx/_main.py452CODE
LOWhttpx/_urls.py425CODE
LOWhttpx/_content.py186CODE
LOWhttpx/_content.py221CODE
LOWhttpx/_client.py445CODE
LOWhttpx/_client.py930CODE
LOWhttpx/_client.py1645CODE
LOWhttpx/_urlparse.py348CODE
LOWhttpx/_urlparse.py447CODE
LOWhttpx/_models.py144CODE
LOWhttpx/_models.py167CODE
LOWhttpx/_models.py653CODE
LOWhttpx/_models.py884CODE
LOWhttpx/_models.py1084CODE
LOWhttpx/_models.py1143CODE
LOWhttpx/_config.py23CODE
LOWhttpx/_config.py86CODE
LOWhttpx/_utils.py30CODE
LOWhttpx/_transports/default.py136CODE
LOWhttpx/_transports/default.py280CODE
Fake / Example Data18 hits · 24 pts
SeverityFileLineSnippetContext
LOWtests/test_auth.py210 'Digest realm="http-auth@example.org", 'CODE
LOWtests/test_auth.py223 assert 'realm="http-auth@example.org"' in request.headers["Authorization"]CODE
LOWtests/test_auth.py270 'Digest realm="http-auth@example.org", 'CODE
LOWtests/test_auth.py283 assert 'realm="http-auth@example.org"' in request.headers["Authorization"]CODE
LOW⚡tests/test_asgi.py107 url = httpx.URL("http://www.example.org/").copy_with(path="/user@example.org")CODE
LOW⚡tests/test_asgi.py111 assert response.json() == {"path": "/user@example.org"}CODE
LOW⚡tests/test_asgi.py118 url = httpx.URL("http://www.example.org/").copy_with(path="/user@example.org")CODE
LOW⚡tests/test_asgi.py122 assert response.json() == {"raw_path": "/user@example.org"}CODE
LOW⚡tests/models/test_url.py608 "username": "tom@example.org",CODE
LOW⚡tests/models/test_url.py613 assert str(new) == "https://tom%40example.org:abc123%40%20%@example.org"CODE
LOW⚡tests/models/test_url.py614 assert new.username == "tom@example.org"CODE
LOW⚡tests/client/test_auth.py599 'Digest realm="httpx@example.org", qop="auth"', # missing fieldsCODE
LOW⚡tests/client/test_auth.py600 'Digest realm="httpx@example.org", qop="auth,au', # malformed fields listCODE
LOW⚡tests/client/test_auth.py619 'Digest realm="httpx@example.org", qop="auth"', # missing fieldsCODE
LOW⚡tests/client/test_auth.py620 'Digest realm="httpx@example.org", qop="auth,au', # malformed fields listCODE
LOWtests/client/test_auth.py82 "www-authenticate": f'Digest realm="httpx@example.org", {challenge_str}',CODE
LOWtests/client/test_auth.py448 assert digest_data["realm"] == '"httpx@example.org"'CODE
LOWtests/client/test_auth.py482 assert digest_data["realm"] == '"httpx@example.org"'CODE
Modern Structural Boilerplate19 hits · 19 pts
SeverityFileLineSnippetContext
LOWhttpx/_types.py89__all__ = ["AsyncByteStream", "SyncByteStream"]CODE
LOWhttpx/_urls.py12__all__ = ["URL", "QueryParams"]CODE
LOWhttpx/_api.py26__all__ = [CODE
LOWhttpx/__init__.py29__all__ = [CODE
LOWhttpx/_content.py28__all__ = ["ByteStream"]CODE
LOWhttpx/_client.py54__all__ = ["USE_CLIENT_DEFAULT", "AsyncClient", "Client"]CODE
LOWhttpx/_client.py584 def _set_timeout(self, request: Request) -> None:CODE
LOWhttpx/_models.py51__all__ = ["Cookies", "Headers", "Request", "Response"]CODE
LOWhttpx/_models.py1110 def set_cookie_header(self, request: Request) -> None:CODE
LOWhttpx/_config.py13__all__ = ["Limits", "Proxy", "Timeout", "create_ssl_context"]CODE
LOWhttpx/_status_codes.py5__all__ = ["codes"]CODE
LOWhttpx/_exceptions.py42__all__ = [CODE
LOWhttpx/_auth.py19__all__ = ["Auth", "BasicAuth", "DigestAuth", "FunctionAuth", "NetRCAuth"]CODE
LOWhttpx/_transports/asgi.py26__all__ = ["ASGITransport"]CODE
LOWhttpx/_transports/__init__.py7__all__ = [CODE
LOWhttpx/_transports/default.py69__all__ = ["AsyncHTTPTransport", "HTTPTransport"]CODE
LOWhttpx/_transports/base.py11__all__ = ["AsyncBaseTransport", "BaseTransport"]CODE
LOWhttpx/_transports/mock.py12__all__ = ["MockTransport"]CODE
LOWhttpx/_transports/wsgi.py19__all__ = ["WSGITransport"]CODE
Excessive Try-Catch Wrapping9 hits · 17 pts
SeverityFileLineSnippetContext
MEDIUMdocs/quickstart.md508 print(f"An error occurred while requesting {exc.request.url!r}.")CODE
MEDIUMdocs/quickstart.md519 print(f"Error response {exc.response.status_code} while requesting {exc.request.url!r}.")CODE
MEDIUM⚡docs/quickstart.md532 print(f"Error while requesting {exc.request.url!r}.")CODE
MEDIUM⚡docs/quickstart.md542 print(f"An error occurred while requesting {exc.request.url!r}.")CODE
MEDIUM⚡docs/quickstart.md544 print(f"Error response {exc.response.status_code} while requesting {exc.request.url!r}.")CODE
LOWhttpx/_utils.py232 except Exception:CODE
LOWhttpx/_utils.py240 except Exception:CODE
LOWhttpx/_transports/asgi.py171 except Exception: # noqa: PIE-786CODE
LOWhttpx/_transports/default.py102 except Exception as exc:CODE
Empty Error Handlers3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHhttpx/_main.py111except pygments.util.ClassNotFound: # pragma: no coverCODE
HIGHhttpx/_multipart.py211except io.UnsupportedOperation:CODE
HIGHhttpx/_transports/asgi.py38except ImportError: # pragma: nocoverCODE
Decorative Section Separators3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMhttpx/_urlparse.py215 # ---------------------------------------COMMENT
MEDIUMhttpx/_urlparse.py232 # ------------------------------------------------COMMENT
MEDIUMhttpx/_urlparse.py264 # -------------------------------------------------------------COMMENT
Dead Code4 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMtests/client/test_async_client.py351CODE
MEDIUMhttpx/_types.py97CODE
MEDIUMhttpx/_types.py111CODE
MEDIUMhttpx/_content.py104CODE
Overly Generic Function Names5 hits · 6 pts
SeverityFileLineSnippetContext
LOW⚡tests/client/test_redirects.py346 def handle_request(self, request: httpx.Request) -> httpx.Response:CODE
LOWhttpx/_transports/default.py230 def handle_request(CODE
LOWhttpx/_transports/base.py26 def handle_request(self, request: Request) -> Response:CODE
LOWhttpx/_transports/mock.py19 def handle_request(CODE
LOWhttpx/_transports/wsgi.py91 def handle_request(self, request: Request) -> Response:CODE
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHtests/client/test_redirects.py396 "session=null; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT; "CODE
Over-Commented Block2 hits · 2 pts
SeverityFileLineSnippetContext
LOWdocs/advanced/extensions.md41```pythonCOMMENT
LOWhttpx/_models.py421 # Load the request body, except for streaming content.COMMENT
Structural Annotation Overuse1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtests/models/test_url.py93 # WARNING: This has the incorrect behaviour, adding the test as an interim step.COMMENT
TODO Padding1 hit · 2 pts
SeverityFileLineSnippetContext
LOWhttpx/_auth.py267 # TODO: implement auth-intCOMMENT