AI Slop Code RIsk Monitor

mitmproxy/mitmproxy

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

7.8 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for mitmproxy/mitmproxy, a Python project with 45,397 GitHub stars. SynthScan examined 146,010 lines of code across 1018 source files, recording 842 pattern matches distributed across 19 syntactic categories. The legacy adjusted pattern signal is 7.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.

7.8
Adjusted Signal
7.8
Raw Pattern Score
100%
Time Factor
2026-10-05
Last Push
45.4K
Stars
Python
Language
146.0K
Lines of Code
1.0K
Files
842
Pattern Hits
2026-10-12
Scan Date
0.06
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 17.8/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 6.6/100 · LOW

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

Agent Over-Engineering Ratio 21.6/100 · LOW

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

PR Review Velocity Impact 33.5/100 · MEDIUM

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

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.

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 4HIGH 57MEDIUM 15LOW 766

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 842 distinct pattern matches across 19 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 Identifiers336 hits · 338 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.py257 def test_flow_update_http_version_only(self):CODE
LOWtest/mitmproxy/tools/web/test_app.py308 def test_flow_content_returns_raw_content_when_decoding_fails(self):CODE
LOWtest/mitmproxy/tools/web/test_app.py335 def test_update_flow_content_multipart(self):CODE
LOWtest/mitmproxy/tools/web/test_app.py374 def test_flow_contentview_websocket(self):CODE
LOWtest/mitmproxy/tools/web/test_app.py461 def test_websocket_filter_application(self):CODE
LOWtest/mitmproxy/tools/web/test_app.py543 def test_websocket_filter_command_error(self):CODE
LOW⚡test/mitmproxy/tools/web/test_app.py593 def test_login_with_token_header(self):CODE
LOW⚡test/mitmproxy/tools/web/test_app.py598 def test_login_with_token_param(self):CODE
LOW⚡test/mitmproxy/tools/web/test_app.py603 def test_login_with_malformed_auth_header(self):CODE
LOW⚡test/mitmproxy/tools/web/test_app.py607 def test_login_with_invalid_auth_header(self):CODE
LOW⚡test/mitmproxy/tools/web/test_app.py616 def test_unauthorized_websocket(self):CODE
LOW⚡test/mitmproxy/tools/web/test_app.py626 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
276 more matches not shown…
Empty Error Handlers39 hits · 195 pts
SeverityFileLineSnippetContext
HIGHtest/mitmproxy/test_optmanager.py165except exceptions.OptionsError:CODE
HIGHtest/mitmproxy/tools/web/test_app.py582except Exception:CODE
HIGHtest/mitmproxy/net/dns/test_https_records.py86except struct.error:CODE
HIGHtest/mitmproxy/proxy/layers/test_tls_fuzz.py25except ValueError:CODE
HIGHtest/mitmproxy/proxy/layers/test_dns.py33except struct.error:CODE
HIGHtest/mitmproxy/proxy/layers/test_dns.py46except struct.error:CODE
HIGHtest/mitmproxy/addons/test_proxyserver.py120except asyncio.CancelledError:CODE
HIGHtest/mitmproxy/io/test_io.py28except exceptions.FlowReadException:CODE
HIGHtest/mitmproxy/io/test_io.py40except exceptions.FlowReadException:CODE
HIGHmitmproxy/command.py181except Exception:CODE
HIGHmitmproxy/version.py39except Exception:CODE
HIGHmitmproxy/http.py976except ValueError:CODE
HIGHmitmproxy/http.py1197except OSError: # pragma: no coverCODE
HIGHmitmproxy/contentviews/_view_graphql.py66except ValueError:CODE
HIGHmitmproxy/tools/web/webaddons.py153except webbrowser.Error:CODE
HIGHmitmproxy/net/free_port.py20except OSError:CODE
HIGHmitmproxy/net/http/cookies.py339except ValueError:CODE
HIGHmitmproxy/net/dns/domain_names.py165except struct.error:CODE
HIGHmitmproxy/net/dns/https_records.py56except ValueError:CODE
HIGHmitmproxy/proxy/server.py604except KeyboardInterrupt:CODE
HIGHmitmproxy/proxy/server.py323except OSError:CODE
HIGHmitmproxy/proxy/server.py347except KeyError: # pragma: no coverCODE
HIGHmitmproxy/proxy/mode_servers.py248except OSError: # pragma: no coverCODE
HIGHmitmproxy/proxy/layers/tls.py455except (SSL.ZeroReturnError, SSL.SysCallError):CODE
HIGHmitmproxy/proxy/layers/http/__init__.py1039except KeyError:CODE
HIGHmitmproxy/coretypes/serializable.py106except dataclasses.FrozenInstanceError:CODE
HIGHmitmproxy/platform/windows.py113except (EOFError, OSError):CODE
HIGHmitmproxy/addons/next_layer.py315except ValueError:CODE
HIGHmitmproxy/addons/next_layer.py326except ValueError:CODE
HIGHmitmproxy/addons/next_layer.py336except ValueError:CODE
HIGHmitmproxy/addons/proxyauth.py103except Exception:CODE
HIGHmitmproxy/addons/view.py656except ValueError:CODE
HIGHmitmproxy/addons/clientplayback.py171except asyncio.CancelledError:CODE
HIGHmitmproxy/utils/typecheck.py28except TypeError:CODE
HIGHmitmproxy/utils/human.py42except ValueError:CODE
HIGHmitmproxy/utils/debug.py94except RuntimeError:CODE
HIGHmitmproxy/utils/strutils.py159except ValueError:CODE
HIGHrelease/selftest.py22except KeyError:CODE
HIGHexamples/contrib/webscanner_helper/mapping.py138except KeyError:CODE
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.py383CODE
LOWmitmproxy/flowfilter.py422CODE
LOWmitmproxy/flowfilter.py453CODE
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.py719CODE
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 Imports114 hits · 114 pts
SeverityFileLineSnippetContext
LOWtest/conftest.py1CODE
LOWtest/mitmproxy/coretypes/test_serializable.py1CODE
LOWtest/mitmproxy/addons/test_proxyserver.py1CODE
LOWtest/mitmproxy/addons/test_next_layer.py1CODE
LOWtest/helper_tools/gen_sample_flows.py14CODE
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
54 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.py242__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.py582 except Exception:CODE
MEDIUMtest/mitmproxy/tools/web/test_app.py564def 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.py228 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.py789 except Exception as e:CODE
LOWmitmproxy/tools/web/app.py813 except Exception as err:CODE
LOWmitmproxy/tools/web/app.py873 except Exception:CODE
LOWmitmproxy/tools/console/master.py149 except Exception:CODE
LOWmitmproxy/tools/console/master.py184 except Exception:CODE
LOWmitmproxy/net/encoding.py75 except Exception as e:CODE
LOWmitmproxy/net/encoding.py133 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
HIGH⚡test/mitmproxy/contentviews/test__view_mqtt.py27 b"""{"body":{"parameters":null},"header":{"from":"56:6F:5E:6A:01:05","messageId":"connected","type":"event"}CODE
HIGH⚡test/mitmproxy/contentviews/test__view_mqtt.py28 """[PUBLISH] '{"body":{"parameters":null},"header":{"from":"56:6F:5E:6A:01:05","""STRING
HIGH⚡test/mitmproxy/contentviews/test__view_mqtt.py35 b"""\x00l{"body":{"parameters":null},"header":{"from":"56:6F:5E:6A:01:05","messageId":"disconnected","type":CODE
HIGH⚡test/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.py361 critical=not is_valid_commonname,COMMENT
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