Repository Analysis

pallets/werkzeug

The comprehensive WSGI web application library.

15.9 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of pallets/werkzeug, a Python project with 6,875 GitHub stars. SynthScan v2.0 examined 38,423 lines of code across 212 source files, recording 509 pattern matches distributed across 13 syntactic categories. The overall adjusted score of 15.9 places this repository in the Moderate 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).

15.9
Adjusted Score
15.9
Raw Score
100%
Time Factor
2026-08-13
Last Push
6.9K
Stars
Python
Language
38.4K
Lines of Code
212
Files
509
Pattern Hits
2026-08-13
Scan Date
0.11
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

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

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

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 0HIGH 24MEDIUM 10LOW 475

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 509 distinct pattern matches across 13 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 Identifiers259 hits · 238 pts
SeverityFileLineSnippetContext
LOWtests/test_datastructures.py46 def test_multidict_dict_interop(self):CODE
LOWtests/test_datastructures.py248 def test_follows_dict_interface(self):CODE
LOWtests/test_datastructures.py310 def test_multidict_is_hashable(self):CODE
LOWtests/test_datastructures.py352 def test_multidict_pop_raise_badrequestkeyerror_for_empty_list_value(self):CODE
LOWtests/test_datastructures.py361 def test_multidict_popitem_raise_badrequestkeyerror_for_empty_list_value(self):CODE
LOWtests/test_datastructures.py392 def test_getitem_raise_badrequestkeyerror_for_empty_list_value(self):CODE
LOWtests/test_datastructures.py409 def test_return_default_when_conversion_is_not_possible(self):CODE
LOWtests/test_datastructures.py414 def test_propagate_exceptions_in_conversion(self):CODE
LOWtests/test_datastructures.py509 def test_defaults_and_conversion(self):CODE
LOWtests/test_datastructures.py692 def test_skip_empty_special_vars(self):CODE
LOWtests/test_datastructures.py805 def test_callback_dict_writes(self):CODE
LOWtests/test_datastructures.py859 def test_stale_while_revalidate(self):CODE
LOWtests/test_datastructures.py959 def test_accept_wildcard_specificity(self):CODE
LOWtests/test_datastructures.py966 def test_accept_equal_quality(self):CODE
LOWtests/test_datastructures.py1043 def test_mimetype_always_lowercase(self):CODE
LOWtests/test_datastructures.py1048 def test_bytes_proper_sentinel(self, data):CODE
LOWtests/test_datastructures.py1059 def test_proxy_can_access_stream_attrs(self, stream):CODE
LOWtests/test_datastructures.py1108def test_range_validates_ranges(ranges):CODE
LOWtests/test_utils.py54def test_redirect_with_custom_response_class():CODE
LOWtests/test_utils.py98def test_can_set_cached_property():CODE
LOWtests/test_utils.py109def test_invalidate_cached_property():CODE
LOWtests/test_utils.py135def test_inspect_treats_cached_property_as_property():CODE
LOWtests/test_utils.py194def test_import_string_provides_traceback(tmpdir, monkeypatch):CODE
LOWtests/test_utils.py214def test_import_string_attribute_error(tmpdir, monkeypatch):CODE
LOWtests/test_utils.py238def test_header_set_duplication_bug():CODE
LOWtests/test_utils.py267def test_append_slash_redirect(autocorrect, path, base_url, absolute_location):CODE
LOWtests/test_security.py10def test_default_password_method():CODE
LOWtests/test_security.py67def test_safe_join_empty_trusted():CODE
LOWtests/test_security.py74def test_safe_join_windows_special(monkeypatch: pytest.MonkeyPatch, name: str) -> None:CODE
LOWtests/test_security.py80def test_safe_join_not_windows_special(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_send_file.py54def test_object_without_mimetype():CODE
LOWtests/test_send_file.py59def test_object_mimetype_from_name():CODE
LOWtests/test_send_file.py80def test_object_attachment_requires_name():CODE
LOWtests/test_send_file.py122def test_no_cache_conditional_default():CODE
LOWtests/test_send_file.py178def test_from_directory_not_found(path):CODE
LOWtests/test_serving.py132def test_watchdog_reloader_ignores_opened(mock_trigger_reload: Mock) -> None:CODE
LOWtests/test_serving.py152def test_watchdog_reloader_ignores_closed_no_write(mock_trigger_reload: Mock) -> None:CODE
LOWtests/test_serving.py200def test_content_type_and_length(standard_app: DevServerClient) -> None:CODE
LOWtests/test_serving.py260def test_multiple_headers_concatenated(standard_app: DevServerClient) -> None:CODE
LOWtests/test_serving.py284def test_multiline_header_folding(standard_app: DevServerClient) -> None:CODE
LOWtests/test_serving.py303def test_streaming_close_response(dev_server: StartDevServer, endpoint: str) -> None:CODE
LOWtests/test_serving.py314def test_streaming_chunked_response(dev_server: StartDevServer) -> None:CODE
LOWtests/test_serving.py327def test_streaming_chunked_truncation(dev_server: StartDevServer) -> None:CODE
LOWtests/test_debug.py45 def test_string_subclass_repr(self):CODE
LOWtests/test_debug.py219 def test_exc_divider_found_on_chained_exception(self):CODE
LOWtests/test_debug.py257def test_console_closure_variables(monkeypatch):CODE
LOWtests/test_debug.py268def test_chained_exception_cycle():CODE
LOWtests/test_debug.py283def test_exception_without_traceback():CODE
LOWtests/test_debug.py293def test_missing_source_lines(mock_getlines: mock.Mock) -> None:CODE
LOWtests/test_debug.py309def test_debugged_application_pin_security_false():CODE
LOWtests/test_test.py55def external_redirect_demo_app(environ, start_response):CODE
LOWtests/test_test.py60def external_subdomain_redirect_demo_app(environ, start_response):CODE
LOWtests/test_test.py89def test_cookiejar_stores_cookie():CODE
LOWtests/test_test.py115def test_cookie_for_different_path():CODE
LOWtests/test_test.py141def test_environ_builder_basics():CODE
LOWtests/test_test.py162def test_environ_builder_data():CODE
LOWtests/test_test.py192def test_environ_builder_json():CODE
LOWtests/test_test.py206def test_environ_builder_headers():CODE
LOWtests/test_test.py222def test_environ_builder_headers_content_type():CODE
LOWtests/test_test.py236def test_envrion_builder_multiple_headers():CODE
199 more matches not shown…
Unused Imports126 hits · 116 pts
SeverityFileLineSnippetContext
LOWtests/test_datastructures.py1CODE
LOWtests/test_utils.py1CODE
LOWtests/conftest.py1CODE
LOWtests/test_serving.py1CODE
LOWtests/test_routing.py1CODE
LOWtests/test_wsgi.py1CODE
LOWtests/sansio/test_utils.py1CODE
LOWexamples/cupoftee/__init__.py2CODE
LOWexamples/i18nurls/__init__.py1CODE
LOWexamples/simplewiki/__init__.py4CODE
LOWexamples/coolmagic/__init__.py1CODE
LOWexamples/plnt/webapp.py9CODE
LOWexamples/plnt/__init__.py2CODE
LOWexamples/webpylike/webpylike.py12CODE
LOWsrc/werkzeug/user_agent.py1CODE
LOWsrc/werkzeug/_reloader.py1CODE
LOWsrc/werkzeug/_internal.py1CODE
LOWsrc/werkzeug/serving.py15CODE
LOWsrc/werkzeug/local.py1CODE
LOWsrc/werkzeug/security.py1CODE
LOWsrc/werkzeug/__init__.py1CODE
LOWsrc/werkzeug/__init__.py2CODE
LOWsrc/werkzeug/__init__.py3CODE
LOWsrc/werkzeug/__init__.py4CODE
LOWsrc/werkzeug/test.py1CODE
LOWsrc/werkzeug/formparser.py1CODE
LOWsrc/werkzeug/utils.py1CODE
LOWsrc/werkzeug/http.py1CODE
LOWsrc/werkzeug/exceptions.py47CODE
LOWsrc/werkzeug/urls.py1CODE
LOWsrc/werkzeug/wsgi.py1CODE
LOWsrc/werkzeug/wsgi.py11CODE
LOWsrc/werkzeug/testapp.py5CODE
LOWsrc/werkzeug/middleware/dispatcher.py34CODE
LOWsrc/werkzeug/middleware/proxy_fix.py25CODE
LOWsrc/werkzeug/middleware/shared_data.py12CODE
LOWsrc/werkzeug/middleware/http_proxy.py11CODE
LOWsrc/werkzeug/middleware/profiler.py15CODE
LOWsrc/werkzeug/middleware/lint.py16CODE
LOWsrc/werkzeug/wrappers/request.py1CODE
LOWsrc/werkzeug/wrappers/__init__.py1CODE
LOWsrc/werkzeug/wrappers/__init__.py2CODE
LOWsrc/werkzeug/wrappers/__init__.py3CODE
LOWsrc/werkzeug/wrappers/response.py1CODE
LOWsrc/werkzeug/sansio/multipart.py1CODE
LOWsrc/werkzeug/sansio/request.py1CODE
LOWsrc/werkzeug/sansio/response.py1CODE
LOWsrc/werkzeug/sansio/utils.py1CODE
LOWsrc/werkzeug/sansio/http.py1CODE
LOWsrc/werkzeug/datastructures/auth.py1CODE
LOWsrc/werkzeug/datastructures/mixins.py1CODE
LOWsrc/werkzeug/datastructures/range.py1CODE
LOWsrc/werkzeug/datastructures/__init__.py1CODE
LOWsrc/werkzeug/datastructures/__init__.py5CODE
LOWsrc/werkzeug/datastructures/__init__.py6CODE
LOWsrc/werkzeug/datastructures/__init__.py7CODE
LOWsrc/werkzeug/datastructures/__init__.py8CODE
LOWsrc/werkzeug/datastructures/__init__.py9CODE
LOWsrc/werkzeug/datastructures/__init__.py10CODE
LOWsrc/werkzeug/datastructures/__init__.py11CODE
66 more matches not shown…
Cross-Language Confusion10 hits · 74 pts
SeverityFileLineSnippetContext
HIGHtests/test_local.py92 ls.push(42)CODE
HIGHtests/test_local.py100 ls.push(42)CODE
HIGHtests/test_local.py102 ls.push(23)CODE
HIGHtests/test_local.py112 ls.push([1, 2])CODE
HIGHtests/test_local.py114 ls.push((1, 2))CODE
HIGHtests/test_local.py123 ls.push(1)CODE
HIGHtests/test_local.py126 ls.push(1)CODE
HIGHtests/test_local.py203 local_stack.push(42)CODE
HIGHtests/test_wsgi.py157 # this expects stream.readable() to exist and return trueCOMMENT
HIGHsrc/werkzeug/debug/console.py161 ThreadedStream.push()CODE
Cross-File Repetition14 hits · 70 pts
SeverityFileLineSnippetContext
HIGHexamples/shorty/utils.py0return true if there are pages before the current one.STRING
HIGHexamples/couchy/utils.py0return true if there are pages before the current one.STRING
HIGHexamples/plnt/utils.py0return true if there are pages before the current one.STRING
HIGHexamples/shorty/utils.py0return true if there are pages after the current one.STRING
HIGHexamples/couchy/utils.py0return true if there are pages after the current one.STRING
HIGHexamples/plnt/utils.py0return true if there are pages after the current one.STRING
HIGHsrc/werkzeug/test.py0the mimetype parameters as dict. for example if the content type is ``text/html; charset=utf-8`` the params would be ``{STRING
HIGHsrc/werkzeug/sansio/request.py0the mimetype parameters as dict. for example if the content type is ``text/html; charset=utf-8`` the params would be ``{STRING
HIGHsrc/werkzeug/sansio/response.py0the mimetype parameters as dict. for example if the content type is ``text/html; charset=utf-8`` the params would be ``{STRING
HIGHsrc/werkzeug/datastructures/file_storage.py0the mimetype parameters as dict. for example if the content type is ``text/html; charset=utf-8`` the params would be ``{STRING
HIGHsrc/werkzeug/datastructures/csp.py0parse a header value and create an instance of this class. .. versionadded:: 3.2STRING
HIGHsrc/werkzeug/datastructures/cache_control.py0parse a header value and create an instance of this class. .. versionadded:: 3.2STRING
HIGHsrc/werkzeug/datastructures/accept.py0parse a header value and create an instance of this class. .. versionadded:: 3.2STRING
HIGHsrc/werkzeug/datastructures/structures.py0parse a header value and create an instance of this class. .. versionadded:: 3.2STRING
Deep Nesting48 hits · 48 pts
SeverityFileLineSnippetContext
LOWexamples/wsecho.py20CODE
LOWexamples/shorty/views.py14CODE
LOWexamples/cupoftee/pages.py61CODE
LOWexamples/couchy/views.py13CODE
LOWexamples/simplewiki/actions.py37CODE
LOWexamples/simplewiki/actions.py134CODE
LOWexamples/plnt/sync.py17CODE
LOWexamples/webpylike/webpylike.py43CODE
LOWsrc/werkzeug/_reloader.py68CODE
LOWsrc/werkzeug/serving.py439CODE
LOWsrc/werkzeug/serving.py707CODE
LOWsrc/werkzeug/local.py478CODE
LOWsrc/werkzeug/security.py27CODE
LOWsrc/werkzeug/test.py56CODE
LOWsrc/werkzeug/test.py161CODE
LOWsrc/werkzeug/test.py281CODE
LOWsrc/werkzeug/test.py1062CODE
LOWsrc/werkzeug/formparser.py392CODE
LOWsrc/werkzeug/utils.py329CODE
LOWsrc/werkzeug/http.py327CODE
LOWsrc/werkzeug/http.py400CODE
LOWsrc/werkzeug/http.py552CODE
LOWsrc/werkzeug/http.py1524CODE
LOWsrc/werkzeug/middleware/shared_data.py104CODE
LOWsrc/werkzeug/middleware/lint.py166CODE
LOWsrc/werkzeug/wrappers/response.py438CODE
LOWsrc/werkzeug/sansio/multipart.py140CODE
LOWsrc/werkzeug/sansio/multipart.py300CODE
LOWsrc/werkzeug/sansio/http.py13CODE
LOWsrc/werkzeug/datastructures/range.py123CODE
LOWsrc/werkzeug/datastructures/cache_control.py128CODE
LOWsrc/werkzeug/datastructures/structures.py24CODE
LOWsrc/werkzeug/datastructures/structures.py183CODE
LOWsrc/werkzeug/datastructures/structures.py601CODE
LOWsrc/werkzeug/datastructures/structures.py645CODE
LOWsrc/werkzeug/datastructures/headers.py168CODE
LOWsrc/werkzeug/datastructures/headers.py490CODE
LOWsrc/werkzeug/routing/matcher.py39CODE
LOWsrc/werkzeug/routing/matcher.py75CODE
LOWsrc/werkzeug/routing/matcher.py85CODE
LOWsrc/werkzeug/routing/rules.py270CODE
LOWsrc/werkzeug/routing/rules.py605CODE
LOWsrc/werkzeug/routing/map.py828CODE
LOWsrc/werkzeug/debug/tbtools.py126CODE
LOWsrc/werkzeug/debug/__init__.py55CODE
LOWsrc/werkzeug/debug/__init__.py61CODE
LOWsrc/werkzeug/debug/__init__.py472CODE
LOWsrc/werkzeug/debug/__init__.py538CODE
Excessive Try-Catch Wrapping23 hits · 30 pts
SeverityFileLineSnippetContext
LOWtests/test_debug.py286 except Exception as e:CODE
MEDIUMtests/test_debug.py268def test_chained_exception_cycle():CODE
LOWexamples/cupoftee/db.py66 except Exception:CODE
MEDIUMexamples/cupoftee/db.py62def close(self):CODE
LOWexamples/cupoftee/network.py108 except Exception:CODE
LOWexamples/couchy/models.py36 except Exception:CODE
LOWexamples/couchy/application.py23 except Exception:CODE
LOWsrc/werkzeug/serving.py372 except Exception as e:CODE
LOWsrc/werkzeug/serving.py386 except Exception:CODE
LOWsrc/werkzeug/serving.py400 except Exception as e:CODE
MEDIUMsrc/werkzeug/serving.py109def read_chunk_len(self) -> int:CODE
LOWsrc/werkzeug/middleware/lint.py223 except Exception:CODE
LOWsrc/werkzeug/sansio/request.py148 except Exception as e:CODE
MEDIUMsrc/werkzeug/sansio/request.py145def __repr__(self) -> str:CODE
LOWsrc/werkzeug/datastructures/file_storage.py128 except Exception:CODE
LOWsrc/werkzeug/debug/console.py178 except Exception:CODE
MEDIUMsrc/werkzeug/debug/console.py70def fetch() -> str:CODE
LOWsrc/werkzeug/debug/__init__.py349 except Exception as e:CODE
LOWsrc/werkzeug/debug/__init__.py369 except Exception:CODE
LOWsrc/werkzeug/debug/repr.py220 except Exception:CODE
LOWsrc/werkzeug/debug/repr.py237 except Exception:CODE
LOWsrc/werkzeug/debug/repr.py260 except Exception:CODE
MEDIUMsrc/werkzeug/debug/repr.py217def fallback_repr(self) -> str:CODE
Redundant / Tautological Comments7 hits · 14 pts
SeverityFileLineSnippetContext
LOWtests/test_routing.py208 # Check if the actual routes worksCOMMENT
LOWtests/test_routing.py212 # Check if exceptions are correctCOMMENT
LOWtests/test_routing.py220 # Check if the actual routes worksCOMMENT
LOWtests/test_routing.py223 # Check if exceptions are correctCOMMENT
LOWtests/test_routing.py184 # Check if the actual routes worksCOMMENT
LOWtests/test_routing.py189 # Check if exceptions are correctCOMMENT
LOWsrc/werkzeug/debug/__init__.py321 # Set _pin to None explicitly to prevent regeneration by the getterCOMMENT
AI Structural Patterns8 hits · 8 pts
SeverityFileLineSnippetContext
LOWsrc/werkzeug/serving.py956CODE
LOWsrc/werkzeug/test.py281CODE
LOWsrc/werkzeug/utils.py329CODE
LOWsrc/werkzeug/http.py1369CODE
LOWsrc/werkzeug/sansio/response.py185CODE
LOWsrc/werkzeug/sansio/http.py13CODE
LOWsrc/werkzeug/routing/rules.py458CODE
LOWsrc/werkzeug/routing/map.py101CODE
Over-Commented Block6 hits · 6 pts
SeverityFileLineSnippetContext
LOWsrc/werkzeug/local.py561 # __get__ (proxying descriptor not supported)COMMENT
LOWsrc/werkzeug/wrappers/request.py81COMMENT
LOWsrc/werkzeug/wrappers/response.py121 #:COMMENT
LOWsrc/werkzeug/sansio/multipart.py101 # Note in the below \h i.e. horizontal whitespace is usedCOMMENT
LOWsrc/werkzeug/sansio/request.py61 """COMMENT
LOWsrc/werkzeug/sansio/request.py121 remote_addr: str | None,COMMENT
Self-Referential Comments3 hits · 5 pts
SeverityFileLineSnippetContext
MEDIUMexamples/coolmagic/application.py1"""This module provides the WSGI application.STRING
MEDIUMsrc/werkzeug/formparser.py132 """This class implements parsing of form data for Werkzeug. By itselfSTRING
MEDIUMsrc/werkzeug/routing/matcher.py88 # This function is meant to be called recursively, and will attemptCOMMENT
Modern Structural Boilerplate3 hits · 3 pts
SeverityFileLineSnippetContext
LOWsrc/werkzeug/wrappers/response.py289 def set_data(self, value: bytes | str) -> None:CODE
LOWsrc/werkzeug/sansio/response.py539 def set_etag(self, etag: str, weak: bool = False) -> None:CODE
LOWsrc/werkzeug/routing/matcher.py66 def _update_state(state: State) -> None:CODE
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtests/test_debug.py222 def do_something():CODE
Slop Phrases1 hit · 1 pts
SeverityFileLineSnippetContext
MEDIUMsrc/werkzeug/routing/__init__.py76And here is how you can match URLs:STRING