fix(security): restrict local workspace writes to configured root

This commit is contained in:
Abhimanyu Saharan
2026-02-08 21:49:26 +05:30
parent aaeb3cf8f3
commit 724b6601f3
2 changed files with 24 additions and 3 deletions

View File

@@ -31,6 +31,13 @@ class Settings(BaseSettings):
cors_origins: str = ""
base_url: str = ""
# Optional: local directory where the backend is allowed to write "preserved" agent
# workspace files (e.g. USER.md/SELF.md/MEMORY.md). If empty, local writes are disabled
# and provisioning relies on the gateway API.
#
# Security note: do NOT point this at arbitrary system paths in production.
local_agent_workspace_root: str = ""
# Database lifecycle
db_auto_migrate: bool = False