Skip to content

v1.1.0 - MCP 2025-11-25 Protocol Compliance & Security Hardening#25

Merged
neverinfamous merged 48 commits intomasterfrom
feature/enhanced-log-sanitization
Jan 29, 2026
Merged

v1.1.0 - MCP 2025-11-25 Protocol Compliance & Security Hardening#25
neverinfamous merged 48 commits intomasterfrom
feature/enhanced-log-sanitization

Conversation

@neverinfamous
Copy link
Owner

v1.1.0 - MCP 2025-11-25 Protocol Compliance

Release Date: January 29, 2026

Highlights

🎉 Full MCP 2025-11-25 protocol compliance with Structured Content (outputSchema) for all 150+ tools.

What's New

Protocol Compliance

  • Structured Content — All 150+ tools now include outputSchema for type-safe responses
  • Modern Tool Registration — Migrated to server.registerTool() API
  • Progress Notifications — Long-running admin and backup operations emit progress updates

New Features

  • Stats tools params support — All 8 stats tools now accept parameterized where clauses
  • JSONB Split Schema Pattern — 6 JSONB tools now support tableName, col, and filter aliases
  • JSONB Stats Payload ControltopKeysLimit parameter to control response size

Bug Fixes

  • Fixed 15+ Zod output schema validation errors across tool groups
  • Fixed Split Schema violations for parameter aliases
  • Fixed transaction savepoint reserved keyword handling
  • Fixed Code Mode orphaned transaction cleanup

⚠️ Breaking Changes

Security: SQL Injection Remediation

Tools now reject inputs containing SQL injection patterns that were previously passed through:

  • WHERE clause injection patterns (;DROP, UNION SELECT, --, /*, pg_sleep)
  • FTS config validation (63 chars max, alphanumeric + underscore only)

Affected tools: pg_text_search, pg_text_rank, pg_trigram_similarity, pg_fuzzy_match, pg_regexp_match, pg_like_search, pg_text_headline, pg_create_fts_index, pg_vector_search, pg_vector_aggregate

Security

  • CVE-2026-24842 — Docker tar patch upgraded to v7.5.7 (Path Traversal fix)
  • Enhanced Log Sanitization — Stack flattening, taint-breaking, OAuth field redaction
  • Docker Scout — 0 fixable critical/high CVEs

Dependencies

  • @types/node 25.0.10 → 25.1.0
  • globals 17.1.0 → 17.2.0
  • typescript-eslint 8.53.1 → 8.54.0
  • hono 4.11.5 → 4.11.7

Links

Temp added 30 commits January 27, 2026 15:45
…t-breaking output

- Add sanitizeStack() function to replace newlines with safe arrow delimiters
- Add writeToStderr() taint-breaking method for CodeQL compliance
- Expand sensitive keys with 8 additional OAuth 2.1 fields
- Stricter control character removal (0x00-0x1F + 0x7F)
- Add comprehensive tests for stack trace and OAuth field handling
- Apply prettier formatting to workflow files
- Migrate from deprecated server.tool() to server.registerTool()
- Add progress notification infrastructure (progress-utils.ts)
- Extend RequestContext with server/progressToken fields
- Add progress to admin tools: vacuum, analyze, reindex, cluster
- Add progress to pg_copy_export for large exports
- Bump hono from 4.11.5 to 4.11.7
…table names

- Add src/utils/fts-config.ts for FTS configuration validation
- Add src/utils/where-clause.ts for WHERE clause pattern blocklist
- Update 8 text tools with sanitization (text_search, text_rank, trigram_similarity, fuzzy_match, regexp_match, like_search, text_headline, create_fts_index)
- Update 2 vector tools with WHERE clause sanitization (vector_search, vector_aggregate)
- Add 31 comprehensive security injection tests
- BREAKING CHANGE: Tools now reject SQL injection patterns
…dd listExtensions alias

- Add required 'sql' field to all response paths in pg_analyze_query_indexes handler
- Update QueryIndexAnalysisOutputSchema to match actual response structure
- Add pg.listExtensions() top-level alias in Code Mode bindings
- Update ServerInstructions.ts documentation to include listExtensions alias
…ransactions on code mode errors

- Add quoteIdentifier() utility for safely quoting identifiers that may be reserved keywords (savepoints, user-defined names)
- Update createSavepoint/releaseSavepoint/rollbackToSavepoint to use quoteIdentifier()
- Expand RESERVED_KEYWORDS set with 8 additional SQL reserved words
- Add getActiveTransactionIds() and cleanupTransaction() methods to PostgresAdapter
- Implement automatic transaction cleanup in code mode handler when execution fails
- Add comprehensive tests for quoteIdentifier function
- Update changelog with bug fix documentation
…ration

- Enhanced ServerInstructions.ts documentation to clarify that rollbackTo
  restores database state to when the savepoint was created, undoing ALL work
  (data changes AND savepoints) created after the target savepoint
- Updated CHANGELOG.md with documentation entry explaining standard PostgreSQL
  savepoint rollback behavior
…g fixes

- pg_jsonb_typeof: Fixed columnNull type from array to boolean
- pg_jsonb_strip_nulls: Refactored output schema to combined object
- Implemented Split Schema pattern for MCP alias support:
  - Added tableName, col, filter parameter aliases
  - Added preprocessJsonbParams() for alias normalization
  - Created Base schemas for MCP visibility
  - Updated: extract, set, insert, delete, contains, path_query
- Fixed filter→where alias resolution in pg_jsonb_set/insert/delete
  - Made 'where' optional in Base schemas
  - Added .refine() to require where OR filter

- Created 8 new Base schemas with alias fields:
  - JsonbTypeofSchemaBase, JsonbKeysSchemaBase
  - JsonbStripNullsSchemaBase, JsonbAggSchemaBase
  - JsonbNormalizeSchemaBase, JsonbStatsSchemaBase
  - JsonbIndexSuggestSchemaBase, JsonbSecurityScanSchemaBase

- Updated tool definitions in basic.ts (4 tools) and advanced.ts (4 tools):
  - inputSchema now uses *SchemaBase for MCP visibility
  - Handlers parse with *Schema.parse() for alias resolution

All 2108 tests pass. Live MCP alias tests verified working.
- Fixed stringPathToArray() regex to support negative array indices like [-1]

- Updated ServerInstructions.ts with pg_jsonb_strip_nulls WHERE requirement clarification

- Updated ServerInstructions.ts with pg_jsonb_insert path format recommendation

- Updated CHANGELOG.md with bug fix and documentation entries
- Fixed typeDistribution[].type to accept nullable string (SQL NULL columns)
- Added missing sqlNullCount and hint output fields to match handler
- Added topKeysLimit parameter for payload size control (default: 20)
- Updated ServerInstructions.ts with SQL NULL vs JSON null documentation
…wrapper that broke MCP's Zod-to-JSON Schema conversion. Handler now always returns object with nullable fields.
Temp added 18 commits January 29, 2026 00:45
…or tools

- pg_vector_index_optimize: Cast estimatedRows from PostgreSQL bigint to number
- pg_vector_performance: Cast estimatedRows, idx_scan, idx_tup_read from bigint to number
- pg_vector_insert: Implement Split Schema pattern for tableName/col aliases
…d input types

When pg_vector_validate receives invalid input types (e.g., string instead of
number array for vector parameter), it now returns a structured error object:
{valid: false, error: 'Invalid vector: ...', suggestion: 'Ensure vector is an
array of numbers, e.g., [0.1, 0.2, 0.3]'} instead of raw Zod validation errors.
… names (average_vector/group_key) to match handler output - pg_vector_embed always returns object format {preview,dimensions,truncated}
…rValidateOutputSchema to schemas/vector.ts - Export schema from schemas/index.ts - Add outputSchema property to tool definition in basic.ts - All 468 tests passing
Added pg_vector_validate to the vector tool group in ToolConstants.ts.
The tool was already properly implemented with outputSchema but was
missing from the registry, preventing it from appearing in direct MCP
tool calls. Updated vector tool count from 14 to 15.
- README.md: updated pgvector row from 14 to 15 tools
- Test descriptions: updated to reflect 15 exposed vector tools
- ai-vector: 47 → 48 (vector group now has 15 tools)
- ext-ai: 24 → 25
- Updated README.md shortcuts table and config example
- Updated ToolConstants.ts comments
- Total tools: 203 → 204 (pg_vector_validate now exposed)
- Vector group: 15 → 16 (includes codemode)
- ai-vector shortcut: 47 → 48
- ext-ai shortcut: 24 → 25
- Added notes clarifying tool counts include Code Mode
- Total tools: 203 → 204 (pg_vector_validate now exposed)
- Vector group: 15 → 16 (includes codemode)
- ai-vector shortcut: 47 → 48
- ext-ai shortcut: 24 → 25
- Added notes clarifying tool counts include Code Mode
- Updated DOCKER_README.md tests badge to 2108
- Synced DOCKER_README.md tool filtering section with README.md
PostgreSQL BIGINT values are returned as strings due to JavaScript
number precision limits. Fixed CronScheduleOutputSchema and
CronScheduleInDatabaseOutputSchema to use z.string() instead of
z.number() for the jobId field.
- Upgrade tar patch from 7.5.4 to 7.5.7 in Dockerfile builder stage
- Upgrade tar patch from 7.5.4 to 7.5.7 in Dockerfile production stage
- Update Dockerfile comments to document both CVE-2026-23950 and CVE-2026-24842
- Docker Scout now reports 0 fixable critical/high CVEs
@neverinfamous neverinfamous merged commit 3bf9bed into master Jan 29, 2026
10 checks passed
@neverinfamous neverinfamous deleted the feature/enhanced-log-sanitization branch January 29, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant