Refuse mistyped server fields on POST /api/plugins/servers* with 400 - #543
Merged
davidmckayv merged 2 commits intoSep 15, 2026
Merged
davidmckayv merged 2 commits into
davidmckayv merged 2 commits into
Conversation
POST /servers truthiness-checked key and passed instanceHost and credentialId straight to the store, where input.credentialId?.trim() throws a TypeError on a number or object and escapes the mapped-error catch as a 500. POST /servers/custom did the same for credentialId. Validate key as a trimmed non-empty string and optional instanceHost and credentialId as trimmed non-empty strings when present, before any store call or audit row. Adds route-level regression tests proving numbers, objects, arrays and whitespace-only values answer 400 and never reach the store, plus a trimming happy path.
Ayush7614
requested review from
MikeRyanDev,
davidmckayv,
guidovizoso,
mxmzb and
tylerslaton
as code owners
September 15, 2026 09:07
davidmckayv
approved these changes
Sep 15, 2026
davidmckayv
left a comment
Contributor
There was a problem hiding this comment.
Code-verified clean; CI green on this sha.
davidmckayv
added a commit
that referenced
this pull request
Sep 15, 2026
…564) The Unreleased changelog was missing several changes that landed since v0.0.11: the Composio connector (#481), the removal of a skill's grants when it is uninstalled (#563), and the request-validation sweep that answers a malformed request with a 400 rather than coercing it or letting it through (#543-#548, #550), including the one fail-open it closed. Added, each checked against the code. The README's Governed MCP bullet named only Google Drive and Notion; Composio brokers a few hundred more apps in the catalogue now, so it says so.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
POST /servers truthiness-checked key and passed instanceHost and credentialId straight to the store, where input.credentialId?.trim() throws a TypeError on a number or object and escapes the mapped-error catch as a 500. POST /servers/custom did the same for credentialId.
This change validates key as a trimmed non-empty string and optional instanceHost and credentialId as trimmed non-empty strings when present, before any store call or audit row.
Verified: bun test server/tests/plugin-servers-validation.test.ts — 15 pass, 0 fail. Biome lint and format clean. No new dependencies.