Repository navigation
security: untrusted project config, CORS off by default, list limit caps - #1321
Merged
Merged
Conversation
- server: merge project config per section; project file can no longer set [server]/[extraction] - cli: project config cannot override endpoints, api keys or server address (UTEKE_TRUST_PROJECT_CONFIG=1 opts in) - server: no CORS headers unless cors_origins is set; "*" is an explicit opt-in; guard also covers read-only token - server: cap list-style limits and /extract max_facts; log request path without query string; generic 500 bodies Refs #1319 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
Refs #1319 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
A project file could switch the backend from local ONNX to a remote provider, sending memory text out with the trusted global API key. Refs #1319 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
|
||
| #[test] | ||
| fn project_config_without_server_section_does_not_wipe_global() { | ||
| let token = "t".repeat(10); |
Refs #1319 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This was referenced Oct 7, 2026
Closed
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
load_uteke_tomlnow merges the project-local.uteke/uteke.tomlper section instead of replacing the whole global config. The project file can no longer set[server](host, auth tokens, CORS origins) or[extraction](LLM endpoint + key); a warning is logged when it tries.embedding.backendandembedding/embed_fallback/extractionapi_key,base_url,endpoint_pathandserver.{enabled,host,port}are reverted to the global values. Opt-in escape hatch:UTEKE_TRUST_PROJECT_CONFIG=1.cors_originsis configured;"*"is an explicit opt-in. The "hide Authorization under wildcard" guard now also covers a read-only-token-only setup.PUTadded to allowed methods. Startup warning when"*"is combined with no auth.limitcapped at 1000 on/list,/recent,/contradictions,/doc/list, deprecated listing;/extractmax_factscapped at 100; request log records the path only (no query string); nine 500 arms no longer echoe.to_string()(logged instead).Why
High + medium findings from the v0.19.1 review — see #1319. A cloned repo's
.uteke/uteke.tomlcould disable server auth or redirect embedding/extraction traffic (with the API key from the user's env) to an attacker host, and the default wildcard CORS let any web page read/write a local unauthenticated server.Testing
cargo clippy --workspace --all-targetsclean;cargo test -p uteke-cli -p uteke-serverpasses.[server]; CLI project config cannot redirect endpoints/keys/server address; CORS default/explicit-origin/wildcard+read-only-token behavior.Notes for reviewers
*must now setcors_origins(or"*"). Worth a CHANGELOG line at release time.Host-header validation against DNS rebinding, upgrade signature verification / version-tag validation,/importsize mismatch.Refs #1319
🤖 Generated with Claude Code