Postgres MCP Pro provides configurable read/write access and performance analysis for you and your AI agents.
This report summarizes scanner evidence for crystaldba/postgres-mcp, a Python project with 3,389 GitHub stars. SynthScan examined 14,935 lines of code across 56 source files, recording 401 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 33.0 (High 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.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 275 finding(s).
Are imports declared and package/API names verified? 22 finding(s).
Are wrappers, guards, and repeated structures necessary? 267 finding(s).
Which changes need focused human review? 401 finding(s).
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.
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.
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.
The scanner identified 401 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/conftest.py | 21 | def test_postgres_connection_string(request) -> Generator[tuple[str, str], None, None]: | CODE |
| LOW | tests/utils.py | 15 | def create_postgres_container(version: str) -> Generator[Tuple[str, str], None, None]: | CODE |
| LOW | tests/unit/test_transport.py | 10 | async def test_transport_argument_parsing(transport): | CODE |
| LOW | tests/unit/test_transport.py | 48 | async def test_streamable_http_host_port_arguments(): | CODE |
| LOW | tests/unit/test_transport.py | 77 | async def test_sse_host_port_arguments(): | CODE |
| LOW | tests/unit/test_transport.py | 106 | async def test_default_transport_is_stdio(): | CODE |
| LOW | tests/unit/test_access_mode.py | 31 | async def test_get_sql_driver_returns_correct_driver(access_mode, expected_driver_type, mock_db_connection): | CODE |
| LOW | tests/unit/test_access_mode.py | 47 | async def test_get_sql_driver_sets_timeout_in_restricted_mode(mock_db_connection): | CODE |
| LOW | tests/unit/test_access_mode.py | 60 | async def test_get_sql_driver_in_unrestricted_mode_no_timeout(mock_db_connection): | CODE |
| LOW | tests/unit/test_access_mode.py | 72 | async def test_command_line_parsing(): | CODE |
| LOW | tests/unit/top_queries/test_top_queries_calc.py | 99 | def mock_extension_not_installed(): | CODE |
| LOW | tests/unit/top_queries/test_top_queries_calc.py | 185 | async def test_extension_not_installed(mock_pg13_driver, mock_extension_not_installed): | CODE |
| LOW | tests/unit/explain/test_server_integration.py | 35 | async def test_explain_query_integration(): | CODE |
| LOW | tests/unit/explain/test_server_integration.py | 57 | async def test_explain_query_with_analyze_integration(): | CODE |
| LOW | tests/unit/explain/test_server_integration.py | 79 | async def test_explain_query_with_hypothetical_indexes_integration(): | CODE |
| LOW | tests/unit/explain/test_server_integration.py | 110 | async def test_explain_query_missing_hypopg_integration(): | CODE |
| LOW | tests/unit/explain/test_server_integration.py | 141 | async def test_explain_query_error_handling_integration(): | CODE |
| LOW | tests/unit/explain/test_server.py | 27 | async def test_server_tools_registered(): | CODE |
| LOW | tests/unit/explain/test_server.py | 58 | async def test_explain_query_analyze(): | CODE |
| LOW | tests/unit/explain/test_server.py | 86 | async def test_explain_query_hypothetical_indexes(): | CODE |
| LOW | tests/unit/explain/test_server.py | 116 | async def test_explain_query_error_handling(): | CODE |
| LOW | tests/unit/explain/test_explain_plan.py | 27 | async def test_explain_plan_tool_initialization(mock_sql_driver): | CODE |
| LOW | tests/unit/explain/test_explain_plan.py | 48 | async def test_has_like_expressions(): | CODE |
| LOW | tests/unit/explain/test_explain_plan.py | 93 | async def test_explain_with_bind_variables(mock_sql_driver): | CODE |
| LOW | tests/unit/explain/test_explain_plan.py | 203 | async def test_explain_analyze_with_bind_variables(mock_sql_driver, monkeypatch): | CODE |
| LOW | tests/unit/explain/test_explain_plan.py | 258 | async def test_explain_analyze_success(mock_sql_driver): | CODE |
| LOW | tests/unit/explain/test_explain_plan.py | 307 | async def test_explain_with_invalid_response(mock_sql_driver): | CODE |
| LOW | tests/unit/explain/test_explain_plan.py | 323 | async def test_explain_with_empty_result(mock_sql_driver): | CODE |
| LOW | tests/unit/explain/test_explain_plan.py | 337 | async def test_explain_with_empty_plan_data(mock_sql_driver): | CODE |
| LOW | tests/unit/explain/test_explain_plan.py | 418 | async def test_explain_with_functional_hypothetical_indexes(mock_sql_driver): | CODE |
| LOW | tests/unit/explain/test_explain_plan_real_db.py | 109 | async def test_explain_with_real_db(local_sql_driver): | CODE |
| LOW | tests/unit/explain/test_explain_plan_real_db.py | 136 | async def test_explain_analyze_with_real_db(local_sql_driver): | CODE |
| LOW | tests/unit/explain/test_explain_plan_real_db.py | 162 | async def test_explain_join_query_with_real_db(local_sql_driver): | CODE |
| LOW | tests/unit/explain/test_explain_plan_real_db.py | 190 | async def test_explain_with_bind_variables_real_db(local_sql_driver): | STRING |
| LOW | tests/unit/explain/test_explain_plan_real_db.py | 209 | async def test_explain_with_like_expressions_real_db(local_sql_driver): | CODE |
| LOW | tests/unit/explain/test_explain_plan_real_db.py | 231 | async def test_explain_with_like_and_bind_variables_real_db(local_sql_driver): | CODE |
| LOW | tests/unit/explain/test_explain_plan_real_db.py | 250 | async def test_explain_invalid_query_with_real_db(local_sql_driver): | CODE |
| LOW⚡ | tests/unit/index/test_dta_calc.py | 44 | async def test_extract_columns_empty_query(create_dta): | CODE |
| LOW⚡ | tests/unit/index/test_dta_calc.py | 52 | async def test_extract_columns_invalid_sql(create_dta): | CODE |
| LOW⚡ | tests/unit/index/test_dta_calc.py | 60 | async def test_extract_columns_subquery(create_dta): | CODE |
| LOW⚡ | tests/unit/index/test_dta_calc.py | 68 | async def test_index_initialization(): | CODE |
| LOW | tests/unit/index/test_dta_calc.py | 94 | async def test_extract_columns_from_simple_query(create_dta): | CODE |
| LOW | tests/unit/index/test_dta_calc.py | 103 | async def test_extract_columns_from_join_query(create_dta): | CODE |
| LOW | tests/unit/index/test_dta_calc.py | 370 | async def test_filter_long_text_columns(async_sql_driver, create_dta): | CODE |
| LOW | tests/unit/index/test_dta_calc.py | 462 | async def test_basic_workload_analysis(async_sql_driver): | CODE |
| LOW | tests/unit/index/test_dta_calc.py | 584 | async def test_replace_parameters_basic(create_dta): | CODE |
| LOW | tests/unit/index/test_dta_calc.py | 608 | async def test_replace_parameters_numeric(create_dta): | CODE |
| LOW | tests/unit/index/test_dta_calc.py | 636 | async def test_replace_parameters_date(create_dta): | CODE |
| LOW | tests/unit/index/test_dta_calc.py | 657 | async def test_replace_parameters_like(create_dta): | CODE |
| LOW | tests/unit/index/test_dta_calc.py | 678 | async def test_replace_parameters_multiple(create_dta): | CODE |
| LOW | tests/unit/index/test_dta_calc.py | 691 | def identify_column_side_effect(context, table_columns: Dict[str, Set[str]]): | CODE |
| LOW | tests/unit/index/test_dta_calc.py | 775 | async def test_identify_parameter_column(create_dta): | CODE |
| LOW | tests/unit/index/test_dta_calc.py | 810 | async def test_get_replacement_value(create_dta): | CODE |
| LOW | tests/unit/index/test_dta_calc.py | 848 | async def test_condition_column_collector_simple(async_sql_driver): | CODE |
| LOW | tests/unit/index/test_dta_calc.py | 865 | async def test_condition_column_collector_join(async_sql_driver): | CODE |
| LOW | tests/unit/index/test_dta_calc.py | 1008 | async def test_extract_condition_columns(async_sql_driver): | CODE |
| LOW | tests/unit/index/test_dta_calc.py | 736 | async def test_replace_parameters_fallback(create_dta): | STRING |
| LOW | tests/unit/index/test_dta_calc.py | 893 | async def test_condition_column_collector_with_alias(async_sql_driver): | STRING |
| LOW | tests/unit/index/test_dta_calc.py | 929 | async def test_complex_query_with_alias_in_conditions(async_sql_driver): | STRING |
| LOW | tests/unit/index/test_dta_calc.py | 972 | async def test_filter_candidates_by_query_conditions(async_sql_driver, create_dta): | STRING |
| 103 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docker-entrypoint.sh | 36 | # Create a new array for the processed arguments | COMMENT |
| MEDIUM | tests/conftest.py | 13 | # Define a custom event loop policy that handles cleanup better | COMMENT |
| MEDIUM | tests/unit/top_queries/test_top_queries_calc.py | 115 | # Create the TopQueriesCalc instance with the mock driver | COMMENT |
| MEDIUM | tests/unit/top_queries/test_top_queries_calc.py | 133 | # Create the TopQueriesCalc instance with the mock driver | COMMENT |
| MEDIUM | tests/unit/top_queries/test_top_queries_calc.py | 151 | # Create the TopQueriesCalc instance with the mock driver | COMMENT |
| MEDIUM | tests/unit/top_queries/test_top_queries_calc.py | 169 | # Create the TopQueriesCalc instance with the mock driver | COMMENT |
| MEDIUM | tests/unit/top_queries/test_top_queries_calc.py | 187 | # Create the TopQueriesCalc instance with the mock driver | COMMENT |
| MEDIUM | tests/unit/top_queries/test_top_queries_calc.py | 207 | # Create the TopQueriesCalc instance with the mock driver | COMMENT |
| MEDIUM | tests/unit/top_queries/test_top_queries_calc.py | 220 | # Create the TopQueriesCalc instance with the mock driver | COMMENT |
| MEDIUM | tests/unit/top_queries/test_top_queries_calc.py | 240 | # Create the TopQueriesCalc instance with the mock driver | COMMENT |
| MEDIUM | tests/unit/explain/test_server.py | 118 | # Create a mock error response | COMMENT |
| MEDIUM | tests/unit/index/test_dta_calc.py | 1195 | # Create a before plan with sequential scan | COMMENT |
| MEDIUM | tests/unit/index/test_dta_calc.py | 1219 | # Create an after plan with index scan instead | COMMENT |
| MEDIUM | tests/unit/database_health/test_database_health_tool.py | 85 | # Create a duplicate index to test duplicate index detection | COMMENT |
| MEDIUM | tests/unit/sql/test_db_conn_pool.py | 67 | # Create a mock implementation of pool_connect that simulates a retry | COMMENT |
| MEDIUM | tests/unit/sql/test_sql_driver.py | 52 | # Create the pool | COMMENT |
| MEDIUM | tests/unit/sql/test_sql_driver.py | 100 | # Create a mock implementation of _execute_with_connection | COMMENT |
| MEDIUM | tests/unit/sql/test_sql_driver.py | 151 | # Create a mock implementation of _execute_with_connection | COMMENT |
| MEDIUM | tests/unit/sql/test_sql_driver.py | 227 | # Create a mock implementation of _execute_with_connection | COMMENT |
| MEDIUM | tests/unit/sql/test_sql_driver.py | 268 | # Create a mock implementation of _execute_with_connection | COMMENT |
| MEDIUM | tests/unit/sql/test_sql_driver.py | 308 | # Create a mock execute function | COMMENT |
| MEDIUM | tests/unit/sql/test_readonly_enforcement.py | 24 | # Create a mock for the base SqlDriver._execute_with_connection | COMMENT |
| MEDIUM | tests/integration/test_top_queries_integration.py | 121 | # Create the TopQueriesCalc instance | COMMENT |
| MEDIUM | tests/integration/test_top_queries_integration.py | 153 | # Create the TopQueriesCalc instance | COMMENT |
| MEDIUM⚡ | tests/integration/dta/test_dta_calc_integration.py | 1085 | # Create a simple test table | COMMENT |
| MEDIUM⚡ | tests/integration/dta/test_dta_calc_integration.py | 1176 | # Create a test table with columns of varying sizes | COMMENT |
| MEDIUM | tests/integration/dta/test_dta_calc_integration.py | 1314 | # Create a test table with characteristics that demonstrate Pareto optimality | COMMENT |
| MEDIUM | tests/integration/dta/test_dta_calc_integration.py | 1348 | # Create a workload with specific benefit profiles | COMMENT |
| MEDIUM⚡ | tests/integration/dta/test_dta_calc_integration.py | 821 | # Create the recommended indexes | STRING |
| MEDIUM | tests/integration/dta/test_dta_calc_integration.py | 480 | # Create the recommended indexes | STRING |
| MEDIUM | src/postgres_mcp/artifacts.py | 209 | # Create a PlanNode from the raw JSON data | COMMENT |
| MEDIUM | src/postgres_mcp/explain/explain_plan.py | 204 | # Create the indexes query | COMMENT |
| MEDIUM | src/postgres_mcp/index/dta_calc.py | 403 | # Create a list of table names for the query | COMMENT |
| MEDIUM⚡ | src/postgres_mcp/index/index_opt_base.py | 505 | # Create a hashable key for the cache | COMMENT |
| MEDIUM | src/postgres_mcp/index/index_opt_base.py | 243 | # Create a synthetic workload entry for each query | COMMENT |
| MEDIUM | src/postgres_mcp/index/index_opt_base.py | 375 | # Create a cache key from the query and indexes | COMMENT |
| MEDIUM | src/postgres_mcp/index/presentation.py | 155 | # Create the result JSON object with summary, recommendations, and query impact | COMMENT |
| MEDIUM | src/postgres_mcp/index/llm_opt.py | 270 | # Create a hypothetical index using hypopg | COMMENT |
| MEDIUM | src/postgres_mcp/index/llm_opt.py | 345 | # Create a new Index object with the columns | COMMENT |
| MEDIUM | src/postgres_mcp/sql/bind_params.py | 554 | # Create a cache key from table and column name | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/utils.py | 57 | except Exception as e: | CODE |
| LOW | tests/utils.py | 118 | except Exception as e: | CODE |
| LOW⚡ | tests/utils.py | 139 | except Exception as e: | CODE |
| LOW⚡ | tests/utils.py | 145 | except Exception: | CODE |
| LOW⚡ | tests/utils.py | 154 | except Exception as e: | CODE |
| LOW | tests/unit/test_access_mode.py | 105 | except Exception: | CODE |
| LOW | tests/integration/test_top_queries_integration.py | 42 | except Exception as e: | CODE |
| LOW⚡ | tests/integration/test_top_queries_integration.py | 94 | except Exception as e: | STRING |
| LOW⚡ | tests/integration/test_top_queries_integration.py | 104 | except Exception as e: | CODE |
| LOW⚡ | tests/integration/dta/test_dta_calc_integration.py | 1166 | except Exception as e: | CODE |
| LOW | tests/integration/dta/test_dta_calc_integration.py | 58 | except Exception as e: | CODE |
| LOW | tests/integration/dta/test_dta_calc_integration.py | 65 | except Exception as e: | CODE |
| LOW⚡ | tests/integration/dta/test_dta_calc_integration.py | 818 | except Exception as e: | STRING |
| LOW⚡ | tests/integration/dta/test_dta_calc_integration.py | 828 | except Exception as e: | STRING |
| LOW⚡ | tests/integration/dta/test_dta_calc_integration.py | 1074 | except Exception as e: | STRING |
| LOW | tests/integration/dta/test_dta_calc_integration.py | 546 | except Exception as e: | STRING |
| LOW | tests/integration/dta/test_dta_calc_integration.py | 731 | except Exception as e: | STRING |
| LOW | tests/integration/dta/test_dta_calc_integration.py | 840 | except Exception as e: | STRING |
| LOW | tests/integration/dta/test_dta_calc_integration.py | 850 | except Exception as e: | STRING |
| LOW | src/postgres_mcp/server.py | 111 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/server.py | 185 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/server.py | 324 | except Exception as e: | CODE |
| LOW⚡ | src/postgres_mcp/server.py | 387 | except Exception: | CODE |
| LOW⚡ | src/postgres_mcp/server.py | 393 | except Exception: | CODE |
| LOW⚡ | src/postgres_mcp/server.py | 399 | except Exception: | CODE |
| LOW⚡ | src/postgres_mcp/server.py | 409 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/server.py | 425 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/server.py | 452 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/server.py | 485 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/server.py | 552 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/server.py | 640 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/server.py | 690 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/artifacts.py | 220 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/artifacts.py | 322 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/top_queries/top_queries_calc.py | 152 | except Exception as e: | STRING |
| LOW | src/postgres_mcp/top_queries/top_queries_calc.py | 247 | except Exception as e: | STRING |
| LOW | src/postgres_mcp/explain/explain_plan.py | 112 | except Exception as e: | CODE |
| LOW⚡ | src/postgres_mcp/explain/explain_plan.py | 138 | except Exception as e: | CODE |
| LOW⚡ | src/postgres_mcp/explain/explain_plan.py | 141 | except Exception as e: | CODE |
| LOW⚡ | src/postgres_mcp/explain/explain_plan.py | 180 | except Exception as e: | CODE |
| LOW⚡ | src/postgres_mcp/explain/explain_plan.py | 182 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/explain/explain_plan.py | 236 | except Exception as e: | CODE |
| MEDIUM | src/postgres_mcp/index/dta_calc.py | 511 | def in existing_defs: | CODE |
| LOW⚡ | src/postgres_mcp/index/dta_calc.py | 367 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/index/dta_calc.py | 577 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/index/dta_calc.py | 624 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/index/dta_calc.py | 527 | except Exception as e: | STRING |
| LOW | src/postgres_mcp/index/dta_calc.py | 531 | except Exception as e: | STRING |
| LOW⚡ | src/postgres_mcp/index/index_opt_base.py | 500 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/index/index_opt_base.py | 287 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/index/index_opt_base.py | 410 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/index/index_opt_base.py | 488 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/index/index_opt_base.py | 646 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/index/index_opt_base.py | 662 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/index/index_opt_base.py | 532 | except Exception as e: | STRING |
| LOW | src/postgres_mcp/index/presentation.py | 168 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/index/llm_opt.py | 223 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/index/llm_opt.py | 288 | except Exception as e: | CODE |
| LOW | src/postgres_mcp/index/llm_opt.py | 382 | except Exception as e: | STRING |
| LOW | src/postgres_mcp/database_health/replication_calc.py | 110 | except Exception: | STRING |
| 18 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docker-entrypoint.sh | 65 | # Check if SSE transport is specified and --sse-host is not already set | COMMENT |
| LOW | tests/utils.py | 36 | # Check if custom image already exists | COMMENT |
| LOW | tests/utils.py | 94 | # Check if container is running | COMMENT |
| LOW | tests/integration/test_top_queries_integration.py | 34 | # Check if extension exists | COMMENT |
| LOW | tests/integration/dta/test_dta_calc_integration.py | 780 | # Check if it matches one of our expected patterns | STRING |
| LOW | tests/integration/dta/test_dta_calc_integration.py | 784 | # Check if recommendation matches at least as a superset of the pattern | STRING |
| LOW | tests/integration/dta/test_dta_calc_integration.py | 875 | # Check if we measured performance improvements | STRING |
| LOW⚡ | src/postgres_mcp/explain/explain_plan.py | 125 | # Check if the query contains bind variables | COMMENT |
| LOW⚡ | src/postgres_mcp/explain/explain_plan.py | 131 | # Check if we got a valid plan | COMMENT |
| LOW⚡ | src/postgres_mcp/index/dta_calc.py | 377 | # Check if all columns in the index are used in conditions | COMMENT |
| LOW⚡ | src/postgres_mcp/index/dta_calc.py | 764 | # Check if this is a known alias | COMMENT |
| LOW | src/postgres_mcp/index/dta_calc.py | 323 | # Check if we've exceeded the time limit after doing at least one iteration | COMMENT |
| LOW | src/postgres_mcp/index/dta_calc.py | 566 | # Check if unique | COMMENT |
| LOW | src/postgres_mcp/index/dta_calc.py | 792 | # Check if this is a reference to a column alias | COMMENT |
| LOW⚡ | src/postgres_mcp/index/index_opt_base.py | 508 | # Check if we already have a cached result | COMMENT |
| LOW | src/postgres_mcp/index/index_opt_base.py | 149 | # Output results | COMMENT |
| LOW | src/postgres_mcp/index/index_opt_base.py | 626 | # Check if we have a cached result | COMMENT |
| LOW | src/postgres_mcp/index/llm_opt.py | 309 | # Check if this is an index scan node | COMMENT |
| LOW | src/postgres_mcp/sql/bind_params.py | 164 | # Check if this is a known alias | COMMENT |
| LOW | src/postgres_mcp/sql/bind_params.py | 557 | # Check if we already have this in cache | COMMENT |
| LOW | src/postgres_mcp/sql/extension_utils.py | 45 | # Check if we have a cached version | COMMENT |
| LOW | src/postgres_mcp/sql/extension_utils.py | 114 | # Check if the extension is installed | COMMENT |
| LOW | src/postgres_mcp/sql/extension_utils.py | 142 | # Check if the extension is available but not installed | COMMENT |
| LOW | src/postgres_mcp/sql/sql_driver.py | 162 | # Check if this is a connection pool | COMMENT |
| LOW | src/postgres_mcp/sql/safe_sql.py | 880 | # Check if node type is allowed | COMMENT |
| LOW | src/postgres_mcp/sql/safe_sql.py | 962 | # Check if the inner statement type is allowed | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/utils.py | 15 | CODE | |
| LOW | tests/unit/test_transport.py | 10 | CODE | |
| LOW | tests/unit/index/test_dta_calc.py | 170 | CODE | |
| LOW | tests/unit/index/test_dta_calc.py | 171 | CODE | |
| LOW | tests/unit/sql/test_db_conn_pool.py | 62 | CODE | |
| LOW | tests/integration/dta/test_dta_calc_integration.py | 170 | CODE | |
| LOW | tests/integration/dta/test_dta_calc_integration.py | 552 | CODE | |
| LOW | tests/integration/dta/test_dta_calc_integration.py | 885 | CODE | |
| LOW | tests/integration/dta/test_dta_calc_integration.py | 1080 | CODE | |
| LOW | src/postgres_mcp/server.py | 123 | CODE | |
| LOW | src/postgres_mcp/server.py | 197 | CODE | |
| LOW | src/postgres_mcp/server.py | 336 | CODE | |
| LOW | src/postgres_mcp/explain/explain_plan.py | 83 | CODE | |
| LOW | src/postgres_mcp/index/dta_calc.py | 125 | CODE | |
| LOW | src/postgres_mcp/index/dta_calc.py | 344 | CODE | |
| LOW | src/postgres_mcp/index/dta_calc.py | 384 | CODE | |
| LOW | src/postgres_mcp/index/dta_calc.py | 490 | CODE | |
| LOW | src/postgres_mcp/index/dta_calc.py | 534 | CODE | |
| LOW | src/postgres_mcp/index/dta_calc.py | 581 | CODE | |
| LOW | src/postgres_mcp/index/dta_calc.py | 671 | CODE | |
| LOW | src/postgres_mcp/index/dta_calc.py | 754 | CODE | |
| LOW | src/postgres_mcp/index/dta_calc.py | 775 | CODE | |
| LOW | src/postgres_mcp/index/index_opt_base.py | 180 | CODE | |
| LOW | src/postgres_mcp/index/llm_opt.py | 74 | CODE | |
| LOW | src/postgres_mcp/index/llm_opt.py | 293 | CODE | |
| LOW | src/postgres_mcp/database_health/index_health_calc.py | 22 | CODE | |
| LOW | src/postgres_mcp/sql/bind_params.py | 75 | CODE | |
| LOW | src/postgres_mcp/sql/bind_params.py | 115 | CODE | |
| LOW | src/postgres_mcp/sql/bind_params.py | 154 | CODE | |
| LOW | src/postgres_mcp/sql/bind_params.py | 175 | CODE | |
| LOW | src/postgres_mcp/sql/bind_params.py | 287 | CODE | |
| LOW | src/postgres_mcp/sql/bind_params.py | 413 | CODE | |
| LOW | src/postgres_mcp/sql/bind_params.py | 529 | CODE | |
| LOW | src/postgres_mcp/sql/bind_params.py | 552 | CODE | |
| LOW | src/postgres_mcp/sql/bind_params.py | 630 | CODE | |
| LOW | src/postgres_mcp/sql/extension_utils.py | 91 | CODE | |
| LOW | src/postgres_mcp/sql/sql_driver.py | 224 | CODE | |
| LOW | src/postgres_mcp/sql/safe_sql.py | 878 | CODE | |
| LOW | src/postgres_mcp/sql/safe_sql.py | 948 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/utils.py | 12 | logger = logging.getLogger(__name__) | CODE |
| LOW | tests/unit/explain/test_explain_plan_real_db.py | 11 | logger = logging.getLogger(__name__) | CODE |
| LOW | tests/unit/database_health/test_database_health_tool.py | 8 | logger = logging.getLogger(__name__) | CODE |
| LOW | tests/integration/test_top_queries_integration.py | 10 | logger = logging.getLogger(__name__) | CODE |
| LOW | tests/integration/dta/test_dta_calc_integration.py | 14 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/postgres_mcp/server.py | 46 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/postgres_mcp/__init__.py | 20 | __all__ = [ | CODE |
| LOW | src/postgres_mcp/top_queries/top_queries_calc.py | 13 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/postgres_mcp/top_queries/__init__.py | 4 | __all__ = ["PG_STAT_STATEMENTS", "TopQueriesCalc"] | CODE |
| LOW | src/postgres_mcp/explain/explain_plan.py | 17 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/postgres_mcp/explain/__init__.py | 5 | __all__ = [ | CODE |
| LOW | src/postgres_mcp/index/dta_calc.py | 22 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/postgres_mcp/index/dta_calc.py | 26 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/postgres_mcp/index/index_opt_base.py | 23 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/postgres_mcp/index/presentation.py | 18 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/postgres_mcp/index/llm_opt.py | 21 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/postgres_mcp/database_health/database_health.py | 19 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/postgres_mcp/database_health/__init__.py | 4 | __all__ = ["DatabaseHealthTool", "HealthType"] | CODE |
| LOW | src/postgres_mcp/sql/bind_params.py | 21 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/postgres_mcp/sql/__init__.py | 17 | __all__ = [ | CODE |
| LOW | src/postgres_mcp/sql/extension_utils.py | 10 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/postgres_mcp/sql/sql_driver.py | 17 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/postgres_mcp/sql/safe_sql.py | 85 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/postgres_mcp/__init__.py | 5 | CODE | |
| LOW | src/postgres_mcp/top_queries/__init__.py | 1 | CODE | |
| LOW | src/postgres_mcp/top_queries/__init__.py | 2 | CODE | |
| LOW | src/postgres_mcp/explain/explain_plan.py | 3 | CODE | |
| LOW | src/postgres_mcp/explain/__init__.py | 3 | CODE | |
| LOW | src/postgres_mcp/database_health/database_health.py | 1 | CODE | |
| LOW | src/postgres_mcp/database_health/__init__.py | 1 | CODE | |
| LOW | src/postgres_mcp/database_health/__init__.py | 2 | CODE | |
| LOW | src/postgres_mcp/sql/__init__.py | 3 | CODE | |
| LOW | src/postgres_mcp/sql/__init__.py | 4 | CODE | |
| LOW | src/postgres_mcp/sql/__init__.py | 5 | CODE | |
| LOW | src/postgres_mcp/sql/__init__.py | 6 | CODE | |
| LOW | src/postgres_mcp/sql/__init__.py | 7 | CODE | |
| LOW | src/postgres_mcp/sql/__init__.py | 8 | CODE | |
| LOW | src/postgres_mcp/sql/__init__.py | 9 | CODE | |
| LOW | src/postgres_mcp/sql/__init__.py | 10 | CODE | |
| LOW | src/postgres_mcp/sql/__init__.py | 11 | CODE | |
| LOW | src/postgres_mcp/sql/__init__.py | 12 | CODE | |
| LOW | src/postgres_mcp/sql/__init__.py | 13 | CODE | |
| LOW | src/postgres_mcp/sql/__init__.py | 14 | CODE | |
| LOW | src/postgres_mcp/sql/__init__.py | 15 | CODE | |
| LOW | src/postgres_mcp/sql/safe_sql.py | 1 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/utils.py | 145 | except Exception: | CODE |
| HIGH | tests/unit/test_access_mode.py | 105 | except Exception: | CODE |
| HIGH | src/postgres_mcp/sql/sql_driver.py | 38 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/unit/index/test_dta_calc.py | 248 | """Test the robust index comparison functionality.""" | STRING |
| MEDIUM | src/postgres_mcp/index/llm_opt.py | 24 | # We introduce a Pydantic index class to facilitate communication with the LLM | COMMENT |
| MEDIUM | src/postgres_mcp/database_health/replication_calc.py | 74 | """Get comprehensive replication metrics.""" | STRING |
| LOW | src/postgres_mcp/sql/bind_params.py | 454 | # For non-numeric, just use most common | COMMENT |
| LOW | src/postgres_mcp/sql/bind_params.py | 458 | # If adaptation fails, just use the value | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | devenv.yaml | 21 | #imports: | COMMENT |
| LOW | src/postgres_mcp/index/dta_calc.py | 81 | COMMENT |