Skip to content

Harden the client, the HTTP mode and the summaries; version 0.4.1 - #5

Merged
RunTimeAdmin merged 7 commits into
mainfrom
fix/outside-review-0-4-1
Oct 27, 2026
Merged

RunTimeAdmin merged 7 commits into
mainfrom
fix/outside-review-0-4-1

Conversation

@RunTimeAdmin

Copy link
Copy Markdown
Owner

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.

Change
F-01 --http on a host that is not this machine exits with an error unless --allow-remote is also given. The Host and Origin checks still apply only on this machine.
F-04 The client takes only https on 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.
F-05 An answer is read as a stream and given up on at 1,000,000 bytes. A declared length over the cap is not read. Before, response.text() held the whole answer first and the cap counted characters.
F-06 Text from registries and owners is shown as one plain line in the summaries (control and invisible characters out, white space collapsed). The JSON under the summary is untouched. The API already does this to names, so this is a second layer.
Release CI on every pull request: type check, tests, build, package listing, and the audit as advice. Its actions are pinned to a commit. mcp-publisher.exe is 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

  • No caller keys or hosted mode. The README still says a hosted version would need per-caller keys.
  • No filter can remove the risk that a model follows text it reads. The instructions to the model and the labels on owner text stay.
  • No provenance on the npm package. That needs publishing from CI, which changes how you publish.

Checked

  • 115 tests pass (101 before). Twelve tests, new or changed, fail against the old source and pass now.
  • Type check, build, and npm pack --dry-run: 17 files, 22.1 kB, no executable, no tests, no .github.
  • node scripts/live-check.mjs against the live API: all 14 checks, which also exercises the new reader on real answers.
  • The command line by hand: --http --host 0.0.0.0 exits 2 with the reason; with --allow-remote it starts and warns; without --http the flag is refused.

After the merge

Nothing is published by this change. To ship 0.4.1, npm publish from a clean checkout of main, then mcp-publisher publish, as for 0.4.0. It matters only to people who run --http --host or import the client directly. Stdio users are unaffected, so there is no hurry.

🤖 Generated with Claude Code

RunTimeAdmin and others added 7 commits October 27, 2026 17:17
… 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>
@RunTimeAdmin
RunTimeAdmin merged commit fd4c911 into main Oct 27, 2026
1 check passed
@RunTimeAdmin
RunTimeAdmin deleted the fix/outside-review-0-4-1 branch November 2, 2026 18:49
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.

1 participant