mirror of
https://github.com/BaaRai/ARTEX.git
synced 2026-12-06 04:14:15 +00:00
Norma writes transcripts and noa archives with 0755 directories and 0644 files, so any other uid on the host, the executor that runs the agent's commands included, could read every conversation. LockDownPrivateDataDirs walks <data>/transcripts and <data>/noa under an os.Root at the data directory: each directory keeps at most 0700 and each regular file at most 0600, a narrower mode is kept, and every change goes through the descriptor that was checked. A symlink, a hard-linked file, any other entry and a directory not owned by the server are refused and left as they are. cmd/artex runs it with the key directory lockdown, so a refusal or a failed chmod fails the start unless ARTEX_ALLOW_UNISOLATED=1 is set; NewManager runs it too and only logs. Norma's Grep runs an unpinned npm install of @vscode/ripgrep when rg is missing unless NORMA_RIPGREP_NO_INSTALL is non-empty. NewManager now always sets it to 1, so an empty value cannot re-enable the install.