Repository Analysis

mitmproxy/mitmproxy

An interactive TLS-capable intercepting HTTP proxy for penetration testers and software developers.

6.5 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of mitmproxy/mitmproxy, a Python project with 44,289 GitHub stars. SynthScan v2.0 examined 144,438 lines of code across 1012 source files, recording 799 pattern matches distributed across 18 syntactic categories. The overall adjusted score of 6.5 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

6.5
Adjusted Score
6.5
Raw Score
100%
Time Factor
2026-07-03
Last Push
44.3K
Stars
Python
Language
144.4K
Lines of Code
1.0K
Files
799
Pattern Hits
2026-07-14
Scan Date
0.02
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 4HIGH 18MEDIUM 15LOW 762

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 799 distinct pattern matches across 18 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers333 hits · 335 pts
SeverityFileLineSnippetContext
LOWtest/filename_matching.py8def check_src_files_have_test():CODE
LOWtest/filename_matching.py33def check_test_files_have_src():CODE
LOWtest/mitmproxy/test_command.py687def test_verify_arg_signature():CODE
LOWtest/mitmproxy/test_flow.py119 async def test_load_http_flow_reverse(self):CODE
LOWtest/mitmproxy/test_command_lexer.py23def test_partial_quoted_string(test_input, valid):CODE
LOWtest/mitmproxy/test_log.py14def test_dont_pick_up_mutations():CODE
LOWtest/mitmproxy/test_http.py197 def test_host_update_also_updates_header(self):CODE
LOWtest/mitmproxy/test_http.py308 def test_pretty_url_authority(self):CODE
LOWtest/mitmproxy/test_http.py350 def test_get_cookies_withequalsign(self):CODE
LOWtest/mitmproxy/test_http.py559 def test_get_cookies_with_parameters(self):CODE
LOWtest/mitmproxy/test_http.py574 def test_get_cookies_no_value(self):CODE
LOWtest/mitmproxy/test_http.py585 def test_get_cookies_twocookies(self):CODE
LOWtest/mitmproxy/test_http.py945 def test_content_length_update(self):CODE
LOWtest/mitmproxy/test_http.py957 def test_content_length_not_added_for_response_with_transfer_encoding(self):CODE
LOWtest/mitmproxy/test_http.py995 def test_update_content_length_header(self):CODE
LOWtest/mitmproxy/test_http.py1077 def test_decode_noop_on_empty_content(self):CODE
LOWtest/mitmproxy/test_certs.py66 def test_create_no_common_name(self, tstore):CODE
LOWtest/mitmproxy/test_certs.py244 def test_aki_falls_back_when_issuer_has_no_ski(self):CODE
LOWtest/mitmproxy/test_certs.py394 def test_from_store_with_passphrase(self, tdata, tstore):CODE
LOWtest/mitmproxy/test_certs.py416 def test_add_cert_with_no_private_key(self, tdata, tstore):CODE
LOWtest/mitmproxy/test_certs.py425 def test_add_cert_private_public_mismatch(self, tdata, tstore):CODE
LOWtest/mitmproxy/test_certs.py445 def test_add_cert_chain_invalid(self, tdata, tstore, caplog):CODE
LOWtest/mitmproxy/test_certs.py517 def test_crl_distribution_points(self, tdata, filename, crls):CODE
LOWtest/mitmproxy/contentviews/test___init__.py85 def test_view_failure_explicit(self):CODE
LOWtest/mitmproxy/contentviews/test__utils.py44 def test_make_metadata_websocket(self):CODE
LOWtest/mitmproxy/contentviews/test__utils.py62 def test_get_data_regular_content(self):CODE
LOWtest/mitmproxy/contentviews/test__utils.py77 def test_get_data_http_decode_error(self):CODE
LOWtest/mitmproxy/contentviews/test__utils.py112def test_byte_pairs_to_str_pairs():CODE
LOWtest/mitmproxy/contentviews/test__api.py59 def test_syntaxhighlight_matches(self):CODE
LOWtest/mitmproxy/contentviews/test__registry.py9def test_register_triggers_on_change():CODE
LOWtest/mitmproxy/contentviews/test__registry.py20def test_replace_view_triggers_on_change_and_logs(caplog):CODE
LOWtest/mitmproxy/contentviews/test__registry.py50def test_get_view_unknown_name(caplog):CODE
LOWtest/mitmproxy/contentviews/test__registry.py63def test_render_priority_error(caplog):CODE
LOWtest/mitmproxy/tools/test_main.py35def test_options_includes_addon_options(tdata, capsys):CODE
LOWtest/mitmproxy/tools/test_main.py49def test_options_without_scripts(capsys):CODE
LOWtest/mitmproxy/tools/web/test_app.py49def test_all_handlers_have_auth():CODE
LOWtest/mitmproxy/tools/web/test_app.py114 def test_javascript_mime_type(self):CODE
LOWtest/mitmproxy/tools/web/test_app.py146 def test_flows_dump_filter_error(self):CODE
LOWtest/mitmproxy/tools/web/test_app.py300 def test_flow_content_returns_raw_content_when_decoding_fails(self):CODE
LOWtest/mitmproxy/tools/web/test_app.py327 def test_update_flow_content_multipart(self):CODE
LOWtest/mitmproxy/tools/web/test_app.py366 def test_flow_contentview_websocket(self):CODE
LOWtest/mitmproxy/tools/web/test_app.py453 def test_websocket_filter_application(self):CODE
LOWtest/mitmproxy/tools/web/test_app.py535 def test_websocket_filter_command_error(self):CODE
LOWtest/mitmproxy/tools/web/test_app.py585 def test_login_with_token_header(self):CODE
LOWtest/mitmproxy/tools/web/test_app.py590 def test_login_with_token_param(self):CODE
LOWtest/mitmproxy/tools/web/test_app.py595 def test_login_with_malformed_auth_header(self):CODE
LOWtest/mitmproxy/tools/web/test_app.py599 def test_login_with_invalid_auth_header(self):CODE
LOWtest/mitmproxy/tools/web/test_app.py608 def test_unauthorized_websocket(self):CODE
LOWtest/mitmproxy/tools/web/test_app.py618 def test_auth_cookie_port_suffix_modification(self):CODE
LOWtest/mitmproxy/tools/console/test_flowview.py40async def test_content_missing_returns_error(console):CODE
LOWtest/mitmproxy/tools/console/test_flowview.py58async def test_empty_content_request_and_response(console):CODE
LOWtest/mitmproxy/tools/console/test_flowview.py85async def test_content_view_fullcontents_true_uses_unlimited_limit(console):CODE
LOWtest/mitmproxy/tools/console/test_statusbar.py62def test_shorten_message_narrow():CODE
LOWtest/mitmproxy/tools/console/test_statusbar.py67async def test_console_quickhelp_option(console, monkeypatch):CODE
LOWtest/mitmproxy/tools/console/test_statusbar.py86async def test_console_quickhelp_toggle(console, monkeypatch):CODE
LOWtest/mitmproxy/tools/console/test_statusbar.py115async def test_console_quickhelp_hotkey(console):CODE
LOWtest/mitmproxy/tools/console/test_statusbar.py126async def test_console_quickhelp_prompts_visible_when_disabled(console, monkeypatch):CODE
LOWtest/mitmproxy/tools/console/test_integration.py15def test_keybindings_home_end(console):CODE
LOWtest/mitmproxy/tools/console/test_contentview.py22async def test_contentview_flowview(console, monkeypatch):CODE
LOWtest/mitmproxy/net/test_tls.py18def test_make_master_secret_logger():CODE
273 more matches not shown…
Deep Nesting141 hits · 140 pts
SeverityFileLineSnippetContext
LOWtest/mitmproxy/tools/console/test_quickhelp.py44CODE
LOWtest/mitmproxy/proxy/tutils.py193CODE
LOWtest/mitmproxy/proxy/tutils.py324CODE
LOWtest/mitmproxy/proxy/test_tunnel.py24CODE
LOWtest/mitmproxy/proxy/layers/http/test_http_fuzz.py430CODE
LOWtest/mitmproxy/proxy/layers/http/test_http.py541CODE
LOWtest/mitmproxy/proxy/layers/quic/test__stream_layers.py64CODE
LOWmitmproxy/addonmanager.py243CODE
LOWmitmproxy/command.py174CODE
LOWmitmproxy/flowfilter.py301CODE
LOWmitmproxy/flowfilter.py337CODE
LOWmitmproxy/flowfilter.py364CODE
LOWmitmproxy/certs.py284CODE
LOWmitmproxy/types.py414CODE
LOWmitmproxy/optmanager.py564CODE
LOWmitmproxy/optmanager.py364CODE
LOWmitmproxy/optmanager.py412CODE
LOWmitmproxy/connection.py147CODE
LOWmitmproxy/http.py1174CODE
LOWmitmproxy/contentviews/_view_xml_html.py104CODE
LOWmitmproxy/contentviews/_view_xml_html.py209CODE
LOWmitmproxy/contentviews/_view_http3.py25CODE
LOWmitmproxy/contentviews/_view_mqtt.py60CODE
LOWmitmproxy/contentviews/_view_mqtt.py87CODE
LOWmitmproxy/contentviews/_view_mqtt.py193CODE
LOWmitmproxy/contentviews/_view_image/view.py21CODE
LOWmitmproxy/contentviews/_view_image/image_parser.py13CODE
LOWmitmproxy/contentviews/_view_image/image_parser.py63CODE
LOWmitmproxy/tools/main.py45CODE
LOWmitmproxy/tools/main.py56CODE
LOWmitmproxy/tools/web/app.py82CODE
LOWmitmproxy/tools/web/app.py580CODE
LOWmitmproxy/tools/web/app.py717CODE
LOWmitmproxy/tools/web/static_viewer.py51CODE
LOWmitmproxy/tools/console/options.py165CODE
LOWmitmproxy/tools/console/statusbar.py157CODE
LOWmitmproxy/tools/console/window.py285CODE
LOWmitmproxy/tools/console/searchable.py25CODE
LOWmitmproxy/tools/console/palettes.py97CODE
LOWmitmproxy/tools/console/flowview.py68CODE
LOWmitmproxy/tools/console/common.py245CODE
LOWmitmproxy/tools/console/common.py274CODE
LOWmitmproxy/tools/console/common.py313CODE
LOWmitmproxy/tools/console/common.py479CODE
LOWmitmproxy/tools/console/common.py726CODE
LOWmitmproxy/tools/console/quickhelp.py52CODE
LOWmitmproxy/tools/console/consoleaddons.py395CODE
LOWmitmproxy/tools/console/consoleaddons.py468CODE
LOWmitmproxy/tools/console/commandexecutor.py14CODE
LOWmitmproxy/tools/console/grideditor/base.py81CODE
LOWmitmproxy/tools/console/grideditor/base.py329CODE
LOWmitmproxy/tools/console/commander/commander.py76CODE
LOWmitmproxy/tools/console/commander/commander.py177CODE
LOWmitmproxy/net/http/cookies.py67CODE
LOWmitmproxy/net/http/cookies.py139CODE
LOWmitmproxy/net/http/multipart.py11CODE
LOWmitmproxy/net/http/multipart.py48CODE
LOWmitmproxy/net/http/validate.py66CODE
LOWmitmproxy/net/http/headers.py39CODE
LOWmitmproxy/net/http/http1/read.py166CODE
81 more matches not shown…
Unused Imports113 hits · 113 pts
SeverityFileLineSnippetContext
LOWtest/conftest.py1CODE
LOWtest/mitmproxy/coretypes/test_serializable.py1CODE
LOWtest/mitmproxy/addons/test_proxyserver.py1CODE
LOWtest/mitmproxy/addons/test_next_layer.py1CODE
LOWmitmproxy/dns.py1CODE
LOWmitmproxy/log.py1CODE
LOWmitmproxy/flow.py1CODE
LOWmitmproxy/types.py16CODE
LOWmitmproxy/optmanager.py1CODE
LOWmitmproxy/ctx.py1CODE
LOWmitmproxy/contentviews/_api.py1CODE
LOWmitmproxy/contentviews/__init__.py18CODE
LOWmitmproxy/contentviews/__init__.py20CODE
LOWmitmproxy/contentviews/__init__.py22CODE
LOWmitmproxy/contentviews/_registry.py1CODE
LOWmitmproxy/contentviews/_compat.py1CODE
LOWmitmproxy/contentviews/_view_image/__init__.py1CODE
LOWmitmproxy/tools/main.py1CODE
LOWmitmproxy/tools/web/webaddons.py1CODE
LOWmitmproxy/tools/web/__init__.py1CODE
LOWmitmproxy/tools/web/app.py1CODE
LOWmitmproxy/tools/console/options.py1CODE
LOWmitmproxy/tools/console/signals.py1CODE
LOWmitmproxy/tools/console/statusbar.py1CODE
LOWmitmproxy/tools/console/palettes.py6CODE
LOWmitmproxy/tools/console/__init__.py1CODE
LOWmitmproxy/tools/console/flowlist.py5CODE
LOWmitmproxy/tools/console/grideditor/__init__.py1CODE
LOWmitmproxy/tools/console/grideditor/__init__.py2CODE
LOWmitmproxy/tools/console/grideditor/__init__.py3CODE
LOWmitmproxy/tools/console/grideditor/__init__.py4CODE
LOWmitmproxy/tools/console/grideditor/__init__.py5CODE
LOWmitmproxy/tools/console/grideditor/__init__.py6CODE
LOWmitmproxy/tools/console/grideditor/__init__.py7CODE
LOWmitmproxy/tools/console/grideditor/__init__.py8CODE
LOWmitmproxy/tools/console/grideditor/__init__.py9CODE
LOWmitmproxy/tools/console/grideditor/__init__.py10CODE
LOWmitmproxy/tools/console/grideditor/__init__.py11CODE
LOWmitmproxy/tools/console/grideditor/__init__.py12CODE
LOWmitmproxy/tools/console/grideditor/__init__.py13CODE
LOWmitmproxy/tools/console/grideditor/base.py16CODE
LOWmitmproxy/net/local_ip.py1CODE
LOWmitmproxy/net/http/multipart.py1CODE
LOWmitmproxy/net/http/url.py1CODE
LOWmitmproxy/net/http/http1/__init__.py1CODE
LOWmitmproxy/net/http/http1/__init__.py2CODE
LOWmitmproxy/net/http/http1/__init__.py3CODE
LOWmitmproxy/net/http/http1/__init__.py4CODE
LOWmitmproxy/net/http/http1/__init__.py5CODE
LOWmitmproxy/net/http/http1/__init__.py6CODE
LOWmitmproxy/net/http/http1/__init__.py7CODE
LOWmitmproxy/net/http/http1/__init__.py8CODE
LOWmitmproxy/net/http/http1/__init__.py9CODE
LOWmitmproxy/proxy/mode_servers.py13CODE
LOWmitmproxy/proxy/context.py7CODE
LOWmitmproxy/proxy/mode_specs.py23CODE
LOWmitmproxy/proxy/layers/__init__.py1CODE
LOWmitmproxy/proxy/layers/__init__.py2CODE
LOWmitmproxy/proxy/layers/__init__.py3CODE
LOWmitmproxy/proxy/layers/__init__.py4CODE
53 more matches not shown…
Modern Structural Boilerplate87 hits · 87 pts
SeverityFileLineSnippetContext
LOWtest/conftest.py55 def set_level(self, level: int | str, logger: str | None = None) -> None:CODE
LOWtest/mitmproxy/proxy/tutils.py464 def set_layer(next_layer: layer.NextLayer) -> None:CODE
LOWtest/mitmproxy/proxy/layers/quic/test__stream_layers.py463 def set_layer(next_layer: layer.NextLayer) -> None:CODE
LOWmitmproxy/addonmanager.py17logger = logging.getLogger(__name__)CODE
LOWmitmproxy/dns.py580 def set_state(self, state: serializable.State) -> None:CODE
LOWmitmproxy/certs.py35logger = logging.getLogger(__name__)CODE
LOWmitmproxy/flow.py161 def set_state(self, state: serializable.State) -> None:CODE
LOWmitmproxy/flow.py285__all__ = [CODE
LOWmitmproxy/tcp.py64 def set_state(self, state: serializable.State) -> None:CODE
LOWmitmproxy/tcp.py72__all__ = [CODE
LOWmitmproxy/connection.py359__all__ = ["Connection", "Client", "Server", "ConnectionState"]CODE
LOWmitmproxy/udp.py61 def set_state(self, state: serializable.State) -> None:CODE
LOWmitmproxy/udp.py69__all__ = [CODE
LOWmitmproxy/master.py16logger = logging.getLogger(__name__)CODE
LOWmitmproxy/http.py360 def set_content(self, value: bytes | None) -> None:CODE
LOWmitmproxy/http.py407 def set_text(self, text: str | None) -> None:CODE
LOWmitmproxy/http.py767 def _update_host_and_authority(self) -> None:CODE
LOWmitmproxy/http.py941 def _set_urlencoded_form(self, form_data: Sequence[tuple[str, str]]) -> None:CODE
LOWmitmproxy/http.py980 def _set_multipart_form(self, value: list[tuple[bytes, bytes]]) -> None:CODE
LOWmitmproxy/http.py1242 def set_state(self, state: serializable.State) -> None:CODE
LOWmitmproxy/http.py1289__all__ = [CODE
LOWmitmproxy/websocket.py84 def set_state(self, state: WebSocketMessageState) -> None:CODE
LOWmitmproxy/contentviews/_api.py17logger = logging.getLogger(__name__)CODE
LOWmitmproxy/contentviews/__init__.py48logger = logging.getLogger(__name__)CODE
LOWmitmproxy/contentviews/__init__.py188__all__ = [CODE
LOWmitmproxy/contentviews/_registry.py11logger = logging.getLogger(__name__)CODE
LOWmitmproxy/contentviews/_view_image/__init__.py3__all__ = ["image"]CODE
LOWmitmproxy/tools/web/webaddons.py19logger = logging.getLogger(__name__)CODE
LOWmitmproxy/tools/web/__init__.py3__all__ = ["master"]CODE
LOWmitmproxy/tools/web/master.py24logger = logging.getLogger(__name__)CODE
LOWmitmproxy/tools/web/app.py63logger = logging.getLogger(__name__)CODE
LOWmitmproxy/tools/web/app.py467 def update_filter(self, name: str, expr: str) -> None:CODE
LOWmitmproxy/tools/console/options.py235 def update_help_text(self, txt: str) -> None:CODE
LOWmitmproxy/tools/console/__init__.py3__all__ = ["master"]CODE
LOWmitmproxy/tools/console/master.py192 def set_palette(self, *_) -> None:CODE
LOWmitmproxy/tools/console/consoleaddons.py26logger = logging.getLogger(__name__)CODE
LOWmitmproxy/tools/console/flowlist.py107 def set_flowlist_layout(self, *_) -> None:CODE
LOWmitmproxy/tools/console/commands.py66 def set_focus(self, index: int) -> None:CODE
LOWmitmproxy/tools/console/grideditor/__init__.py15__all__ = [CODE
LOWmitmproxy/tools/console/grideditor/base.py153 def set_current_value(self, val) -> None:CODE
LOWmitmproxy/tools/console/grideditor/base.py448 def set_data_update(self, vals, flow) -> None:CODE
LOWmitmproxy/tools/console/commander/commander.py71 def set_text(self, text: str) -> None:CODE
LOWmitmproxy/net/encoding.py239__all__ = ["encode", "decode"]CODE
LOWmitmproxy/net/http/validate.py9logger = logging.getLogger(__name__)CODE
LOWmitmproxy/net/http/http1/__init__.py11__all__ = [CODE
LOWmitmproxy/proxy/server.py45logger = logging.getLogger(__name__)CODE
LOWmitmproxy/proxy/mode_servers.py58logger = logging.getLogger(__name__)CODE
LOWmitmproxy/proxy/layers/__init__.py14__all__ = [CODE
LOWmitmproxy/proxy/layers/http/_http2.py707__all__ = [CODE
LOWmitmproxy/proxy/layers/http/_http3.py306__all__ = [CODE
LOWmitmproxy/proxy/layers/http/_http_h2.py12logger = logging.getLogger(__name__)CODE
LOWmitmproxy/proxy/layers/http/_http_h3.py317__all__ = [CODE
LOWmitmproxy/proxy/layers/http/_events.py154__all__ = [CODE
LOWmitmproxy/proxy/layers/http/_http1.py499__all__ = [CODE
LOWmitmproxy/proxy/layers/quic/__init__.py21__all__ = [CODE
LOWmitmproxy/coretypes/multidict.py87 def set_all(self, key: KT, values: list[VT]) -> None:CODE
LOWmitmproxy/coretypes/serializable.py98 def set_state(self, state: State) -> None:CODE
LOWmitmproxy/platform/__init__.py40__all__ = ["original_addr", "init_transparent_mode"]CODE
LOWmitmproxy/platform/windows.py29logger = logging.getLogger(__name__)CODE
LOWmitmproxy/addons/next_layer.py60logger = logging.getLogger(__name__)CODE
27 more matches not shown…
Excessive Try-Catch Wrapping51 hits · 56 pts
SeverityFileLineSnippetContext
LOWtest/mitmproxy/tools/web/test_app.py574 except Exception:CODE
MEDIUMtest/mitmproxy/tools/web/test_app.py556def test_process_list(self):CODE
LOWtest/mitmproxy/tools/console/test_defaultkeys.py19 except Exception as e:CODE
LOWtest/mitmproxy/proxy/tutils.py205 except Exception:CODE
LOWtest/mitmproxy/proxy/tutils.py224 except Exception:CODE
LOWtest/mitmproxy/addons/test_clientplayback.py39 except Exception as e:CODE
LOWtest/helper_tools/hunt_memory_leaks.py58 except Exception:CODE
LOWmitmproxy/addonmanager.py50 except Exception:CODE
MEDIUMmitmproxy/addonmanager.py45def safecall():CODE
LOWmitmproxy/command.py181 except Exception:CODE
LOWmitmproxy/version.py39 except Exception:CODE
LOWmitmproxy/dns.py168 except Exception:CODE
LOWmitmproxy/dns.py210 except Exception:CODE
MEDIUMmitmproxy/dns.py153def _data_json(self) -> str | HTTPSRecordJSON:CODE
LOWmitmproxy/flowfilter.py190 except Exception:CODE
LOWmitmproxy/contentviews/__init__.py89 except Exception as e:CODE
LOWmitmproxy/contentviews/_registry.py58 except Exception:CODE
LOWmitmproxy/contentviews/_view_http3.py36 except Exception as e:CODE
LOWmitmproxy/contentviews/_view_http3.py42 except Exception as e:CODE
LOWmitmproxy/tools/web/app.py322 except Exception as e:CODE
LOWmitmproxy/tools/web/app.py495 except Exception as e:CODE
LOWmitmproxy/tools/web/app.py787 except Exception as e:CODE
LOWmitmproxy/tools/web/app.py811 except Exception as err:CODE
LOWmitmproxy/tools/web/app.py871 except Exception:CODE
LOWmitmproxy/tools/console/master.py149 except Exception:CODE
LOWmitmproxy/tools/console/master.py184 except Exception:CODE
LOWmitmproxy/net/encoding.py70 except Exception as e:CODE
LOWmitmproxy/net/encoding.py128 except Exception as e:CODE
LOWmitmproxy/proxy/server.py436 except Exception:CODE
LOWmitmproxy/proxy/mode_servers.py132 except Exception as e:CODE
LOWmitmproxy/proxy/mode_servers.py147 except Exception as e:CODE
LOWmitmproxy/proxy/mode_servers.py203 except Exception as e:CODE
LOWmitmproxy/proxy/mode_servers.py296 except Exception as e:CODE
LOWmitmproxy/proxy/mode_servers.py319 except Exception: # pragma: no coverCODE
LOWmitmproxy/proxy/mode_servers.py368 except Exception as e:CODE
LOWmitmproxy/proxy/mode_servers.py459 except Exception:CODE
MEDIUMmitmproxy/proxy/mode_servers.py129def start(self) -> None:CODE
LOWmitmproxy/addons/proxyauth.py103 except Exception:CODE
LOWmitmproxy/addons/clientplayback.py191 except Exception:CODE
LOWmitmproxy/addons/asgiapp.py140 except Exception as e:CODE
LOWmitmproxy/addons/script.py53 except Exception as e:CODE
LOWmitmproxy/addons/script.py127 except Exception as e:CODE
LOWmitmproxy/addons/command_history.py47 except Exception as e:CODE
LOWmitmproxy/addons/command_history.py60 except Exception as e:CODE
LOWmitmproxy/addons/command_history.py75 except Exception as e:CODE
LOWmitmproxy/io/io.py59 except Exception:CODE
LOWmitmproxy/contrib/wbxml/ASCommandResponse.py42 except Exception as e:CODE
LOWrelease/release.py32 except Exception as e:CODE
LOWrelease/selftest.py49 except Exception as e:CODE
MEDIUMrelease/selftest.py34def make_request():CODE
LOWexamples/contrib/webscanner_helper/mapping.py152 except Exception:CODE
Cross-Language Confusion7 hits · 41 pts
SeverityFileLineSnippetContext
HIGHtest/mitmproxy/contentviews/test__view_mqtt.py27 b"""{"body":{"parameters":null},"header":{"from":"56:6F:5E:6A:01:05","messageId":"connected","type":"event"}CODE
HIGHtest/mitmproxy/contentviews/test__view_mqtt.py28 """[PUBLISH] '{"body":{"parameters":null},"header":{"from":"56:6F:5E:6A:01:05","""STRING
HIGHtest/mitmproxy/contentviews/test__view_mqtt.py35 b"""\x00l{"body":{"parameters":null},"header":{"from":"56:6F:5E:6A:01:05","messageId":"disconnected","type":CODE
HIGHtest/mitmproxy/contentviews/test__view_mqtt.py42 '{"body":{"parameters":null},"header":{"from":"56:6F:5E:6A:01:05","messageId":"disconnected","type":"eveCODE
HIGHtest/mitmproxy/contentviews/test__view_json.py15 assert json_view.prettify(b'{"foo": true, "nullvalue": null}', meta)CODE
HIGHmitmproxy/tools/console/master.py259 self.window.push(name)CODE
HIGHexamples/contrib/test_jsondump.py10example_dir = tutils.test_data.push("../examples")CODE
Hallucination Indicators4 hits · 40 pts
SeverityFileLineSnippetContext
CRITICALtest/mitmproxy/addons/test_tlsconfig.py304 san = tssl_client.quic.tls._peer_certificate.extensions.get_extension_for_class(CODE
CRITICALmitmproxy/tools/web/static/vendor-BS4xPthR.js38`;this.styleTag.textContent=o;let f=t.head||t;this.styleTag.parentNode!=f&&f.insertBefore(this.styleTag,f.firstChild)}}sCODE
CRITICALmitmproxy/tools/console/window.py141 self.master.view.focus.sig_change.connect(self.view_changed)CODE
CRITICALmitmproxy/tools/console/window.py142 self.master.view.focus.sig_change.connect(self.focus_changed)CODE
AI Slop Vocabulary17 hits · 30 pts
SeverityFileLineSnippetContext
LOWtest/mitmproxy/addons/test_tlsconfig.py174 # so we just return our local IP as subject.COMMENT
LOWtest/mitmproxy/addons/test_view.py109 # These all just call updateCOMMENT
LOWtest/mitmproxy/addons/test_view.py159 # These all just call updateCOMMENT
LOWtest/mitmproxy/addons/test_view.py174 # These all just call updateCOMMENT
LOWtest/mitmproxy/addons/test_view.py189 # These all just call updateCOMMENT
MEDIUMmitmproxy/tools/web/static/vendor-BS4xPthR.js9`).replace(El,"")}function xm(l,a){return a=vm(a),vm(l)===a}function df(){}function wt(l,a,u,O,m,b){switch(u){case"childCODE
MEDIUMmitmproxy/tools/web/static/vendor-BS4xPthR.js55}`,{label:"class",detail:"definition",type:"keyword"}),Yi('import {${names}} from "${module}"\n${}',{label:"import",detaCODE
LOWmitmproxy/tools/console/flowview.py387 # The alternative would be to just use the header's UTF-8 representation and maybeCOMMENT
MEDIUMmitmproxy/net/http/headers.py74 # > 9. [snip] the comprehensive UTF-8 encoding is suggested.COMMENT
MEDIUMmitmproxy/proxy/layers/http/_events.py30# explicit constructors below to facilitate type checking in _http1/_http2COMMENT
LOWmitmproxy/coretypes/multidict.py193 # We just return the first element ifCOMMENT
MEDIUMweb/src/js/ducks/flows/index.ts167 // but performance is not important here and adding the flow may generally be a bit more robust.COMMENT
MEDIUMdocs/src/assets/asciinema-player.js73!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e(require("react"));else if("functioCODE
LOWexamples/addons/http-modify-form.py8 # If there's already a form, one can just add items to the dict:COMMENT
LOWexamples/addons/http-modify-form.py11 # One can also just pass new form data.COMMENT
MEDIUM…amples/contrib/webscanner_helper/proxyauth_selenium.py46 """This Addon can be used in combination with web application scanners in order to help them to authenticateSTRING
MEDIUMexamples/contrib/webscanner_helper/urlinjection.py13 """Abstract class for an generator of the injection content in order to inject the URL index."""STRING
Cross-File Repetition6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHmitmproxy/contrib/wbxml/ASCommandResponse.py0@author: david shaw, shawd@vmware.com inspired by eas inspector for fiddler https://easinspectorforfiddler.codeplex.com STRING
HIGHmitmproxy/contrib/wbxml/ASWBXMLCodePage.py0@author: david shaw, shawd@vmware.com inspired by eas inspector for fiddler https://easinspectorforfiddler.codeplex.com STRING
HIGHmitmproxy/contrib/wbxml/ASWBXMLByteQueue.py0@author: david shaw, shawd@vmware.com inspired by eas inspector for fiddler https://easinspectorforfiddler.codeplex.com STRING
HIGHmitmproxy/contrib/wbxml/InvalidDataException.py0@author: david shaw, shawd@vmware.com inspired by eas inspector for fiddler https://easinspectorforfiddler.codeplex.com STRING
HIGHmitmproxy/contrib/wbxml/GlobalTokens.py0@author: david shaw, shawd@vmware.com inspired by eas inspector for fiddler https://easinspectorforfiddler.codeplex.com STRING
HIGHmitmproxy/contrib/wbxml/ASWBXML.py0@author: david shaw, shawd@vmware.com inspired by eas inspector for fiddler https://easinspectorforfiddler.codeplex.com STRING
Docstring Block Structure5 hits · 25 pts
SeverityFileLineSnippetContext
HIGHmitmproxy/net/http/cookies.py291 Args: c: A Set-Cookie string delta: Time delta in seconds Returns: A refreshed Set-CookSTRING
HIGHmitmproxy/net/http/url.py22 URL-parsing function that checks that - port is an integer 0-65535 - host is a valid IDNA-encoded hSTRING
HIGHmitmproxy/net/http/http1/read.py250 Parse an HTTP request head (request line + headers) from an iterable of lines Args: lines: The input lSTRING
HIGHmitmproxy/net/http/http1/read.py284 Parse an HTTP response head (response line + headers) from an iterable of lines Args: lines: The inputSTRING
HIGHmitmproxy/proxy/layers/quic/_client_hello_parser.py35 Check if the supplied bytes contain a full ClientHello message, and if so, parse it. Args: - msgs:STRING
Over-Commented Block11 hits · 11 pts
SeverityFileLineSnippetContext
LOWtest/mitmproxy/test_certs.py21# d = certs.DNTree()COMMENT
LOWmitmproxy/certs.py361COMMENT
LOWmitmproxy/tools/console/flowview.py381 # X-Authors: Made with ❤ in HamburgCOMMENT
LOWmitmproxy/net/http/http1/read.py81 # Content-Length or Transfer-Encoding header fields received inCOMMENT
LOWmitmproxy/net/http/http1/read.py121 else:COMMENT
LOWmitmproxy/net/http/http1/read.py141 # 5. If a valid Content-Length header field is present withoutCOMMENT
LOWmitmproxy/platform/linux.py1import socketCOMMENT
LOWmitmproxy/addons/tlsconfig.py121COMMENT
LOWexamples/addons/wsgi-flask-app.py21addons = [COMMENT
LOWexamples/contrib/change_upstream_proxy.py1from mitmproxy import httpCOMMENT
LOWexamples/contrib/httpdump.py1#!/usr/bin/env pythonCOMMENT
Redundant / Tautological Comments5 hits · 8 pts
SeverityFileLineSnippetContext
LOWtest/mitmproxy/proxy/test_mode_servers.py107 # Set timeout to 0 for immediate timeout (fastest test)COMMENT
LOWmitmproxy/proxy/layers/tls.py84 # Check if ClientHello is completeCOMMENT
LOWmitmproxy/proxy/layers/tls.py151 # Check if ClientHello is completeCOMMENT
LOWmitmproxy/addons/tlsconfig.py638 # Check if a request has a magic CRL token at the endCOMMENT
LOWrelease/docker/docker-entrypoint.sh23 # Set HOME to /home/mitmproxy for config dir fix (mitmproxy/mitmproxy#7597)COMMENT
Verbosity Indicators5 hits · 6 pts
SeverityFileLineSnippetContext
LOWmitmproxy/proxy/layers/tls.py630 For example, we need to check if the client does ALPN or not.STRING
LOWmitmproxy/proxy/layers/http/__init__.py580 # Step 1: Determine the expected body size. This can either come from a known content-length header,COMMENT
LOWmitmproxy/proxy/layers/http/__init__.py602 # Step 2: Do we need to abort this?COMMENT
LOWmitmproxy/proxy/layers/http/__init__.py631 # Step 3: Do we need to stream this?COMMENT
LOWmitmproxy/proxy/layers/http/__init__.py742 # so we need to check if the response is done yet or not.COMMENT
Self-Referential Comments2 hits · 5 pts
SeverityFileLineSnippetContext
MEDIUMdocs/scripts/api-events.py78 print("# This file is autogenerated, do not edit manually.")CODE
MEDIUMexamples/contrib/test_jsondump.py24 # Create a dummy flow for testingCOMMENT
Structural Annotation Overuse3 hits · 4 pts
SeverityFileLineSnippetContext
LOWmitmproxy/proxy/layers/http/__init__.py580 # Step 1: Determine the expected body size. This can either come from a known content-length header,COMMENT
LOWmitmproxy/proxy/layers/http/__init__.py602 # Step 2: Do we need to abort this?COMMENT
LOWmitmproxy/proxy/layers/http/__init__.py631 # Step 3: Do we need to stream this?COMMENT
Fake / Example Data4 hits · 4 pts
SeverityFileLineSnippetContext
LOW…st/mitmproxy/contentviews/test_xml_html_data/test.html8<p>Lorem ipsum dolor<p>sit amet, consectetur <p>adipiscing elit, sed<p>do eiusmod tempor<p> incididunt ut<p> labore et dCODE
LOW…xy/contentviews/test_xml_html_data/test-formatted.html9 Lorem ipsum dolorCODE
LOWmitmproxy/tools/web/static/vendor-BS4xPthR.js13`),tn}X0(()=>{Ae.current=void 0,me.current=void 0,ie.current=Xt});const Wi=Te.useMemo(()=>Te.createElement(A,{...Xt,ref:CODE
LOWmitmproxy/tools/web/static/vendor-BS4xPthR.js43`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSeCODE
AI Structural Patterns4 hits · 4 pts
SeverityFileLineSnippetContext
LOWtest/mitmproxy/net/data/verificationcerts/generate.py19CODE
LOWmitmproxy/contentviews/_view_javascript.py41CODE
LOWmitmproxy/io/compat.py468CODE
LOWmitmproxy/contrib/click/__init__.py43CODE
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWmitmproxy/proxy/layers/dns.py71 def handle_request(CODE