-
Notifications
You must be signed in to change notification settings - Fork 166
Upgrade node image to fix Critical Vulnerabilities, also fix schema failures #155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Upgrade node image to fix Critical Vulnerabilities, also fix schema failures
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are you seeing the schema failures?
If I run docker run -it flux159/mcp-server-kubernetes
, after downloading I only see:
Starting Kubernetes MCP server v0.1.0, handling commands...
If I run npx mcp-server-kubernetes
outside of docker, same thing. Not sure where the strict mode stuff is coming from.
If we need to remove optional - then I think we should add properties to "required" correctly: https://modelcontextprotocol.io/docs/concepts/tools#type-script
The base image change is good, just requesting changes around the optional vs required & asking for clarification on how you're running "strict mode".
Critical update: Add the non-optional fields to the required array.
Thank you for reviewing the PR. Let me clarify the strict mode issue. I am integrating this MCP server with my Augment Code AI Agent in VSCode so that my AI assistant could use it as a tool. The MCP SDK likely enables strict mode by default for security and is the case for most of the top MCP Clients. The schema validation error occurs because the kubectl_get tool schema uses the non-standard "optional" keyword, which violates JSON Schema specifications enforced by Ajv's strict mode. Ajv's strict mode prevents silent schema errors but requires spec-compliant schemas. https://ajv.js.org/strict-mode.html Added the non-optional fields whose 'optional: true' was removed to the required array. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used the wrong properties for required.
Additional changes for comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hi Suyog, Thanks for approving the PR. Please merge the code. I do not have write permissions to be able to merge this PR. |
Description: This PR is to fix errors like below
and also update the node image to ensure there are no Critical CVEs -
node:22-bookworm-slim has severe vulnerabilities: https://hub.docker.com/layers/library/node/22-bookworm-slim/images/sha256-847a2a79a5190cae14a0617cfae5b61abea3f8bf0d914cd3cdf4bebfebd53803
All of these are fixed in node:24.2.0-slim
https://hub.docker.com/layers/library/node/24.2.0-slim/images/sha256-678bc2f5eae9131a3709bf1873609a65242b7156270c7b15f9c4e3a7b58caec9