hermes-agent/hermes_cli
teknium1 bb5f847093 security: enforce 0600/0700 file permissions on sensitive files
Enforces owner-only permissions on files and directories that contain
secrets or sensitive data. Previously, all files were created with
default umask permissions, which could allow other users on shared
systems to read API keys, config, and cron job data.

Changes:
- hermes_cli/config.py: Added _secure_dir()/_secure_file() helpers,
  ensure_hermes_home() sets 0700 on all dirs, save_config() sets 0600
  (save_env_value already had this from a prior commit)
- cron/jobs.py: Added matching helpers, ensure_dirs() sets 0700,
  save_jobs() and save_job_output() set 0600/0700
- cli.py: save_config_value() sets 0600 after writing config
- 8 new tests in tests/test_file_permissions.py

All chmod calls wrapped in try/except for Windows compatibility.

Cherry-picked from PR #757, rebased onto current main with conflict
resolution (save_config now uses atomic_yaml_write).

Closes #757
2026-03-11 00:28:30 -07:00
..
__init__.py Hermes Agent UX Improvements 2026-02-22 02:16:11 -08:00
auth.py fix: sort Nous Portal model list (opus first, sonnet lower) 2026-03-10 23:20:46 -07:00
banner.py feat: add data-driven skin/theme engine for CLI customization 2026-03-10 00:37:28 -07:00
callbacks.py refactor: reorganize agent and CLI structure for improved clarity 2026-02-21 23:17:18 -08:00
clipboard.py fix: resolve merge conflict with main in clipboard.py 2026-03-09 03:50:29 +03:00
codex_models.py Merge PR #446: fix(cli): use correct visibility filter string in codex API model fetch 2026-03-09 17:42:39 -07:00
colors.py Cleanup time! 2026-02-20 23:23:32 -08:00
commands.py fix: /new, /reset, and /clear all start a fresh session 2026-03-11 00:20:45 -07:00
config.py security: enforce 0600/0700 file permissions on sensitive files 2026-03-11 00:28:30 -07:00
cron.py refactor: streamline cron job handling and update CLI commands 2026-02-21 16:21:19 -08:00
doctor.py fix: add Kimi Code API support (api.kimi.com/coding/v1) 2026-03-07 21:00:12 -05:00
gateway.py fix: Slack gateway setup missing event subscriptions and scopes 2026-03-09 14:31:19 -07:00
main.py Merge PR #724: feat: --yolo flag to bypass all approval prompts 2026-03-10 20:56:30 -07:00
models.py fix: custom endpoint provider shows as openrouter in gateway 2026-03-09 02:38:34 -07:00
pairing.py Cleanup time! 2026-02-20 23:23:32 -08:00
runtime_provider.py fix: provider selection not persisting when switching via hermes model 2026-03-10 17:12:34 -07:00
setup.py feat: add Nous Portal API key provider (#644) 2026-03-10 06:28:00 -07:00
skills_hub.py fix: Initialize Skills Hub on list 2026-03-09 01:43:59 +08:00
skin_engine.py fix: add themed hero art for all skins, fix triple-quote syntax 2026-03-10 03:54:12 -07:00
status.py Merge PR #458: Add explicit UTF-8 encoding to config/data file I/O 2026-03-09 21:19:20 -07:00
tools_config.py fix: setup wizard overwrites platform_toolsets saved by tools_command 2026-03-08 23:39:00 -07:00
uninstall.py Cleanup time! 2026-02-20 23:23:32 -08:00