Repository Analysis

PostgREST/postgrest

REST API for any Postgres database

11.8 Low AI signal View on GitHub
11.8
Adjusted Score
11.8
Raw Score
100%
Time Factor
2026-05-28
Last Push
27,188
Stars
Haskell
Language
12,183
Lines of Code
81
Files
148
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 4MEDIUM 6LOW 138

Pattern Findings

148 matches across 8 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers108 hits · 78 pts
SeverityFileLineSnippet
LOWtest/io/config.py37def get_admin_host_and_port_from_config(config):
LOWtest/io/test_auth.py24def test_read_secret_from_file(secretpath, defaultenv):
LOWtest/io/test_auth.py41def test_read_secret_from_stdin(defaultenv):
LOWtest/io/test_auth.py57def test_read_secret_from_stdin_dbconfig(defaultenv):
LOWtest/io/test_auth.py163def test_fail_with_invalid_password(defaultenv):
LOWtest/io/test_auth.py194def test_jwt_aud_in_role_claim_key(jwtaudroleclaim, defaultenv):
LOWtest/io/test_auth.py257def test_jwt_secret_external_file_reload(tmp_path, defaultenv):
LOWtest/io/test_auth.py308def test_jwt_cache_server_timing(defaultenv):
LOWtest/io/test_auth.py344def test_jwt_cache_without_server_timing(defaultenv):
LOWtest/io/test_auth.py365def test_jwt_cache_without_exp_claim(defaultenv):
LOWtest/io/test_auth.py392def test_invalidate_jwt_cache_when_secret_changes(tmp_path, defaultenv):
LOWtest/io/util.py63def parse_server_timings_header(header):
LOWtest/io/test_io.py1739def test_function_setting_statement_timeout_fails(defaultenv):
LOWtest/io/test_io.py1752def test_function_setting_statement_timeout_passes(defaultenv):
LOWtest/io/test_io.py1762def test_function_setting_work_mem(defaultenv):
LOWtest/io/test_io.py60def test_read_dburi_from_stdin_without_eol(dburi, defaultenv):
LOWtest/io/test_io.py73def test_read_dburi_from_stdin_with_eol(dburi, defaultenv):
LOWtest/io/test_io.py86def test_app_settings_flush_pool(defaultenv):
LOWtest/io/test_io.py110def test_flush_pool_no_interrupt(defaultenv):
LOWtest/io/test_io.py132def test_graceful_shutdown_waits_for_in_flight_request(defaultenv):
LOWtest/io/test_io.py153def test_termination_unix_signal_logging(defaultenv):
LOWtest/io/test_io.py179def test_so_reuseport_zero_downtime_handover(defaultenv):
LOWtest/io/test_io.py294def test_db_schema_notify_reload(defaultenv):
LOWtest/io/test_io.py349def test_max_rows_notify_reload(defaultenv):
LOWtest/io/test_io.py380def test_invalid_role_claim_key_notify_reload(defaultenv):
LOWtest/io/test_io.py422def test_db_prepared_statements_enable(defaultenv):
LOWtest/io/test_io.py430def test_db_prepared_statements_disable(defaultenv):
LOWtest/io/test_io.py468def test_change_statement_timeout(defaultenv, metapostgrest):
LOWtest/io/test_io.py541def test_pool_acquisition_timeout(level, defaultenv, metapostgrest):
LOWtest/io/test_io.py572def test_pool_acquisition_timeout_logs_are_debounced(defaultenv):
LOWtest/io/test_io.py620def test_change_statement_timeout_held_connection(defaultenv, metapostgrest):
LOWtest/io/test_io.py681def test_admin_ready_w_channel(defaultenv):
LOWtest/io/test_io.py694def test_listener_query_is_visible_in_pg_stat_activity(defaultenv):
LOWtest/io/test_io.py1452def test_schema_cache_query_timings_log(level, timezone_enabled, defaultenv):
LOWtest/io/test_io.py1483def test_get_pgrst_version_with_uri_connection_string(dburi_type, dburi, defaultenv):
LOWtest/io/test_io.py1505def test_get_pgrst_version_with_keyval_connection_string(defaultenv):
LOWtest/io/test_io.py1523def test_log_postgrest_version(defaultenv):
LOWtest/io/test_io.py1536def test_log_postgrest_host_and_port(host, defaultenv):
LOWtest/io/test_io.py1556def test_succeed_w_role_having_superuser_settings(defaultenv):
LOWtest/io/test_io.py1568def test_get_granted_superuser_setting(defaultenv):
LOWtest/io/test_io.py1586def test_fail_with_invalid_dbname_and_automatic_recovery_disabled(defaultenv):
LOWtest/io/test_io.py1601def test_fail_with_automatic_recovery_disabled_and_terminated_using_query(defaultenv):
LOWtest/io/test_io.py1621def test_preflight_request_with_cors_allowed_origin_config(defaultenv):
LOWtest/io/test_io.py1644def test_preflight_request_with_empty_cors_allowed_origin_config(defaultenv):
LOWtest/io/test_io.py1702def test_db_error_logging_to_stderr(level, defaultenv, metapostgrest):
LOWtest/io/test_io.py1776def test_multiple_func_settings(defaultenv):
LOWtest/io/test_io.py1794def test_first_hoisted_setting_is_applied(defaultenv):
LOWtest/io/test_io.py1810def test_second_hoisted_setting_is_applied(defaultenv):
LOWtest/io/test_io.py1841def test_admin_metrics_include_ghc_runtime_metrics(defaultenv):
LOWtest/io/test_io.py1855def test_admin_metrics_exclude_ghc_runtime_metrics_by_default(defaultenv):
LOWtest/io/test_io.py1865def test_schema_cache_startup_load_with_in_db_config(defaultenv, metapostgrest):
LOWtest/io/test_io.py1901def test_log_error_when_empty_schema_cache_on_startup_to_stderr(defaultenv):
LOWtest/io/test_io.py1922def test_no_double_schema_cache_reload_on_empty_schema(defaultenv):
LOWtest/io/test_io.py1945def test_log_pool_req_observation(level, defaultenv):
LOWtest/io/test_io.py1991def test_allow_configs_to_be_set_to_empty(defaultenv):
LOWtest/io/test_io.py2004def test_schema_cache_error_observation(defaultenv):
LOWtest/io/test_io.py2024def test_log_listener_connection_errors(defaultenv):
LOWtest/io/test_io.py2042def test_log_listener_connection_start(defaultenv):
LOWtest/io/test_io.py2061def test_db_pre_config_with_pg_reserved_words(defaultenv):
LOWtest/io/test_io.py2087def test_server_timing_transaction_duration(defaultenv, metapostgrest):
48 more matches not shown…
Cross-Language Confusion4 hits · 22 pts
SeverityFileLineSnippet
HIGHtest/io/test_io.py1748 == '{"code":"57014","details":null,"hint":null,"message":"canceling statement due to statement timeout"}'
HIGHtest/io/test_io.py1896 log_message = '{"code":"PGRST001","details":"no connection to the server\\n","hint":null,"message":"Database cli
HIGHtest/io/test_io.py1917 log_err_message = '{"code":"PGRST002","details":null,"hint":null,"message":"Could not query the database for the
HIGHtest/io/test_io.py2081 'Failed to query database settings for the config parameters.{"code":"42883","details":null,"hint":"No funct
Over-Commented Block22 hits · 22 pts
SeverityFileLineSnippet
LOW.stylish-haskell.yaml1# stylish-haskell configuration file
LOW.stylish-haskell.yaml21 - simple_align:
LOW.stylish-haskell.yaml41 # Default: global.
LOW.stylish-haskell.yaml61 # > import qualified Data.List as List
LOW.stylish-haskell.yaml81 # > init, last, length)
LOW.stylish-haskell.yaml101 # > , singleton
LOW.stylish-haskell.yaml121
LOW.stylish-haskell.yaml141 # functions.
LOW.stylish-haskell.yaml161 # Default: false
LOW.stylish-haskell.yaml181 #
LOW.stylish-haskell.yaml201# A common setting is the number of columns (parts of) code will be wrapped
LOWtest/io/test_io.py181
LOWdocs/conf.py1# -*- coding: utf-8 -*-
LOWdocs/conf.py61# The language for content autogenerated by Sphinx. Refer to documentation
LOWdocs/conf.py81# default_role = None
LOWdocs/conf.py121# The name for this set of Sphinx documents.
LOWdocs/conf.py141
LOWdocs/conf.py161# html_additional_pages = {}
LOWdocs/conf.py181# If true, an OpenSearch description file will be output, and all pages will
LOWdocs/conf.py201# implements a search results scorer. If empty, the default will be used.
LOWdocs/conf.py221# (source start file, target name, title,
LOWdocs/conf.py241# Documents to append as an appendix to all manuals.
Excessive Try-Catch Wrapping7 hits · 11 pts
SeverityFileLineSnippet
LOWnix/tools/generate_targets.py163 except Exception as exc: # broad exception to capture parsing errors
MEDIUMnix/tools/generate_targets.py199 print(f"Error writing to {args.targets_path}: {e}", file=sys.stderr)
MEDIUMnix/tools/gen_rsa_materials.py40 print(f"Error writing to {args.jwk_path}:{e}", file=sys.stderr)
MEDIUMnix/tools/gen_rsa_materials.py47 print(f"Error writing to {args.private_key_path}:{e}", file=sys.stderr)
LOWtest/io/util.py17 except Exception as e:
MEDIUMtest/io/util.py14def run(self):
LOWtest/io/test_io.py217 except Exception as exc:
Decorative Section Separators1 hit · 3 pts
SeverityFileLineSnippet
MEDIUM.stylish-haskell.yaml2# ==================================
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMdocs/conf.py6# This file is execfile()d with the current directory set to its
Deep Nesting3 hits · 2 pts
SeverityFileLineSnippet
LOWtest/io/test_io.py858
LOWtest/io/test_io.py921
LOWtest/io/postgrest.py92
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippet
LOWtest/load/put.json3 "name": "John Doe",
LOWtest/load/fixtures.sql14INSERT INTO test.actors VALUES (1, 'John Doe');