Repository navigation
Harden the client, the HTTP mode and the summaries; version 0.4.1 - #5
Merged
Merged
Conversation
… given The HTTP mode has no sign-in, and everyone who can reach it uses the server's one API key. A --host that was not this machine only printed a warning. It now exits with an error that says why, unless --allow-remote is also given (a container needs it, to listen inside the container). The Host and Origin checks still apply only on this machine, because the server cannot know its public name. The README and the help text say so. Raised by an outside review (F-01). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The client took any baseUrl and sent the bearer key there. The shipped program never passes one, so this concerned a program that builds the client itself. The constructor now throws unless the address is https on nooscape.si or a name under it, or a loopback address for a test server, and it refuses a user name or a password in the address. The check runs before anything is sent. One test used example.test as its base address and now uses api.nooscape.si. Raised by an outside review (F-04). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The client read a whole answer with response.text() and only then compared its length with the 1,000,000 cap, so an answer of any size was held in memory first, and the cap counted characters, not bytes. It now reads the answer as a stream, counts bytes, cancels the stream as soon as the cap is passed, and reads nothing when a declared length is already over it. A compressed answer is counted after it is decoded. Raised by an outside review (F-05). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A registry name or an owner's text with line breaks started a line of its own in a summary, which looks as if the server wrote it. The summaries now show such text as one plain line: control characters become a space, invisible and direction-changing characters go, a run of white space becomes one space, and owner text is cut at 300 characters after that. The API already does this to names, so this is a second layer. The JSON under the summary is still the API's, untouched. No filter removes the risk that a model follows text it reads. The instructions to the model and the labels stay. Raised by an outside review (F-06). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
mcp-publisher.exe (20 MB, the official registry's publisher; its embedded build information reads v1.8.1, commit f52dc85, which is that release's tag) was committed on 19 October with the Smithery manifest change, by accident. It is untracked and ignored now. The file stays where it is for whoever publishes. It was never in the package: the files list leaves it out, and the metadata test pins that list. The history keeps the blob. Raised by an outside review. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…quest The repository had no checks. The workflow installs from the lockfile, runs the type check and the tests, builds, lists what npm would publish, and runs the dependency audit as advice only. Its actions are pinned to a full commit, the same ones the Nooscape repository pins. Raised by an outside review. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The README said the package had not been published and the registries had not been submitted. It is on npm and in the official registry (0.4.0 since 27 October). It now says so, and shows how to stay on one release instead of the latest at every start. A test keeps that example on the current version. The version moves to 0.4.1 in package.json, server.json and manifest.json. Nothing is published by this change. Raised by an outside review. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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
Hardening from an outside security review of 27 October 2026, and version 0.4.1. Seven commits, one for each change. The review's findings are true as written and small in effect.
--httpon a host that is not this machine exits with an error unless--allow-remoteis also given. The Host and Origin checks still apply only on this machine.nooscape.si(or a loopback address, for tests) as its base address, with no user name or password in it. The shipped program never passed one.response.text()held the whole answer first and the cap counted characters.mcp-publisher.exeis untracked and ignored (it was committed by accident on 19 October; its build information is upstream v1.8.1). The README no longer says the package is unpublished, and shows how to pin a release. Version 0.4.1.Not changed
Checked
npm pack --dry-run: 17 files, 22.1 kB, no executable, no tests, no.github.node scripts/live-check.mjsagainst the live API: all 14 checks, which also exercises the new reader on real answers.--http --host 0.0.0.0exits 2 with the reason; with--allow-remoteit starts and warns; without--httpthe flag is refused.After the merge
Nothing is published by this change. To ship 0.4.1,
npm publishfrom a clean checkout of main, thenmcp-publisher publish, as for 0.4.0. It matters only to people who run--http --hostor import the client directly. Stdio users are unaffected, so there is no hurry.🤖 Generated with Claude Code