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 72,144 GitHub stars. SynthScan v2.0 examined 19,979 lines of code across 139 source files, recording 334 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-08-16
Last Push
72.1K
Stars
Python
Language
20.0K
Lines of Code
139
Files
334
Pattern Hits
2026-08-29
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 325

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 334 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.py1399def test_build_error_handler_reraise(app):CODE
LOWtests/test_basic.py1401 def handler_raises_build_error(error, endpoint, values):CODE
LOWtests/test_basic.py1410def test_url_for_passes_special_values_to_build_error_handler(app):CODE
LOWtests/test_basic.py1457def test_static_url_empty_path(app):CODE
LOWtests/test_basic.py1464def test_static_url_empty_path_default(app):CODE
LOWtests/test_basic.py1471def test_static_folder_with_pathlib_path(app):CODE
LOWtests/test_basic.py1480def test_static_folder_with_ending_slash():CODE
LOWtests/test_basic.py43def test_options_on_multiple_rules(app, client):CODE
LOWtests/test_basic.py70def test_method_route_no_methods(app):CODE
LOWtests/test_basic.py75def test_provide_automatic_options_attr_disable(CODE
LOWtests/test_basic.py89def test_provide_automatic_options_attr_enable(CODE
LOWtests/test_basic.py106def test_provide_automatic_options_arg_disable(CODE
LOWtests/test_basic.py119def test_provide_automatic_options_method_disable(CODE
LOWtests/test_basic.py155def test_disallow_string_for_allowed_methods(app):CODE
LOWtests/test_basic.py291def test_session_using_application_root(app, client):CODE
LOWtests/test_basic.py313def test_session_using_session_settings(app, client):CODE
LOWtests/test_basic.py356def test_session_using_samesite_attribute(app, client):CODE
LOWtests/test_basic.py396def test_session_secret_key_fallbacks(app, client) -> None:CODE
LOWtests/test_basic.py470def test_session_special_types(app, client):CODE
LOWtests/test_basic.py501def test_session_cookie_setting(app):CODE
LOWtests/test_basic.py603def test_session_refresh_vary(app, client):CODE
LOWtests/test_basic.py735def test_request_preprocessing_early_return(app, client):CODE
LOWtests/test_basic.py762def test_after_request_processing(app, client):CODE
LOWtests/test_basic.py777def test_teardown_request_handler(app, client):CODE
LOWtests/test_basic.py795def test_teardown_request_handler_debug_mode(app, client):CODE
LOWtests/test_basic.py813def test_teardown_request_handler_error(app, client):CODE
LOWtests/test_basic.py851def test_before_after_request_order(app, client):CODE
LOWtests/test_basic.py927def test_error_handling_processing(app, client):CODE
LOWtests/test_basic.py948def test_baseexception_error_handling(app, client):CODE
LOWtests/test_basic.py959def test_before_request_and_routing_errors(app, client):CODE
LOWtests/test_basic.py989def test_http_error_subclass_handling(app, client):CODE
LOWtests/test_basic.py994 def handle_forbidden_subclass(e):CODE
LOWtests/test_basic.py1021def test_errorhandler_precedence(app, client):CODE
LOWtests/test_basic.py1058def test_trap_bad_request_key_error(app, client, debug, trap, expect_key, expect_abort):CODE
LOWtests/test_basic.py1089def test_trapping_of_all_http_exceptions(app, client):CODE
LOWtests/test_basic.py1100def test_error_handler_after_processor_error(app, client):CODE
LOWtests/test_basic.py1129def test_enctype_debug_helper(app, client):CODE
LOWtests/test_basic.py1238def test_response_type_errors():CODE
LOWtests/test_basic.py1309def test_make_response_with_response_instance(app, req_ctx):CODE
LOWtests/test_basic.py1331def test_jsonify_no_prettyprint(app, compact):CODE
LOWtests/test_basic.py1355def test_jsonify_args_and_kwargs_check(app, req_ctx):CODE
LOWtests/test_basic.py1446def test_static_url_path_with_ending_slash():CODE
LOWtests/test_basic.py1491def test_static_route_with_host_matching():CODE
LOWtests/test_basic.py1529def test_server_name_matching(CODE
LOWtests/test_basic.py1565def test_server_name_subdomain():CODE
LOWtests/test_basic.py1611def test_exception_propagation(app, client, key):CODE
LOWtests/test_basic.py1631def test_werkzeug_passthrough_errors(CODE
LOWtests/test_basic.py1674def test_inject_blueprint_url_defaults(app):CODE
LOWtests/test_basic.py1707def test_no_setup_after_first_request(app, client):CODE
LOWtests/test_basic.py1722def test_routing_redirect_debugging(monkeypatch, app, client):CODE
LOWtests/test_basic.py1742def test_route_decorator_custom_endpoint(app, client):CODE
LOWtests/test_basic.py1775def test_g_iteration_protocol(app_ctx):CODE
LOWtests/test_basic.py1783def test_subdomain_basic_support():CODE
LOWtests/test_basic.py1816def test_subdomain_matching_with_ports():CODE
LOWtests/test_basic.py1830def test_subdomain_matching_other_name(matching):CODE
LOWtests/test_basic.py1865def test_multi_route_class_views(app, client):CODE
LOWtests/test_basic.py1962def 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.py523CODE
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.py1599 ctx.push()CODE
HIGHsrc/flask/ctx.py507 self.push()CODE
Over-Commented Block18 hits · 18 pts
SeverityFileLineSnippetContext
LOWexamples/celery/requirements.txt1#COMMENT
LOWexamples/celery/requirements.txt21 # click-pluginsCOMMENT
LOWexamples/celery/requirements.txt41 # werkzeugCOMMENT
LOWsrc/flask/app.py241 #: The class that is used for request objects. See :class:`~flask.Request`COMMENT
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.py826 except Exception:CODE
LOWtests/test_basic.py838 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.py1020 except Exception as e:CODE
LOWsrc/flask/app.py1048 except Exception:CODE
LOWsrc/flask/app.py1601 except Exception as e:CODE
Deep Nesting7 hits · 7 pts
SeverityFileLineSnippetContext
LOWsrc/flask/cli.py41CODE
LOWsrc/flask/cli.py333CODE
LOWsrc/flask/app.py1227CODE
LOWsrc/flask/app.py1369CODE
LOWsrc/flask/app.py1423CODE
LOWsrc/flask/sansio/blueprints.py273CODE
LOWsrc/flask/sansio/app.py868CODE
AI Structural Patterns4 hits · 4 pts
SeverityFileLineSnippetContext
LOWsrc/flask/blueprints.py19CODE
LOWsrc/flask/app.py311CODE
LOWsrc/flask/sansio/blueprints.py174CODE
LOWsrc/flask/sansio/app.py279CODE
Self-Referential Comments2 hits · 2 pts
SeverityFileLineSnippetContext
MEDIUMsrc/flask/app.py871 """This method is called whenever an exception occurs thatSTRING
MEDIUMsrc/flask/app.py1057 """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.py1398 """Can be overridden in order to modify the response objectSTRING