Skip to content

L10: harden REPL history file permissions to 0600 - #82

Merged
jkyberneees merged 1 commit into
mainfrom
fix/l10-repl-history-perms
Jul 19, 2026
Merged

L10: harden REPL history file permissions to 0600#82
jkyberneees merged 1 commit into
mainfrom
fix/l10-repl-history-perms

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

Closes L10.

  • replHistory.persist() now chmods any existing ~/.odek/repl_history to 0600 and opens new files with O_WRONLY|O_CREATE|O_TRUNC and mode 0600.
  • Prevents pasted API keys, tokens, and URLs in the REPL history from being world-readable under a permissive umask.

/cc @BackendStack21/odek

- cmd/odek/repl_editor.go: chmod existing repl_history to 0600 and open
  new files with O_WRONLY|O_CREATE|O_TRUNC and mode 0600, replacing the
  previous os.Create default permissions.
- cmd/odek/repl_editor_test.go: regression tests for restricted creation
  and hardening of existing world-readable files.
- docs/SECURITY.md + AGENTS.md: document L10 mitigation.
@jkyberneees
jkyberneees merged commit bfbf8e4 into main Jul 19, 2026
5 of 7 checks passed
@jkyberneees
jkyberneees deleted the fix/l10-repl-history-perms branch July 19, 2026 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant