open-code-review/internal/session
PreethamNoelP 44c1abc8cd fix(session): restrict session dir and file permissions to owner-only
Session directories were created with 0755 (rwxr-xr-x) and session
files with 0644 (rw-r--r--), making them readable by any local user
on shared systems such as multi-user servers and CI runners.

Session JSONL files contain full LLM request and response data,
including the complete source code diff, file contents read by the
file_read tool, and the model's analysis — all sensitive material.

Change MkdirAll mode from 0755 to 0700 and OpenFile mode from 0644
to 0600, restricting access to the file owner only. This matches the
0600 permission already used for the config file (which holds the API
key) in cmd/opencodereview/provider_cmd.go.

Fixes #144
2026-06-17 12:45:31 +05:30
..
history.go feat: add review filter to remove provably incorrect comments after subtask 2026-06-09 20:41:42 +08:00
persist.go fix(session): restrict session dir and file permissions to owner-only 2026-06-17 12:45:31 +05:30
persist_test.go fix(session): restrict session dir and file permissions to owner-only 2026-06-17 12:45:31 +05:30