Skip to content

Security: simplexai-labs/PolyStrata

.github/SECURITY.md

Security

Reporting a vulnerability

Please report anything that should not be public until it is fixed privately, through GitHub's private vulnerability reporting: the repository's Security tab, Report a vulnerability (direct link). Say what you found, how to reproduce it (the request, the config keys involved, the PolyStrata version), and what an attacker gains. We answer there, fix it in a release, and credit you in the advisory unless you ask us not to.

Ordinary hardening ideas and findings that are safe to discuss in public are welcome as an issue (#544 collects audit findings) or as a pull request, which we review like our own code.

Supported: the latest release. Fixes go into the next release, not into older ones.

What the server exposes

PolyStrata runs a model on your PC and serves it over HTTP (terminal/serve/server.py). Out of the box it is reachable from this PC only. The details and every setting are in docs/DETAILS.md ("From other devices", "Host names", "Web pages without an API key", "Tools from MCP servers").

  • Where it listens. 127.0.0.1 by default. --host 0.0.0.0 (or "host" in strata-<model>.json) opens it to your network, and the server then warns when no API key is set.
  • API key. "api_key" in the run config (or STRATA_API_KEY) is required on /v1/* and on every endpoint that shows the model's state, requests or answers (/status, /metrics, /metrics/prometheus, /settings, /mcp, /props, /slots, /api/requests, /config) and on every POST. It is compared in constant time. Set one before you open the server to your network or put a tunnel in front of it.
  • Host check (DNS rebinding, 0.1.38). Without an API key the server answers only requests whose Host is a name it knows (localhost, an IP address, the address it listens on and, when it listens beyond this PC, this PC's name). Others get 403. "allowed_hosts" adds names; with an API key the key decides.
  • Origin check (0.1.38). Without an API key, a browser POST to /v1/* from another web site's page (it carries an Origin header) gets 403 unless that origin is PolyStrata's own page, localhost, an allowed host, or listed in "trusted_origins" / "cors_origins". Changing settings (/settings, and /config: the few run config keys the page's Model settings may change - never the network, key, MCP or program keys), /load and /unload and the MCP tools are accepted only as JSON from PolyStrata's own page (or "trusted_origins"), so a page elsewhere cannot change settings or run tools.
  • CORS is off unless "cors_origins" lists origins, and then only for /v1/*.
  • MCP tools are opt-in: only the servers you put in the run config, only for requests from PolyStrata's own page that ask for them. They run with your user's rights, and the model decides when to call them.
  • The request monitor (/api-monitor, which keeps the last prompts and answers in memory) is off unless "api_monitor": true is set. Apart from it, the server keeps in its process memory the text and tokens of its last few prompts, whatever "api_monitor" says, to encode the next turn faster; no endpoint shows them, and they are gone when the server stops.

The Terminal

The Terminal (strata, in terminal/) shares the engine. The section above is about the engine's HTTP server. This is what the Terminal adds.

  • Clients talk through an owner channel. One owner process per installation starts and ends the engine, and a second client attaches to it. On macOS and Linux that is a private Unix socket in a folder only you can open. On Windows it is a TCP listener on 127.0.0.1 that answers only requests carrying a 256-bit token kept in an owner-only folder. That is a weaker guarantee than a socket other users cannot open: on Windows the token is what protects it, as with any loopback service that has a token (terminal/strata_control/owner_transport.py).
  • Starting a model and serving never download anything. Downloads and updates are one explicit step: strata update. Models and saved tuning are never replaced by an update.
  • Updates come from a signed feed. The release publishes strata-feed.json and strata-feed.json.sig (Ed25519). An installed PolyStrata checks the signature against the public key it carries (strata_control/update_keys.json), refuses a feed older than the last one it accepted (a replayed old feed) or expired, and checks every engine package against its SHA-256, its signed manifest and the card in your PC before it test-starts it and switches to it. Any failure keeps the engine you had. The private keys are kept offline by the owner. See packaging/UPDATES.md.

Installing from this repository

PolyStrata is installed from a git clone or the source zip of simplexai-labs/PolyStrata, so the first trust rests on HTTPS and on that GitHub repository. Setup then checks every model file it downloads against a pinned SHA-256, and a ready-made engine against the SHA-256 GitHub publishes for it, and does not use a file that does not match (when GitHub cannot say, setup warns and installs the engine anyway: docs/SAFETY.md). Read the scripts before you run them if that is not enough (START-HERE.bat, setup.sh and terminal/setup.py), or build the engine yourself (--build).

PolyStrata has not had an outside security audit yet. What PolyStrata downloads, when it uses the internet, what stays on your PC and how downloads are checked is written up in docs/SAFETY.md.

There aren't any published security advisories