A simple, yet elegant, HTTP library.
This report summarizes scanner evidence for psf/requests, a Python project with 54,562 GitHub stars. SynthScan examined 15,292 lines of code across 68 source files, recording 339 pattern matches distributed across 13 syntactic categories. The legacy adjusted pattern signal is 21.2 (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? 233 finding(s).
Are imports declared and package/API names verified? 92 finding(s).
Are wrappers, guards, and repeated structures necessary? 215 finding(s).
Which changes need focused human review? 339 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 339 distinct pattern matches across 13 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/test_utils.py | 66 | def test_super_len_correctly_calculates_len_of_partially_read_file(self): | CODE |
| LOW | tests/test_utils.py | 73 | def test_super_len_handles_files_raising_weird_errors_in_tell(self, error): | CODE |
| LOW | tests/test_utils.py | 86 | def test_super_len_tell_ioerror(self, error): | CODE |
| LOW | tests/test_utils.py | 127 | def test_super_len_with__len__(self): | CODE |
| LOW | tests/test_utils.py | 132 | def test_super_len_with_no__len__(self): | CODE |
| LOW | tests/test_utils.py | 145 | def test_super_len_with_fileno(self): | CODE |
| LOW | tests/test_utils.py | 151 | def test_super_len_with_no_matches(self): | CODE |
| LOW | tests/test_utils.py | 165 | def test_not_vulnerable_to_bad_url_parsing(self, tmp_path, monkeypatch): | CODE |
| LOW | tests/test_utils.py | 173 | def test_empty_default_credentials_ignored(self, tmp_path, monkeypatch): | CODE |
| LOW | tests/test_utils.py | 263 | def test_bypass_no_proxy_keyword(self, url): | CODE |
| LOW | tests/test_utils.py | 277 | def test_not_bypass_no_proxy_keyword(self, url, monkeypatch): | CODE |
| LOW | tests/test_utils.py | 325 | def test_guess_filename_invalid(self, value): | CODE |
| LOW | tests/test_utils.py | 335 | def test_guess_filename_valid(self, value, expected_type): | CODE |
| LOW | tests/test_utils.py | 352 | def test_unzipped_paths_unchanged(self, path): | CODE |
| LOW | tests/test_utils.py | 355 | def test_zipped_paths_extracted(self, tmpdir): | CODE |
| LOW | tests/test_utils.py | 635 | def test__parse_content_type_header(value, expected): | CODE |
| LOW | tests/test_utils.py | 654 | def test_get_encoding_from_headers(value, expected): | CODE |
| LOW | tests/test_utils.py | 713 | def test_prepend_scheme_if_needed(value, expected): | CODE |
| LOW | tests/test_utils.py | 759 | def test_should_bypass_proxies(url, expected, monkeypatch): | CODE |
| LOW | tests/test_utils.py | 787 | def test_should_bypass_proxies_pass_only_hostname(url, expected): | CODE |
| LOW | tests/test_utils.py | 803 | def test_add_dict_to_cookiejar(cookiejar): | CODE |
| LOW | tests/test_utils.py | 838 | def test_should_bypass_proxies_no_proxy(url, expected, monkeypatch): | CODE |
| LOW | tests/test_utils.py | 861 | def test_should_bypass_proxies_no_proxy_domain_boundary(url, expected): | CODE |
| LOW | tests/test_utils.py | 886 | def test_should_bypass_proxies_win_registry(url, expected, override, monkeypatch): | CODE |
| LOW | tests/test_utils.py | 924 | def test_should_bypass_proxies_win_registry_bad_values(monkeypatch): | CODE |
| LOW | tests/test_utils.py | 974 | def test_set_environ_raises_exception(): | CODE |
| LOW | tests/test_utils.py | 426 | def test_bad_utf_like_encoding(self): | STRING |
| LOW | tests/test_utils.py | 491 | def test_requote_uri_with_unquoted_percents(uri, expected): | STRING |
| LOW | tests/test_packages.py | 8 | def test_can_access_idna_attribute(): | CODE |
| LOW | tests/test_packages.py | 12 | def test_can_access_chardet_attribute(): | CODE |
| LOW | tests/test_testserver.py | 63 | def test_basic_waiting_server(self): | CODE |
| LOW | tests/test_testserver.py | 117 | def test_requests_after_timeout_are_not_received(self): | CODE |
| LOW | tests/test_testserver.py | 130 | def test_request_recovery_with_bigger_timeout(self): | CODE |
| LOW | tests/test_testserver.py | 144 | def test_server_finishes_on_error(self): | CODE |
| LOW | tests/test_testserver.py | 156 | def test_server_finishes_when_no_connections(self): | CODE |
| LOW⚡ | tests/test_requests.py | 130 | def test_no_body_content_length(self, httpbin, method): | CODE |
| LOW⚡ | tests/test_requests.py | 135 | def test_empty_content_length(self, httpbin, method): | CODE |
| LOW⚡ | tests/test_requests.py | 139 | def test_override_content_length(self, httpbin): | CODE |
| LOW⚡ | tests/test_requests.py | 145 | def test_path_is_not_double_encoded(self): | CODE |
| LOW⚡ | tests/test_requests.py | 390 | def test_cookie_sent_on_redirect(self, httpbin): | CODE |
| LOW⚡ | tests/test_requests.py | 396 | def test_cookie_removed_on_expire(self, httpbin): | CODE |
| LOW⚡ | tests/test_requests.py | 406 | def test_cookie_quote_wrapped(self, httpbin): | CODE |
| LOW⚡ | tests/test_requests.py | 411 | def test_cookie_persists_via_api(self, httpbin): | CODE |
| LOW⚡ | tests/test_requests.py | 417 | def test_request_cookie_overrides_session_cookie(self, httpbin): | CODE |
| LOW⚡ | tests/test_requests.py | 425 | def test_request_cookies_not_persisted(self, httpbin): | CODE |
| LOW⚡ | tests/test_requests.py | 431 | def test_generic_cookiejar_works(self, httpbin): | CODE |
| LOW⚡ | tests/test_requests.py | 617 | def test_respect_proxy_env_on_send_self_prepared_request(self, httpbin): | CODE |
| LOW⚡ | tests/test_requests.py | 624 | def test_respect_proxy_env_on_send_session_prepared_request(self, httpbin): | CODE |
| LOW⚡ | tests/test_requests.py | 632 | def test_respect_proxy_env_on_send_with_redirects(self, httpbin): | CODE |
| LOW⚡ | tests/test_requests.py | 641 | def test_respect_proxy_env_on_get(self, httpbin): | CODE |
| LOW⚡ | tests/test_requests.py | 647 | def test_respect_proxy_env_on_request(self, httpbin): | CODE |
| LOW⚡ | tests/test_requests.py | 653 | def test_proxy_authorization_preserved_on_request(self, httpbin): | CODE |
| LOW⚡ | tests/test_requests.py | 1068 | def test_urlencoded_get_query_multivalued_param(self, httpbin): | CODE |
| LOW⚡ | tests/test_requests.py | 1073 | def test_form_encoded_post_query_multivalued_element(self, httpbin): | CODE |
| LOW⚡ | tests/test_requests.py | 1080 | def test_different_encodings_dont_break_post(self, httpbin): | CODE |
| LOW⚡ | tests/test_requests.py | 1757 | def test_header_remove_is_case_insensitive(self, httpbin): | CODE |
| LOW⚡ | tests/test_requests.py | 1764 | def test_params_are_merged_case_sensitive(self, httpbin): | CODE |
| LOW⚡ | tests/test_requests.py | 1770 | def test_long_authinfo_in_url(self): | CODE |
| LOW⚡ | tests/test_requests.py | 1779 | def test_header_keys_are_native(self, httpbin): | CODE |
| LOW⚡ | tests/test_requests.py | 1887 | def test_can_send_objects_with_files(self, httpbin, files): | CODE |
| 137 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/compat.py | 4 | CODE | |
| LOW | tests/compat.py | 6 | CODE | |
| LOW | tests/test_requests.py | 97 | CODE | |
| LOW | src/requests/cookies.py | 10 | CODE | |
| LOW | src/requests/auth.py | 8 | CODE | |
| LOW | src/requests/auth.py | 25 | CODE | |
| LOW | src/requests/sessions.py | 9 | CODE | |
| LOW | src/requests/sessions.py | 39 | CODE | |
| LOW | src/requests/sessions.py | 48 | CODE | |
| LOW | src/requests/_types.py | 10 | CODE | |
| LOW | src/requests/_types.py | 66 | CODE | |
| LOW | src/requests/hooks.py | 13 | CODE | |
| LOW | src/requests/compat.py | 12 | CODE | |
| LOW | src/requests/compat.py | 81 | CODE | |
| LOW | src/requests/compat.py | 82 | CODE | |
| LOW | src/requests/compat.py | 82 | CODE | |
| LOW | src/requests/compat.py | 82 | CODE | |
| LOW | src/requests/compat.py | 83 | CODE | |
| LOW | src/requests/compat.py | 84 | CODE | |
| LOW | src/requests/compat.py | 85 | CODE | |
| LOW | src/requests/compat.py | 90 | CODE | |
| LOW | src/requests/compat.py | 90 | CODE | |
| LOW | src/requests/compat.py | 90 | CODE | |
| LOW | src/requests/compat.py | 90 | CODE | |
| LOW | src/requests/compat.py | 90 | CODE | |
| LOW | src/requests/compat.py | 90 | CODE | |
| LOW | src/requests/compat.py | 90 | CODE | |
| LOW | src/requests/compat.py | 90 | CODE | |
| LOW | src/requests/compat.py | 90 | CODE | |
| LOW | src/requests/compat.py | 90 | CODE | |
| LOW | src/requests/compat.py | 102 | CODE | |
| LOW | src/requests/compat.py | 102 | CODE | |
| LOW | src/requests/compat.py | 102 | CODE | |
| LOW | src/requests/compat.py | 102 | CODE | |
| LOW | src/requests/compat.py | 102 | CODE | |
| LOW | src/requests/compat.py | 69 | CODE | |
| LOW | src/requests/compat.py | 76 | CODE | |
| LOW | src/requests/compat.py | 78 | CODE | |
| LOW | src/requests/compat.py | 73 | CODE | |
| LOW | src/requests/models.py | 8 | CODE | |
| LOW | src/requests/models.py | 15 | CODE | |
| LOW | src/requests/__init__.py | 41 | CODE | |
| LOW | src/requests/__init__.py | 158 | CODE | |
| LOW | src/requests/__init__.py | 158 | CODE | |
| LOW | src/requests/__init__.py | 159 | CODE | |
| LOW | src/requests/__init__.py | 159 | CODE | |
| LOW | src/requests/__init__.py | 159 | CODE | |
| LOW | src/requests/__init__.py | 159 | CODE | |
| LOW | src/requests/__init__.py | 159 | CODE | |
| LOW | src/requests/__init__.py | 159 | CODE | |
| LOW | src/requests/__init__.py | 159 | CODE | |
| LOW | src/requests/__init__.py | 159 | CODE | |
| LOW | src/requests/__init__.py | 159 | CODE | |
| LOW | src/requests/__init__.py | 171 | CODE | |
| LOW | src/requests/__init__.py | 171 | CODE | |
| LOW | src/requests/__init__.py | 171 | CODE | |
| LOW | src/requests/__init__.py | 171 | CODE | |
| LOW | src/requests/__init__.py | 171 | CODE | |
| LOW | src/requests/__init__.py | 171 | CODE | |
| LOW | src/requests/__init__.py | 171 | CODE | |
| 23 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/test_requests.py | 2575 | except ReadTimeout: | CODE |
| HIGH | tests/test_requests.py | 2596 | except ConnectTimeout: | CODE |
| HIGH | tests/testserver/server.py | 91 | except OSError: | CODE |
| HIGH | src/requests/sessions.py | 823 | except StopIteration: | CODE |
| HIGH | src/requests/compat.py | 43 | except ImportError: | CODE |
| HIGH | src/requests/models.py | 1110 | except UnicodeDecodeError: | CODE |
| HIGH | src/requests/__init__.py | 146 | except ImportError: | CODE |
| HIGH | src/requests/utils.py | 279 | except (ImportError, AttributeError): | CODE |
| HIGH | src/requests/utils.py | 178 | except (io.UnsupportedOperation, AttributeError): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/conf.py | 1 | # -*- coding: utf-8 -*- | COMMENT |
| LOW | docs/conf.py | 61 | copyright = u"Kenneth Reitz and contributors" | COMMENT |
| LOW | docs/conf.py | 81 | # non-false value, then it is used: | COMMENT |
| LOW | docs/conf.py | 101 | # If true, sectionauthor and moduleauthor directives will be shown in the | COMMENT |
| LOW | docs/conf.py | 141 | # html_title = None | COMMENT |
| LOW | docs/conf.py | 201 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. | COMMENT |
| LOW | docs/conf.py | 221 | # A dictionary with options for the search language support, empty by default. | COMMENT |
| LOW | docs/conf.py | 241 | # Latex figure (float) alignment | COMMENT |
| LOW | docs/conf.py | 261 | # latex_show_pagerefs = False | COMMENT |
| LOW | docs/conf.py | 321 | # The basename for the epub file. It defaults to the project name. | COMMENT |
| LOW | docs/conf.py | 341 | # A unique identification for the text. | COMMENT |
| LOW | docs/conf.py | 361 | # The depth of the table of contents in toc.ncx. | COMMENT |
| LOW | .github/workflows/codeql-analysis.yml | 61 | COMMENT | |
| LOW | src/requests/sessions.py | 461 | #: :class:`Request <Request>`. The dictionary values may be lists for | COMMENT |
| LOW | src/requests/sessions.py | 481 | #: cert file (.pem). If Tuple, ('cert', 'key') pair. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/requests/compat.py | 31 | # ------------------- | COMMENT |
| MEDIUM | src/requests/compat.py | 33 | # ------------------- | COMMENT |
| MEDIUM | src/requests/compat.py | 87 | # -------------- | COMMENT |
| MEDIUM | src/requests/compat.py | 89 | # -------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/requests/cookies.py | 604 | CODE | |
| LOW | src/requests/cookies.py | 401 | CODE | |
| LOW | src/requests/cookies.py | 423 | CODE | |
| LOW | src/requests/auth.py | 157 | CODE | |
| LOW | src/requests/models.py | 151 | CODE | |
| LOW | src/requests/models.py | 183 | CODE | |
| LOW | src/requests/models.py | 576 | CODE | |
| LOW | src/requests/utils.py | 160 | CODE | |
| LOW | src/requests/utils.py | 810 | CODE | |
| LOW | src/requests/help.py | 35 | CODE | |
| LOW | src/requests/adapters.py | 634 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | tests/test_requests.py | 3090 | '{"responseCode":["706"],"data":null}{"responseCode":["706"],"data":null}', | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/test_requests.py | 2836 | b"mailto:user@example.org", | CODE |
| LOW⚡ | tests/test_requests.py | 2837 | "mailto:user@example.org", | CODE |
| LOW⚡ | tests/test_requests.py | 2840 | "mailto:user@example.org", | CODE |
| LOW⚡ | tests/test_requests.py | 2841 | "mailto:user@example.org", | CODE |
| LOW⚡ | tests/test_requests.py | 2874 | b"mailto:user@example.org", | CODE |
| LOW⚡ | tests/test_requests.py | 2876 | "mailto:user@example.org", | CODE |
| LOW⚡ | tests/test_requests.py | 2879 | "mailto:user@example.org", | CODE |
| LOW⚡ | tests/test_requests.py | 2881 | "mailto:user@example.org", | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docs/conf.py | 6 | # This file is execfile()d with the current directory set to its | COMMENT |
| MEDIUM | src/requests/sessions.py | 622 | # Create the Request. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/testserver/server.py | 139 | CODE | |
| LOW | src/requests/sessions.py | 557 | CODE | |
| LOW | src/requests/models.py | 323 | CODE | |
| LOW | src/requests/models.py | 424 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/requests/sessions.py | 757 | # Set defaults that the hooks can utilize to ensure they always have | STRING |
| LOW | src/requests/models.py | 725 | # method. To prevent iterating over None, simply use an empty list | COMMENT |
| LOW | src/requests/utils.py | 491 | # a UNC path, then just return the value without quotes. Using the | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/requests/models.py | 581 | # Check if file, fo, generator, iterator. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/requests/cookies.py | 382 | def set_cookie(self, cookie: Cookie, *args: Any, **kwargs: Any) -> None: | CODE |