AI Slop Code RIsk Monitor

pallets/flask

The Python micro framework for building web applications.

19.4 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for pallets/flask, a Python project with 74,995 GitHub stars. SynthScan examined 19,960 lines of code across 139 source files, recording 342 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 19.4 (Elevated 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.

19.4
Adjusted Signal
19.4
Raw Pattern Score
100%
Time Factor
2026-10-07
Last Push
75.0K
Stars
Python
Language
20.0K
Lines of Code
139
Files
342
Pattern Hits
2026-10-12
Scan Date
0.10
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 44.1/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 21.6/100 · LOW

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

Agent Over-Engineering Ratio 48.1/100 · MEDIUM

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

PR Review Velocity Impact 65.1/100 · HIGH

Which changes need focused human review? 342 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 0HIGH 14MEDIUM 4LOW 324

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 342 distinct pattern matches across 10 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 Identifiers210 hits · 200 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_basic.py1399def test_build_error_handler_reraise(app):CODE
LOW⚡tests/test_basic.py1401 def handler_raises_build_error(error, endpoint, values):CODE
LOW⚡tests/test_basic.py1410def test_url_for_passes_special_values_to_build_error_handler(app):CODE
LOW⚡tests/test_basic.py1457def test_static_url_empty_path(app):CODE
LOW⚡tests/test_basic.py1464def test_static_url_empty_path_default(app):CODE
LOW⚡tests/test_basic.py1471def test_static_folder_with_pathlib_path(app):CODE
LOW⚡tests/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…
Empty Error Handlers9 hits · 45 pts
SeverityFileLineSnippetContext
HIGHtests/test_basic.py826except Exception:CODE
HIGHtests/test_basic.py838except Exception:CODE
HIGHtests/test_reqctx.py38except Exception:CODE
HIGHtests/test_reqctx.py57except Exception:CODE
HIGHtests/test_appctx.py66except Exception:CODE
HIGHtests/test_appctx.py85except Exception:CODE
HIGHsrc/flask/config.py163except Exception:CODE
HIGHsrc/flask/cli.py1097except ValueError:CODE
HIGHsrc/flask/cli.py1035except ImportError:CODE
Cross-Language Confusion5 hits · 32 pts
SeverityFileLineSnippetContext
HIGH⚡tests/test_reqctx.py23 ctx.push()CODE
HIGH⚡tests/test_reqctx.py126 ctx.push()CODE
HIGH⚡tests/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 #:COMMENT
LOWsrc/flask/sansio/app.py181 #: .. versionadded:: 0.10COMMENT
LOWsrc/flask/sansio/app.py201 #: If this is enabled and PROPAGATE_EXCEPTIONS is not changed from theCOMMENT
LOWsrc/flask/sansio/app.py241 #: :meth:`create_jinja_environment`. Changing these options afterCOMMENT
LOWsrc/flask/sansio/app.py341 """COMMENT
LOWsrc/flask/sansio/app.py361 self.teardown_appcontext_funcs: list[ft.TeardownCallable] = []COMMENT
LOWsrc/flask/sansio/app.py381 #: The key must match the name of the extension module. For example inCOMMENT
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
LOW⚡tests/test_reqctx.py38 except Exception:CODE
LOWtests/test_reqctx.py57 except Exception:CODE
LOW⚡tests/test_appctx.py66 except Exception:CODE
LOW⚡tests/test_appctx.py85 except Exception:CODE
LOWsrc/flask/config.py163 except Exception:CODE
LOWsrc/flask/cli.py650 except Exception:CODE
LOWsrc/flask/cli.py955 except Exception as e:CODE
LOWsrc/flask/app.py1017 except Exception as e:CODE
LOW⚡src/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.py869CODE
AI Structural Patterns4 hits · 4 pts
SeverityFileLineSnippetContext
LOWsrc/flask/blueprints.py19CODE
LOWsrc/flask/app.py308CODE
LOWsrc/flask/sansio/blueprints.py174CODE
LOWsrc/flask/sansio/app.py280CODE
Self-Referential Comments2 hits · 2 pts
SeverityFileLineSnippetContext
MEDIUMsrc/flask/app.py868 """This method is called whenever an exception occurs thatSTRING
MEDIUM⚡src/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