mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1126] [CLOSED] Harden server, installer and engine against high-risk bugs #3045
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3045
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/1126
Author: @aelnaby
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:fix/security-hardening-v2📝 Commits (1)
e0f7625Harden server, installer and engine against high-risk bugs📊 Changes
15 files changed (+357 additions, -75 deletions)
View changed files
📝
chat.py(+12 -1)📝
docker-entrypoint.sh(+5 -1)📝
docs/DETAILS.md(+15 -11)📝
include/strata/artifact/gguf_reader.hpp(+26 -3)📝
include/strata/core/native_head.hpp(+1 -0)📝
serve/server.py(+182 -31)📝
serve/test_security.py(+18 -8)📝
setup.py(+34 -10)📝
src/core/layer.cpp(+2 -0)📝
src/core/native_head.cpp(+3 -0)📝
src/core/weights.cpp(+22 -2)📝
src/kernels/ngram.cpp(+2 -1)📝
src/ngram/ple_reader.cpp(+31 -7)📝
sycl/src/core/layer.cpp(+2 -0)📝
sycl/src/core/native_head.cpp(+2 -0)📄 Description
Re-open of #992, rebased onto the new main after the history cleanup (old PR cannot be reopened).
Server: bounded request bodies (caps layered onto _body, keeping the drain machinery), vision image fetch with per-hop allowlist before connecting (no-redirect opener), connected-peer IP re-check, private/loopback/metadata refusal, size caps, Pillow bomb guards; MCP tools gated on the receiving interface (loopback keyless, LAN needs api_key or mcp_allow_remote); no shell=True in before_load; fail closed on cors ["*"] without api_key; tighter Origin trust.
Installer: safe zip extraction (traversal/symlink refusal, exec bits kept, bad-zip drop), private temp dir for the CUDA keyring, list2cmdline quoting, entrypoint allowlists, image size cap.
Engine: GGUF/PLE/index.txt overflow guards, native embed bound check.
Verified: serve.test_security 23/23 OK, test_setup_risk/pins/config OK, py_compile OK. C++ build needs the CUDA toolchain.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.