fix: reject non-array tools in static manifests - #39
Merged
royalpinto007 merged 1 commit intoSep 12, 2026
Merged
Conversation
|
Welcome, @Gambit-Checkmate, and thanks for your first pull request to MCP-audit. A quick look at CONTRIBUTING.md covers how things are set up and run here. I'll review this shortly. Ask anything in the thread if something is unclear. |
|
And it's in. Thanks @Gambit-Checkmate. MCP-audit gets better every time someone outside the repo digs in like this. If you find MCP-audit useful, consider dropping a star. It helps more people find it. Happy to see more from you whenever you have the time. |
1 task
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 & why
A static manifest such as
{"tools":"MCP001"}currently reaches the rule engine as a string instead of a tool list. Reject non-arraytoolsvalues during normalization, with an error naming the manifest, before the audit runs.Closes #25.
Changes
toolscollection before constructing an audit target.toolsand support for a bare tool array.Checklist
npm run lint,npm test,npm run build; no formatter is configured)Validation on Windows with Node.js 24.15.0: all four new invalid-type cases failed on the unfixed code. With the fix, all 76 tests pass, including the stdio integration suite; typechecking, compilation, and
git diff --checkalso pass.AI assistance was used to prepare this contribution and run the checks above.