Repository Analysis

pallets/flask

The Python micro framework for building web applications.

17.2 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of pallets/flask, a Python project with 71,923 GitHub stars. SynthScan v2.0 examined 19,952 lines of code across 139 source files, recording 333 pattern matches distributed across 9 syntactic categories. The overall adjusted score of 17.2 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).

17.2
Adjusted Score
17.2
Raw Score
100%
Time Factor
2026-06-10
Last Push
71.9K
Stars
Python
Language
20.0K
Lines of Code
139
Files
333
Pattern Hits
2026-07-14
Scan Date
0.04
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 0HIGH 5MEDIUM 4LOW 324

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 333 distinct pattern matches across 9 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 Identifiers210 hits · 200 pts
SeverityFileLineSnippetContext
LOWtests/test_basic.py1396def test_build_error_handler_reraise(app):CODE
LOWtests/test_basic.py1398 def handler_raises_build_error(error, endpoint, values):CODE
LOWtests/test_basic.py1407def test_url_for_passes_special_values_to_build_error_handler(app):CODE
LOWtests/test_basic.py1454def test_static_url_empty_path(app):CODE
LOWtests/test_basic.py1461def test_static_url_empty_path_default(app):CODE
LOWtests/test_basic.py1468def test_static_folder_with_pathlib_path(app):CODE
LOWtests/test_basic.py1477def test_static_folder_with_ending_slash():CODE
LOWtests/test_basic.py42def test_options_on_multiple_rules(app, client):CODE
LOWtests/test_basic.py67def test_method_route_no_methods(app):CODE
LOWtests/test_basic.py72def test_provide_automatic_options_attr_disable(CODE
LOWtests/test_basic.py86def test_provide_automatic_options_attr_enable(CODE
LOWtests/test_basic.py103def test_provide_automatic_options_arg_disable(CODE
LOWtests/test_basic.py116def test_provide_automatic_options_method_disable(CODE
LOWtests/test_basic.py152def test_disallow_string_for_allowed_methods(app):CODE
LOWtests/test_basic.py288def test_session_using_application_root(app, client):CODE
LOWtests/test_basic.py310def test_session_using_session_settings(app, client):CODE
LOWtests/test_basic.py353def test_session_using_samesite_attribute(app, client):CODE
LOWtests/test_basic.py393def test_session_secret_key_fallbacks(app, client) -> None:CODE
LOWtests/test_basic.py467def test_session_special_types(app, client):CODE
LOWtests/test_basic.py498def test_session_cookie_setting(app):CODE
LOWtests/test_basic.py600def test_session_refresh_vary(app, client):CODE
LOWtests/test_basic.py732def test_request_preprocessing_early_return(app, client):CODE
LOWtests/test_basic.py759def test_after_request_processing(app, client):CODE
LOWtests/test_basic.py774def test_teardown_request_handler(app, client):CODE
LOWtests/test_basic.py792def test_teardown_request_handler_debug_mode(app, client):CODE
LOWtests/test_basic.py810def test_teardown_request_handler_error(app, client):CODE
LOWtests/test_basic.py848def test_before_after_request_order(app, client):CODE
LOWtests/test_basic.py924def test_error_handling_processing(app, client):CODE
LOWtests/test_basic.py945def test_baseexception_error_handling(app, client):CODE
LOWtests/test_basic.py956def test_before_request_and_routing_errors(app, client):CODE
LOWtests/test_basic.py986def test_http_error_subclass_handling(app, client):CODE
LOWtests/test_basic.py991 def handle_forbidden_subclass(e):CODE
LOWtests/test_basic.py1018def test_errorhandler_precedence(app, client):CODE
LOWtests/test_basic.py1055def test_trap_bad_request_key_error(app, client, debug, trap, expect_key, expect_abort):CODE
LOWtests/test_basic.py1086def test_trapping_of_all_http_exceptions(app, client):CODE
LOWtests/test_basic.py1097def test_error_handler_after_processor_error(app, client):CODE
LOWtests/test_basic.py1126def test_enctype_debug_helper(app, client):CODE
LOWtests/test_basic.py1235def test_response_type_errors():CODE
LOWtests/test_basic.py1306def test_make_response_with_response_instance(app, req_ctx):CODE
LOWtests/test_basic.py1328def test_jsonify_no_prettyprint(app, compact):CODE
LOWtests/test_basic.py1352def test_jsonify_args_and_kwargs_check(app, req_ctx):CODE
LOWtests/test_basic.py1443def test_static_url_path_with_ending_slash():CODE
LOWtests/test_basic.py1488def test_static_route_with_host_matching():CODE
LOWtests/test_basic.py1526def test_server_name_matching(CODE
LOWtests/test_basic.py1562def test_server_name_subdomain():CODE
LOWtests/test_basic.py1608def test_exception_propagation(app, client, key):CODE
LOWtests/test_basic.py1628def test_werkzeug_passthrough_errors(CODE
LOWtests/test_basic.py1671def test_inject_blueprint_url_defaults(app):CODE
LOWtests/test_basic.py1704def test_no_setup_after_first_request(app, client):CODE
LOWtests/test_basic.py1719def test_routing_redirect_debugging(monkeypatch, app, client):CODE
LOWtests/test_basic.py1739def test_route_decorator_custom_endpoint(app, client):CODE
LOWtests/test_basic.py1772def test_g_iteration_protocol(app_ctx):CODE
LOWtests/test_basic.py1780def test_subdomain_basic_support():CODE
LOWtests/test_basic.py1813def test_subdomain_matching_with_ports():CODE
LOWtests/test_basic.py1827def test_subdomain_matching_other_name(matching):CODE
LOWtests/test_basic.py1862def test_multi_route_class_views(app, client):CODE
LOWtests/test_basic.py1958def test_app_freed_on_zero_refcount():CODE
LOWtests/test_signals.py25def test_before_render_template():CODE
LOWtests/test_signals.py95def test_request_exception_signal():CODE
LOWtests/test_signals.py163def test_appcontext_tearing_down_signal(app, client):CODE
150 more matches not shown…
Unused Imports74 hits · 64 pts
SeverityFileLineSnippetContext
LOWtests/test_request.py1CODE
LOWtests/test_reqctx.py1CODE
LOWtests/test_cli.py524CODE
LOWtests/test_apps/helloworld/wsgi.py1CODE
LOWtests/type_check/typing_route.py1CODE
LOWtests/type_check/typing_app_decorators.py1CODE
LOWtests/type_check/typing_error_handler.py1CODE
LOWexamples/javascript/js_example/__init__.py5CODE
LOWsrc/flask/logging.py1CODE
LOWsrc/flask/signals.py1CODE
LOWsrc/flask/sessions.py1CODE
LOWsrc/flask/config.py1CODE
LOWsrc/flask/templating.py1CODE
LOWsrc/flask/globals.py1CODE
LOWsrc/flask/__init__.py1CODE
LOWsrc/flask/__init__.py2CODE
LOWsrc/flask/__init__.py3CODE
LOWsrc/flask/__init__.py4CODE
LOWsrc/flask/__init__.py5CODE
LOWsrc/flask/__init__.py6CODE
LOWsrc/flask/__init__.py7CODE
LOWsrc/flask/__init__.py8CODE
LOWsrc/flask/__init__.py9CODE
LOWsrc/flask/__init__.py10CODE
LOWsrc/flask/__init__.py11CODE
LOWsrc/flask/__init__.py12CODE
LOWsrc/flask/__init__.py13CODE
LOWsrc/flask/__init__.py14CODE
LOWsrc/flask/__init__.py15CODE
LOWsrc/flask/__init__.py16CODE
LOWsrc/flask/__init__.py17CODE
LOWsrc/flask/__init__.py18CODE
LOWsrc/flask/__init__.py19CODE
LOWsrc/flask/__init__.py20CODE
LOWsrc/flask/__init__.py21CODE
LOWsrc/flask/__init__.py22CODE
LOWsrc/flask/__init__.py23CODE
LOWsrc/flask/__init__.py24CODE
LOWsrc/flask/__init__.py25CODE
LOWsrc/flask/__init__.py26CODE
LOWsrc/flask/__init__.py27CODE
LOWsrc/flask/__init__.py28CODE
LOWsrc/flask/__init__.py29CODE
LOWsrc/flask/__init__.py30CODE
LOWsrc/flask/__init__.py31CODE
LOWsrc/flask/__init__.py32CODE
LOWsrc/flask/__init__.py33CODE
LOWsrc/flask/__init__.py34CODE
LOWsrc/flask/__init__.py35CODE
LOWsrc/flask/__init__.py36CODE
LOWsrc/flask/__init__.py37CODE
LOWsrc/flask/__init__.py38CODE
LOWsrc/flask/__init__.py39CODE
LOWsrc/flask/blueprints.py1CODE
LOWsrc/flask/blueprints.py11CODE
LOWsrc/flask/cli.py1CODE
LOWsrc/flask/cli.py810CODE
LOWsrc/flask/wrappers.py1CODE
LOWsrc/flask/app.py1CODE
LOWsrc/flask/debughelpers.py1CODE
14 more matches not shown…
Cross-Language Confusion5 hits · 32 pts
SeverityFileLineSnippetContext
HIGHtests/test_reqctx.py23 ctx.push()CODE
HIGHtests/test_reqctx.py126 ctx.push()CODE
HIGHtests/test_reqctx.py140 ctx.push()CODE
HIGHsrc/flask/app.py1596 ctx.push()CODE
HIGHsrc/flask/ctx.py507 self.push()CODE
Over-Commented Block17 hits · 17 pts
SeverityFileLineSnippetContext
LOWexamples/celery/requirements.txt1#COMMENT
LOWexamples/celery/requirements.txt21 # click-pluginsCOMMENT
LOWexamples/celery/requirements.txt41 # werkzeugCOMMENT
LOWsrc/flask/views.py61 #: decorator.COMMENT
LOWsrc/flask/sansio/app.py161 #: Defaults to :class:`werkzeug.exceptions.Aborter`.COMMENT
LOWsrc/flask/sansio/app.py181 #: Renamed from ``request_globals_class`.COMMENT
LOWsrc/flask/sansio/app.py201 #: default it's implicitly enabled.COMMENT
LOWsrc/flask/sansio/app.py241 #: the environment is created (accessing :attr:`jinja_env`) willCOMMENT
LOWsrc/flask/sansio/app.py341COMMENT
LOWsrc/flask/sansio/app.py361COMMENT
LOWsrc/flask/sansio/app.py381 #: case of a "Flask-Foo" extension in `flask_foo`, the key would beCOMMENT
LOWsrc/flask/sansio/scaffold.py101COMMENT
LOWsrc/flask/sansio/scaffold.py121 #: This data structure is internal. It should not be modifiedCOMMENT
LOWsrc/flask/sansio/scaffold.py141COMMENT
LOWsrc/flask/sansio/scaffold.py161 #:COMMENT
LOWsrc/flask/sansio/scaffold.py181 #: directly and its format may change at any time.COMMENT
LOWsrc/flask/sansio/scaffold.py201COMMENT
Excessive Try-Catch Wrapping12 hits · 13 pts
SeverityFileLineSnippetContext
LOWtests/test_basic.py823 except Exception:CODE
LOWtests/test_basic.py835 except Exception:CODE
LOWtests/test_reqctx.py38 except Exception:CODE
LOWtests/test_reqctx.py57 except Exception:CODE
LOWtests/test_appctx.py68 except Exception:CODE
LOWtests/test_appctx.py87 except Exception:CODE
LOWsrc/flask/config.py163 except Exception:CODE
LOWsrc/flask/cli.py650 except Exception:CODE
LOWsrc/flask/cli.py956 except Exception as e:CODE
LOWsrc/flask/app.py1017 except Exception as e:CODE
LOWsrc/flask/app.py1045 except Exception:CODE
LOWsrc/flask/app.py1598 except Exception as e:CODE
Deep Nesting7 hits · 7 pts
SeverityFileLineSnippetContext
LOWsrc/flask/cli.py41CODE
LOWsrc/flask/cli.py333CODE
LOWsrc/flask/app.py1224CODE
LOWsrc/flask/app.py1366CODE
LOWsrc/flask/app.py1420CODE
LOWsrc/flask/sansio/blueprints.py273CODE
LOWsrc/flask/sansio/app.py868CODE
AI Structural Patterns4 hits · 4 pts
SeverityFileLineSnippetContext
LOWsrc/flask/blueprints.py19CODE
LOWsrc/flask/app.py310CODE
LOWsrc/flask/sansio/blueprints.py174CODE
LOWsrc/flask/sansio/app.py279CODE
Self-Referential Comments2 hits · 2 pts
SeverityFileLineSnippetContext
MEDIUMsrc/flask/app.py868 """This method is called whenever an exception occurs thatSTRING
MEDIUMsrc/flask/app.py1054 """This method is called to create the default ``OPTIONS`` response.STRING
AI Slop Vocabulary2 hits · 2 pts
SeverityFileLineSnippetContext
MEDIUMsrc/flask/sessions.py101 """The basic interface you have to implement in order to replace theSTRING
MEDIUMsrc/flask/app.py1395 """Can be overridden in order to modify the response objectSTRING