Refuse a non-string skill slug or summary before the store - #498
Merged
davidmckayv merged 2 commits intoSep 12, 2026
Merged
Conversation
Ayush7614
requested review from
MikeRyanDev,
davidmckayv,
guidovizoso,
mxmzb and
tylerslaton
as code owners
September 12, 2026 12:16
# Conflicts: # CHANGELOG.md
davidmckayv
approved these changes
Sep 12, 2026
davidmckayv
left a comment
Contributor
There was a problem hiding this comment.
Deep-reviewed clean (validation, no secret leak, fail-closed, agrees with existing layers). CI green.
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.
What this changes
Fixes #494. Same bug class as the grants/call validation already on this router (400 naming the field, not a 500 reading as a broken deployment):
POST /api/plugins/skillschecked presence with!body?.slugand then ran the slug regex, which coerces:{"slug":123\}tested the string"123"and passed.summaryhad no check at all (body.summary ?? ""), so{"summary":{}}reachedstore.installSkillwhere the insert threw an uncaught error — a 500 for a caller error.Where it runs
Stateless request validation in the server process. Same 400 on every replica.
Postgres is already there and is the default answer to all of the above: nothing here needs it.
Boundary and audit
Changelog
CHANGELOG.mdunderUnreleased: skill slug/summary validation entry.Proof
bun test server/tests/plugin-grants-validation.test.ts: 20 pass (6 existing grants + 10 new skills cases incl. numeric slug, object/array/number summary, whitespace title/instructions, plus a well-formed install still 200).bun test server/tests/plugin-routes.test.ts server/tests/plugin-grants-validation.test.ts server/tests/plugin-catalogue.test.ts: 78 pass, 0 fail.bunx biome format+bunx biome lint --error-on-warningson touched files: clean.bunx tsc --noEmit -p server/tsconfig.json: only the 3 pre-existingcopilot.tsmissing-module errors, identical on clean upstream main; nothing in touched files.