The Python micro framework for building web applications.
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).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/test_basic.py | 1396 | def test_build_error_handler_reraise(app): | CODE |
| LOW⚡ | tests/test_basic.py | 1398 | def handler_raises_build_error(error, endpoint, values): | CODE |
| LOW⚡ | tests/test_basic.py | 1407 | def test_url_for_passes_special_values_to_build_error_handler(app): | CODE |
| LOW⚡ | tests/test_basic.py | 1454 | def test_static_url_empty_path(app): | CODE |
| LOW⚡ | tests/test_basic.py | 1461 | def test_static_url_empty_path_default(app): | CODE |
| LOW⚡ | tests/test_basic.py | 1468 | def test_static_folder_with_pathlib_path(app): | CODE |
| LOW⚡ | tests/test_basic.py | 1477 | def test_static_folder_with_ending_slash(): | CODE |
| LOW | tests/test_basic.py | 42 | def test_options_on_multiple_rules(app, client): | CODE |
| LOW | tests/test_basic.py | 67 | def test_method_route_no_methods(app): | CODE |
| LOW | tests/test_basic.py | 72 | def test_provide_automatic_options_attr_disable( | CODE |
| LOW | tests/test_basic.py | 86 | def test_provide_automatic_options_attr_enable( | CODE |
| LOW | tests/test_basic.py | 103 | def test_provide_automatic_options_arg_disable( | CODE |
| LOW | tests/test_basic.py | 116 | def test_provide_automatic_options_method_disable( | CODE |
| LOW | tests/test_basic.py | 152 | def test_disallow_string_for_allowed_methods(app): | CODE |
| LOW | tests/test_basic.py | 288 | def test_session_using_application_root(app, client): | CODE |
| LOW | tests/test_basic.py | 310 | def test_session_using_session_settings(app, client): | CODE |
| LOW | tests/test_basic.py | 353 | def test_session_using_samesite_attribute(app, client): | CODE |
| LOW | tests/test_basic.py | 393 | def test_session_secret_key_fallbacks(app, client) -> None: | CODE |
| LOW | tests/test_basic.py | 467 | def test_session_special_types(app, client): | CODE |
| LOW | tests/test_basic.py | 498 | def test_session_cookie_setting(app): | CODE |
| LOW | tests/test_basic.py | 600 | def test_session_refresh_vary(app, client): | CODE |
| LOW | tests/test_basic.py | 732 | def test_request_preprocessing_early_return(app, client): | CODE |
| LOW | tests/test_basic.py | 759 | def test_after_request_processing(app, client): | CODE |
| LOW | tests/test_basic.py | 774 | def test_teardown_request_handler(app, client): | CODE |
| LOW | tests/test_basic.py | 792 | def test_teardown_request_handler_debug_mode(app, client): | CODE |
| LOW | tests/test_basic.py | 810 | def test_teardown_request_handler_error(app, client): | CODE |
| LOW | tests/test_basic.py | 848 | def test_before_after_request_order(app, client): | CODE |
| LOW | tests/test_basic.py | 924 | def test_error_handling_processing(app, client): | CODE |
| LOW | tests/test_basic.py | 945 | def test_baseexception_error_handling(app, client): | CODE |
| LOW | tests/test_basic.py | 956 | def test_before_request_and_routing_errors(app, client): | CODE |
| LOW | tests/test_basic.py | 986 | def test_http_error_subclass_handling(app, client): | CODE |
| LOW | tests/test_basic.py | 991 | def handle_forbidden_subclass(e): | CODE |
| LOW | tests/test_basic.py | 1018 | def test_errorhandler_precedence(app, client): | CODE |
| LOW | tests/test_basic.py | 1055 | def test_trap_bad_request_key_error(app, client, debug, trap, expect_key, expect_abort): | CODE |
| LOW | tests/test_basic.py | 1086 | def test_trapping_of_all_http_exceptions(app, client): | CODE |
| LOW | tests/test_basic.py | 1097 | def test_error_handler_after_processor_error(app, client): | CODE |
| LOW | tests/test_basic.py | 1126 | def test_enctype_debug_helper(app, client): | CODE |
| LOW | tests/test_basic.py | 1235 | def test_response_type_errors(): | CODE |
| LOW | tests/test_basic.py | 1306 | def test_make_response_with_response_instance(app, req_ctx): | CODE |
| LOW | tests/test_basic.py | 1328 | def test_jsonify_no_prettyprint(app, compact): | CODE |
| LOW | tests/test_basic.py | 1352 | def test_jsonify_args_and_kwargs_check(app, req_ctx): | CODE |
| LOW | tests/test_basic.py | 1443 | def test_static_url_path_with_ending_slash(): | CODE |
| LOW | tests/test_basic.py | 1488 | def test_static_route_with_host_matching(): | CODE |
| LOW | tests/test_basic.py | 1526 | def test_server_name_matching( | CODE |
| LOW | tests/test_basic.py | 1562 | def test_server_name_subdomain(): | CODE |
| LOW | tests/test_basic.py | 1608 | def test_exception_propagation(app, client, key): | CODE |
| LOW | tests/test_basic.py | 1628 | def test_werkzeug_passthrough_errors( | CODE |
| LOW | tests/test_basic.py | 1671 | def test_inject_blueprint_url_defaults(app): | CODE |
| LOW | tests/test_basic.py | 1704 | def test_no_setup_after_first_request(app, client): | CODE |
| LOW | tests/test_basic.py | 1719 | def test_routing_redirect_debugging(monkeypatch, app, client): | CODE |
| LOW | tests/test_basic.py | 1739 | def test_route_decorator_custom_endpoint(app, client): | CODE |
| LOW | tests/test_basic.py | 1772 | def test_g_iteration_protocol(app_ctx): | CODE |
| LOW | tests/test_basic.py | 1780 | def test_subdomain_basic_support(): | CODE |
| LOW | tests/test_basic.py | 1813 | def test_subdomain_matching_with_ports(): | CODE |
| LOW | tests/test_basic.py | 1827 | def test_subdomain_matching_other_name(matching): | CODE |
| LOW | tests/test_basic.py | 1862 | def test_multi_route_class_views(app, client): | CODE |
| LOW | tests/test_basic.py | 1958 | def test_app_freed_on_zero_refcount(): | CODE |
| LOW | tests/test_signals.py | 25 | def test_before_render_template(): | CODE |
| LOW | tests/test_signals.py | 95 | def test_request_exception_signal(): | CODE |
| LOW | tests/test_signals.py | 163 | def test_appcontext_tearing_down_signal(app, client): | CODE |
| 150 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_request.py | 1 | CODE | |
| LOW | tests/test_reqctx.py | 1 | CODE | |
| LOW | tests/test_cli.py | 524 | CODE | |
| LOW | tests/test_apps/helloworld/wsgi.py | 1 | CODE | |
| LOW | tests/type_check/typing_route.py | 1 | CODE | |
| LOW | tests/type_check/typing_app_decorators.py | 1 | CODE | |
| LOW | tests/type_check/typing_error_handler.py | 1 | CODE | |
| LOW | examples/javascript/js_example/__init__.py | 5 | CODE | |
| LOW | src/flask/logging.py | 1 | CODE | |
| LOW | src/flask/signals.py | 1 | CODE | |
| LOW | src/flask/sessions.py | 1 | CODE | |
| LOW | src/flask/config.py | 1 | CODE | |
| LOW | src/flask/templating.py | 1 | CODE | |
| LOW | src/flask/globals.py | 1 | CODE | |
| LOW | src/flask/__init__.py | 1 | CODE | |
| LOW | src/flask/__init__.py | 2 | CODE | |
| LOW | src/flask/__init__.py | 3 | CODE | |
| LOW | src/flask/__init__.py | 4 | CODE | |
| LOW | src/flask/__init__.py | 5 | CODE | |
| LOW | src/flask/__init__.py | 6 | CODE | |
| LOW | src/flask/__init__.py | 7 | CODE | |
| LOW | src/flask/__init__.py | 8 | CODE | |
| LOW | src/flask/__init__.py | 9 | CODE | |
| LOW | src/flask/__init__.py | 10 | CODE | |
| LOW | src/flask/__init__.py | 11 | CODE | |
| LOW | src/flask/__init__.py | 12 | CODE | |
| LOW | src/flask/__init__.py | 13 | CODE | |
| LOW | src/flask/__init__.py | 14 | CODE | |
| LOW | src/flask/__init__.py | 15 | CODE | |
| LOW | src/flask/__init__.py | 16 | CODE | |
| LOW | src/flask/__init__.py | 17 | CODE | |
| LOW | src/flask/__init__.py | 18 | CODE | |
| LOW | src/flask/__init__.py | 19 | CODE | |
| LOW | src/flask/__init__.py | 20 | CODE | |
| LOW | src/flask/__init__.py | 21 | CODE | |
| LOW | src/flask/__init__.py | 22 | CODE | |
| LOW | src/flask/__init__.py | 23 | CODE | |
| LOW | src/flask/__init__.py | 24 | CODE | |
| LOW | src/flask/__init__.py | 25 | CODE | |
| LOW | src/flask/__init__.py | 26 | CODE | |
| LOW | src/flask/__init__.py | 27 | CODE | |
| LOW | src/flask/__init__.py | 28 | CODE | |
| LOW | src/flask/__init__.py | 29 | CODE | |
| LOW | src/flask/__init__.py | 30 | CODE | |
| LOW | src/flask/__init__.py | 31 | CODE | |
| LOW | src/flask/__init__.py | 32 | CODE | |
| LOW | src/flask/__init__.py | 33 | CODE | |
| LOW | src/flask/__init__.py | 34 | CODE | |
| LOW | src/flask/__init__.py | 35 | CODE | |
| LOW | src/flask/__init__.py | 36 | CODE | |
| LOW | src/flask/__init__.py | 37 | CODE | |
| LOW | src/flask/__init__.py | 38 | CODE | |
| LOW | src/flask/__init__.py | 39 | CODE | |
| LOW | src/flask/blueprints.py | 1 | CODE | |
| LOW | src/flask/blueprints.py | 11 | CODE | |
| LOW | src/flask/cli.py | 1 | CODE | |
| LOW | src/flask/cli.py | 810 | CODE | |
| LOW | src/flask/wrappers.py | 1 | CODE | |
| LOW | src/flask/app.py | 1 | CODE | |
| LOW | src/flask/debughelpers.py | 1 | CODE | |
| 14 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | tests/test_reqctx.py | 23 | ctx.push() | CODE |
| HIGH⚡ | tests/test_reqctx.py | 126 | ctx.push() | CODE |
| HIGH⚡ | tests/test_reqctx.py | 140 | ctx.push() | CODE |
| HIGH | src/flask/app.py | 1596 | ctx.push() | CODE |
| HIGH | src/flask/ctx.py | 507 | self.push() | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/celery/requirements.txt | 1 | # | COMMENT |
| LOW | examples/celery/requirements.txt | 21 | # click-plugins | COMMENT |
| LOW | examples/celery/requirements.txt | 41 | # werkzeug | COMMENT |
| LOW | src/flask/views.py | 61 | #: decorator. | COMMENT |
| LOW | src/flask/sansio/app.py | 161 | #: Defaults to :class:`werkzeug.exceptions.Aborter`. | COMMENT |
| LOW | src/flask/sansio/app.py | 181 | #: Renamed from ``request_globals_class`. | COMMENT |
| LOW | src/flask/sansio/app.py | 201 | #: default it's implicitly enabled. | COMMENT |
| LOW | src/flask/sansio/app.py | 241 | #: the environment is created (accessing :attr:`jinja_env`) will | COMMENT |
| LOW | src/flask/sansio/app.py | 341 | COMMENT | |
| LOW | src/flask/sansio/app.py | 361 | COMMENT | |
| LOW | src/flask/sansio/app.py | 381 | #: case of a "Flask-Foo" extension in `flask_foo`, the key would be | COMMENT |
| LOW | src/flask/sansio/scaffold.py | 101 | COMMENT | |
| LOW | src/flask/sansio/scaffold.py | 121 | #: This data structure is internal. It should not be modified | COMMENT |
| LOW | src/flask/sansio/scaffold.py | 141 | COMMENT | |
| LOW | src/flask/sansio/scaffold.py | 161 | #: | COMMENT |
| LOW | src/flask/sansio/scaffold.py | 181 | #: directly and its format may change at any time. | COMMENT |
| LOW | src/flask/sansio/scaffold.py | 201 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_basic.py | 823 | except Exception: | CODE |
| LOW | tests/test_basic.py | 835 | except Exception: | CODE |
| LOW⚡ | tests/test_reqctx.py | 38 | except Exception: | CODE |
| LOW | tests/test_reqctx.py | 57 | except Exception: | CODE |
| LOW⚡ | tests/test_appctx.py | 68 | except Exception: | CODE |
| LOW⚡ | tests/test_appctx.py | 87 | except Exception: | CODE |
| LOW | src/flask/config.py | 163 | except Exception: | CODE |
| LOW | src/flask/cli.py | 650 | except Exception: | CODE |
| LOW | src/flask/cli.py | 956 | except Exception as e: | CODE |
| LOW | src/flask/app.py | 1017 | except Exception as e: | CODE |
| LOW⚡ | src/flask/app.py | 1045 | except Exception: | CODE |
| LOW | src/flask/app.py | 1598 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/flask/cli.py | 41 | CODE | |
| LOW | src/flask/cli.py | 333 | CODE | |
| LOW | src/flask/app.py | 1224 | CODE | |
| LOW | src/flask/app.py | 1366 | CODE | |
| LOW | src/flask/app.py | 1420 | CODE | |
| LOW | src/flask/sansio/blueprints.py | 273 | CODE | |
| LOW | src/flask/sansio/app.py | 868 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/flask/blueprints.py | 19 | CODE | |
| LOW | src/flask/app.py | 310 | CODE | |
| LOW | src/flask/sansio/blueprints.py | 174 | CODE | |
| LOW | src/flask/sansio/app.py | 279 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/flask/app.py | 868 | """This method is called whenever an exception occurs that | STRING |
| MEDIUM⚡ | src/flask/app.py | 1054 | """This method is called to create the default ``OPTIONS`` response. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/flask/sessions.py | 101 | """The basic interface you have to implement in order to replace the | STRING |
| MEDIUM | src/flask/app.py | 1395 | """Can be overridden in order to modify the response object | STRING |