Skip to content

Refuse mistyped skill tools and whitespace grant ids with 400 - #546

Merged
davidmckayv merged 2 commits into
CopilotKit:mainfrom
Ayush7614:feat/component-grants-skills-validation
Sep 15, 2026
Merged

davidmckayv merged 2 commits into
CopilotKit:mainfrom
Ayush7614:feat/component-grants-skills-validation

Conversation

@Ayush7614

Copy link
Copy Markdown
Contributor

POST /skills silently dropped non-string tool entries, so a client bug installed a skill declaring nothing and answered success, and a non-boolean global could mint a deployment-wide skill. Every tool entry must now be a non-empty string and global a boolean. Component grant and function routes accepted whitespace-only ids, writing grant rows and audit rows naming nothing; all three now trim and refuse blanks before the store.

Verified: bun test server/tests/component-grants-skills-validation.test.ts — 11 pass, 0 fail. Biome lint and format clean.

POST /skills silently dropped non-string tool entries, so a client bug
installed a skill declaring nothing and answered success, and a
non-boolean global could mint a deployment-wide skill. Every tool entry
must now be a non-empty string and global a boolean. Component grant
and function routes accepted whitespace-only ids, writing grant rows
and audit rows naming nothing; all three now trim and refuse blanks
before the store.

@davidmckayv davidmckayv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code-verified clean; CI green on this sha.

@davidmckayv
davidmckayv merged commit d22cec6 into CopilotKit:main Sep 15, 2026
15 checks passed
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.

2 participants