[GH-ISSUE #544] Please run several security audits #257

Closed
opened 2026-11-04 01:41:22 +07:00 by bsakaguchi · 6 comments
Owner

Originally created by @bennmann on GitHub (Oct 2, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/544

Strata is so new and moving so fast if anyone has spare tokens or compute, please do some security audits.

Maybe these would ideally be a pull request so findings are documented in a readme or something with strata.

Just a friendly community request.

Originally created by @bennmann on GitHub (Oct 2, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/544 Strata is so new and moving so fast if anyone has spare tokens or compute, please do some security audits. Maybe these would ideally be a pull request so findings are documented in a readme or something with strata. Just a friendly community request.
Author
Owner

@Niko1221 commented on GitHub (Oct 3, 2026):

Thanks, a fair point for a project that moves this fast. What the server does today (serve/server.py):

  • It listens on 127.0.0.1 (this PC only) by default. host / --host 0.0.0.0 opens it to the network, and it then warns if no API key is set.
  • api_key (or STRATA_API_KEY) is checked in constant time on /v1/* and on the pages that show requests or answers (/status, /metrics, the monitor, /mcp).
  • CORS is off unless the config lists cors_origins, and then only for /v1/*.
  • Changing settings, loading/unloading via /v1 and using MCP tools are accepted only as JSON from Strata's own page (or trusted_origins).
  • MCP tools are opt-in: only servers you configure, and only for requests that ask for them.

There hasn't been an outside audit. Reports are very welcome: an issue for ordinary findings, or GitHub's private vulnerability reporting for anything that shouldn't be public until fixed. A PR with findings or fixes is welcome too, and we gate it like our own code. Keeping this open as the place for that.

<!-- gh-comment-id:5964034229 --> @Niko1221 commented on GitHub (Oct 3, 2026): Thanks, a fair point for a project that moves this fast. What the server does today (serve/server.py): - It listens on 127.0.0.1 (this PC only) by default. `host` / `--host 0.0.0.0` opens it to the network, and it then warns if no API key is set. - `api_key` (or `STRATA_API_KEY`) is checked in constant time on /v1/* and on the pages that show requests or answers (/status, /metrics, the monitor, /mcp). - CORS is off unless the config lists `cors_origins`, and then only for /v1/*. - Changing settings, loading/unloading via /v1 and using MCP tools are accepted only as JSON from Strata's own page (or `trusted_origins`). - MCP tools are opt-in: only servers you configure, and only for requests that ask for them. There hasn't been an outside audit. Reports are very welcome: an issue for ordinary findings, or GitHub's private vulnerability reporting for anything that shouldn't be public until fixed. A PR with findings or fixes is welcome too, and we gate it like our own code. Keeping this open as the place for that.
Author
Owner

@HamedEmine commented on GitHub (Oct 3, 2026):

Thanks, a fair point for a project that moves this fast. What the server does today (serve/server.py):

* It listens on 127.0.0.1 (this PC only) by default. `host` / `--host 0.0.0.0` opens it to the network, and it then warns if no API key is set.

* `api_key` (or `STRATA_API_KEY`) is checked in constant time on /v1/* and on the pages that show requests or answers (/status, /metrics, the monitor, /mcp).

* CORS is off unless the config lists `cors_origins`, and then only for /v1/*.

* Changing settings, loading/unloading via /v1 and using MCP tools are accepted only as JSON from Strata's own page (or `trusted_origins`).

* MCP tools are opt-in: only servers you configure, and only for requests that ask for them.

There hasn't been an outside audit. Reports are very welcome: an issue for ordinary findings, or GitHub's private vulnerability reporting for anything that shouldn't be public until fixed. A PR with findings or fixes is welcome too, and we gate it like our own code. Keeping this open as the place for that.

I'm sending you an email about this!

<!-- gh-comment-id:5964136136 --> @HamedEmine commented on GitHub (Oct 3, 2026): > Thanks, a fair point for a project that moves this fast. What the server does today (serve/server.py): > > * It listens on 127.0.0.1 (this PC only) by default. `host` / `--host 0.0.0.0` opens it to the network, and it then warns if no API key is set. > > * `api_key` (or `STRATA_API_KEY`) is checked in constant time on /v1/* and on the pages that show requests or answers (/status, /metrics, the monitor, /mcp). > > * CORS is off unless the config lists `cors_origins`, and then only for /v1/*. > > * Changing settings, loading/unloading via /v1 and using MCP tools are accepted only as JSON from Strata's own page (or `trusted_origins`). > > * MCP tools are opt-in: only servers you configure, and only for requests that ask for them. > > > There hasn't been an outside audit. Reports are very welcome: an issue for ordinary findings, or GitHub's private vulnerability reporting for anything that shouldn't be public until fixed. A PR with findings or fixes is welcome too, and we gate it like our own code. Keeping this open as the place for that. I'm sending you an email about this!
Author
Owner

@mitros123 commented on GitHub (Oct 3, 2026):

Could you please enable the private vulnerability reporting functionality?

<!-- gh-comment-id:5968975805 --> @mitros123 commented on GitHub (Oct 3, 2026): Could you please enable the private vulnerability reporting functionality?
Author
Owner

@Niko1221 commented on GitHub (Oct 4, 2026):

0.1.39 adds SECURITY.md: how to report a problem privately (GitHub's private vulnerability reporting, now turned on for the repository) and what the server exposes and protects: 127.0.0.1 by default, the API key, the Host and Origin checks from 0.1.38, CORS, and the opt-in MCP tools and request monitor. Keeping this issue open for audit findings.

<!-- gh-comment-id:5979962110 --> @Niko1221 commented on GitHub (Oct 4, 2026): 0.1.39 adds SECURITY.md: how to report a problem privately (GitHub's private vulnerability reporting, now turned on for the repository) and what the server exposes and protects: 127.0.0.1 by default, the API key, the Host and Origin checks from 0.1.38, CORS, and the opt-in MCP tools and request monitor. Keeping this issue open for audit findings.
Author
Owner

@sarge18 commented on GitHub (Oct 6, 2026):

Following up on the invitation above with three hardening notes from a read-only look at v0.1.39 (main = 6f32ec0, checked again today). To be clear about their weight: this is a non-exhaustive, partly automated review of setup.py, serve/ and src/, not a security audit, and none of it is an exploitable vulnerability that I know of (so I'm posting here, not through private reporting). It also matches your description above: nothing in the server or the engine source opens outbound connections at runtime, no telemetry, and the server binds 127.0.0.1 by default.

  1. The ready-made engine zip is not hash-checked. get_prebuilt (setup.py:1946) downloads strata-*-x64*.zip from the release over HTTPS, extracts it (:1993) and marks the binaries executable (:2027); the only check is the BUILD.json from inside the same zip. v0.1.39 publishes Windows assets only, so today this applies to Windows installs (and to Linux if Linux assets are published). Model files and MTP tensors are pinned and hashed, so the engine binary is the one executable artifact without a pinned digest. Idea: publish a sha256sum.txt next to the release assets and verify it in get_prebuilt (or pin per-version digests in setup.py like HF_REVISIONS).
  2. A vanished pinned revision falls back to main with a warning, and hash checks stop applying. setup.py:1049 (hf_unpinned) switches to the repository's current file when the pinned revision 404s (GGUF shards then only get the structural size check). In tools/mtp_fetch.py the tensor hashes are gated by pinned() (:140, used at :228 and :264), so after the same fallback the SHA-256 verification is skipped. Idea: fail closed by default and make the fallback an explicit opt-in (like STRATA_MTP_REVISION).
  3. --check is not side-effect free. docs/AI_SETUP.md says setup's check "installs nothing except Python and the .venv", and --check is documented as "only check this PC", but setup.py:3641 runs data_folder() before --check is honoured. That creates the data folder, writes ~/.config/strata/settings.json, and merges or moves model files out of other Strata* folders on the same drive (move_into, setup.py:2581; the docstring documents it). Not harmful by itself, but surprising for a check; worth documenting, or skipping when --check is given.

Context: these came up while running Strata on 2x Tesla P40 for a community benchmark (#1028) and a docs question (#1029). Disclosure: prepared with an AI assistant (Claude Sonnet 5.5, medium effort) under my direction; I re-read each cited line on main today.

<!-- gh-comment-id:6009032061 --> @sarge18 commented on GitHub (Oct 6, 2026): Following up on the invitation above with three hardening notes from a read-only look at v0.1.39 (`main` = `6f32ec0`, checked again today). To be clear about their weight: this is a **non-exhaustive, partly automated review of `setup.py`, `serve/` and `src/`, not a security audit**, and none of it is an exploitable vulnerability that I know of (so I'm posting here, not through private reporting). It also matches your description above: nothing in the server or the engine source opens outbound connections at runtime, no telemetry, and the server binds `127.0.0.1` by default. 1. **The ready-made engine zip is not hash-checked.** `get_prebuilt` (`setup.py:1946`) downloads `strata-*-x64*.zip` from the release over HTTPS, extracts it (`:1993`) and marks the binaries executable (`:2027`); the only check is the `BUILD.json` from inside the same zip. v0.1.39 publishes Windows assets only, so today this applies to Windows installs (and to Linux if Linux assets are published). Model files and MTP tensors are pinned and hashed, so the engine binary is the one executable artifact without a pinned digest. Idea: publish a `sha256sum.txt` next to the release assets and verify it in `get_prebuilt` (or pin per-version digests in `setup.py` like `HF_REVISIONS`). 2. **A vanished pinned revision falls back to `main` with a warning, and hash checks stop applying.** `setup.py:1049` (`hf_unpinned`) switches to the repository's current file when the pinned revision 404s (GGUF shards then only get the structural size check). In `tools/mtp_fetch.py` the tensor hashes are gated by `pinned()` (`:140`, used at `:228` and `:264`), so after the same fallback the SHA-256 verification is skipped. Idea: fail closed by default and make the fallback an explicit opt-in (like `STRATA_MTP_REVISION`). 3. **`--check` is not side-effect free.** `docs/AI_SETUP.md` says setup's check "installs nothing except Python and the `.venv`", and `--check` is documented as "only check this PC", but `setup.py:3641` runs `data_folder()` before `--check` is honoured. That creates the data folder, writes `~/.config/strata/settings.json`, and merges or moves model files out of other `Strata*` folders on the same drive (`move_into`, `setup.py:2581`; the docstring documents it). Not harmful by itself, but surprising for a check; worth documenting, or skipping when `--check` is given. Context: these came up while running Strata on 2x Tesla P40 for a community benchmark (#1028) and a docs question (#1029). Disclosure: prepared with an AI assistant (Claude Sonnet 5.5, medium effort) under my direction; I re-read each cited line on `main` today.
Author
Owner

@Niko1221 commented on GitHub (Oct 13, 2026):

Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.

If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.

<!-- gh-comment-id:6155934862 --> @Niko1221 commented on GitHub (Oct 13, 2026): Thanks for the report. To keep the tracker current we are closing issues older than three days: [0.1.44](https://github.com/Niko1221/Strata/releases/tag/v0.1.44) is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1. If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#257
No description provided.