AI Slop Code RIsk Monitor

PostgREST/postgrest

REST API for any Postgres database

14.7 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for PostgREST/postgrest, a Haskell project with 27,701 GitHub stars. SynthScan examined 10,961 lines of code across 88 source files, recording 135 pattern matches distributed across 9 syntactic categories. The legacy adjusted pattern signal is 14.7 (Moderate 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.

14.7
Adjusted Signal
14.7
Raw Pattern Score
100%
Time Factor
2026-10-09
Last Push
27.7K
Stars
Haskell
Language
11.0K
Lines of Code
88
Files
135
Pattern Hits
2026-10-12
Scan Date
0.06
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 44.2/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 8.5/100 · LOW

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

Agent Over-Engineering Ratio 43.7/100 · MEDIUM

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

PR Review Velocity Impact 52.7/100 · HIGH

Which changes need focused human review? 135 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 5MEDIUM 2LOW 128

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 135 distinct pattern matches across 9 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 Identifiers109 hits · 111 pts
SeverityFileLineSnippetContext
LOWtest/io/test_admin.py27def test_admin_ready_w_channel(defaultenv):CODE
LOWtest/io/test_admin.py40def test_admin_ready_wo_channel(defaultenv):CODE
LOWtest/io/test_admin.py53def test_admin_ready_includes_schema_cache_state(defaultenv, metapostgrest):CODE
LOWtest/io/test_admin.py92def test_admin_ready_dependent_on_main_app(defaultenv):CODE
LOWtest/io/test_admin.py111def test_admin_does_not_wait_for_a_pool_connection(path, defaultenv):CODE
LOWtest/io/test_admin.py134def test_admin_live_dependent_on_main_app(defaultenv):CODE
LOWtest/io/test_admin.py145def test_admin_works_with_host_special_values(specialhostvalue, defaultenv):CODE
LOWtest/io/test_admin.py171def test_admin_metrics_include_ghc_runtime_metrics(defaultenv):CODE
LOWtest/io/test_admin.py185def test_admin_metrics_exclude_ghc_runtime_metrics_by_default(defaultenv):CODE
LOWtest/io/test_admin.py195def test_admin_metrics_include_schema_cache_fails(defaultenv, metapostgrest):CODE
LOWtest/io/config.py36def get_admin_host_and_port_from_config(config):CODE
LOWtest/io/test_pg_internal.py5def test_listener_query_is_visible_in_pg_stat_activity(defaultenv):CODE
LOWtest/io/util.py64def parse_server_timings_header(header):CODE
LOWtest/io/test_connection.py23def test_fail_with_invalid_password(defaultenv):CODE
LOWtest/io/test_connection.py45def test_get_pgrst_version_with_uri_connection_string(dburi_type, dburi, defaultenv):CODE
LOWtest/io/test_connection.py67def test_get_pgrst_version_with_keyval_connection_string(defaultenv):CODE
LOWtest/io/test_connection.py85def test_fail_with_invalid_dbname_and_automatic_recovery_disabled(defaultenv):CODE
LOWtest/io/test_connection.py100def test_fail_with_automatic_recovery_disabled_and_terminated_using_query(defaultenv):CODE
LOWtest/io/test_connection.py120def test_read_dburi_from_stdin_without_eol(dburi, defaultenv):CODE
LOWtest/io/test_connection.py133def test_read_dburi_from_stdin_with_eol(dburi, defaultenv):CODE
LOWtest/io/test_connection.py146def test_flush_pool_no_interrupt(defaultenv):CODE
LOWtest/io/test_connection.py168def test_no_pool_connection_required_on_bad_http_logic(defaultenv):CODE
LOWtest/io/test_connection.py183def test_no_pool_connection_required_on_options(defaultenv):CODE
LOWtest/io/test_connection.py200def test_no_pool_connection_required_on_bad_jwt_claim(defaultenv):CODE
LOWtest/io/test_connection.py213def test_no_pool_connection_required_on_bad_embedding(defaultenv):CODE
LOWtest/io/test_connection.py223def test_pool_acquisition_timeout(level, defaultenv, metapostgrest):CODE
LOWtest/io/test_connection.py254def test_pool_acquisition_timeout_logs_are_debounced(defaultenv):CODE
LOWtest/io/test_connection.py302def test_positive_pool_metric(defaultenv):CODE
LOWtest/io/test_zero_downtime.py11def test_so_reuseport_zero_downtime_handover(defaultenv):CODE
LOWtest/io/test_big_schema.py11def test_schema_cache_load_max_duration(defaultenv):CODE
LOWtest/io/test_big_schema.py46def test_openapi_in_big_schema(defaultenv):CODE
LOWtest/io/test_big_schema.py61def test_stackoverflow_is_logged(level, defaultenv):CODE
LOWtest/io/test_big_schema.py88def test_should_not_fail_with_stack_overflow(defaultenv):CODE
LOWtest/io/test_big_schema.py105def test_second_request_for_non_existent_table_should_be_quick(defaultenv):CODE
LOWtest/io/test_log.py203def test_schema_cache_log_query(level, log_query, defaultenv):CODE
LOWtest/io/test_log.py232def test_log_lacks_role_with_empty_anon_role(defaultenv):CODE
LOWtest/io/test_log.py254def test_log_postgrest_version(defaultenv):CODE
LOWtest/io/test_log.py278def test_log_postgrest_host_and_port(host, defaultenv):CODE
LOWtest/io/test_log.py306def test_log_postgrest_admin_server_host_and_port(host, defaultenv):CODE
LOWtest/io/test_log.py337def test_log_error_when_schema_cache_load_error_on_startup_to_stderr(defaultenv):CODE
LOWtest/io/test_log.py366def test_log_pool_req_observation(level, defaultenv):CODE
LOWtest/io/test_log.py392def test_log_listener_connection_errors(defaultenv):CODE
LOWtest/io/test_log.py410def test_log_listener_connection_start(defaultenv):CODE
LOWtest/io/test_log.py430def test_db_error_logging_to_stderr(level, defaultenv, metapostgrest):CODE
LOWtest/io/test_log.py467def test_schema_cache_query_sleep_logs(defaultenv):CODE
LOWtest/io/test_log.py493def test_schema_cache_query_timings_log(level, defaultenv):CODE
LOWtest/io/test_log.py516def test_empty_schema_cache_log_contains_jwt_role(defaultenv):CODE
LOWtest/io/test_log.py543def test_expired_jwt_log_lacks_role(defaultenv):CODE
LOWtest/io/test_log.py562def test_schema_cache_error_observation(defaultenv):CODE
LOWtest/io/test_log.py583def test_invalid_rpc_method_log_contains_role(defaultenv):CODE
LOWtest/io/test_log.py618def test_termination_unix_signal_logging(defaultenv):CODE
LOWtest/io/test_log.py636def test_options_request_logs_but_cors_preflight_does_not(defaultenv):CODE
LOWtest/io/test_graceful_shutdown.py7def test_graceful_shutdown_waits_for_in_flight_request(defaultenv):CODE
LOWtest/io/test_reloading.py21def test_db_schema_notify_reload(defaultenv):CODE
LOWtest/io/test_reloading.py73def test_invalid_role_claim_key_notify_reload(defaultenv):CODE
LOWtest/io/test_reloading.py126def test_max_rows_notify_reload(defaultenv):CODE
LOWtest/io/test_reloading.py157def test_no_double_schema_cache_reload_on_empty_schema(defaultenv):CODE
LOWtest/io/test_reloading.py183def test_notify_reloading_catalog_cache(defaultenv):CODE
LOWtest/io/test_reloading.py223def test_schema_cache_concurrent_notifications(slow_schema_cache_env):CODE
LOWtest/io/test_reloading.py281def test_jwt_secret_external_file_reload(tmp_path, defaultenv):CODE
49 more matches not shown…
Cross-Language Confusion3 hits · 18 pts
SeverityFileLineSnippetContext
HIGHtest/io/test_log.py360 log_err_message = '{"code":"PGRST002","details":null,"hint":null,"message":"Could not query the database for theCODE
HIGHtest/io/test_log.py613 log_message = '{"code":"PGRST001","details":"no connection to the server\\n","hint":null,"message":"Database cliCODE
HIGH⚡test/io/test_settings.py299 == '{"code":"57014","details":null,"hint":null,"message":"canceling statement due to statement timeout"}'CODE
Over-Commented Block11 hits · 11 pts
SeverityFileLineSnippetContext
LOWtest/io/test_zero_downtime.py21 failures = []COMMENT
LOWdocs/conf.py1# -*- coding: utf-8 -*-COMMENT
LOWdocs/conf.py61# The language for content autogenerated by Sphinx. Refer to documentationCOMMENT
LOWdocs/conf.py81# default_role = NoneCOMMENT
LOWdocs/conf.py121# The name for this set of Sphinx documents.COMMENT
LOWdocs/conf.py141COMMENT
LOWdocs/conf.py161# html_additional_pages = {}COMMENT
LOWdocs/conf.py181# If true, an OpenSearch description file will be output, and all pages willCOMMENT
LOWdocs/conf.py201# implements a search results scorer. If empty, the default will be used.COMMENT
LOWdocs/conf.py221# (source start file, target name, title,COMMENT
LOWdocs/conf.py241# Documents to append as an appendix to all manuals.COMMENT
Empty Error Handlers2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHtest/io/postgrest.py283except requests.exceptions.ReadTimeout:CODE
HIGHtest/io/postgrest.py264except (requests.ConnectionError, requests.ReadTimeout):CODE
Excessive Try-Catch Wrapping3 hits · 4 pts
SeverityFileLineSnippetContext
LOWtest/io/util.py18 except Exception as e:CODE
MEDIUMtest/io/util.py15def run(self):CODE
LOWtest/io/test_zero_downtime.py49 except Exception as exc:CODE
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMdocs/conf.py6# This file is execfile()d with the current directory set to itsCOMMENT
Deep Nesting3 hits · 2 pts
SeverityFileLineSnippetContext
LOWtest/io/test_log.py28CODE
LOWtest/io/test_log.py91CODE
LOWtest/io/postgrest.py92CODE
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtest/load/put.json3 "name": "John Doe",CODE
LOWtest/load/fixtures.sql16INSERT INTO test.actors VALUES (1, 'John Doe');CODE
AI Structural Patterns1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtest/io/postgrest.py92CODE