Skip to content

fix(approval): add cron allowlist mode#21034

Open
LeonSGP43 wants to merge 1 commit intoNousResearch:mainfrom
LeonSGP43:fix/cron-approval-allowlist-20984
Open

fix(approval): add cron allowlist mode#21034
LeonSGP43 wants to merge 1 commit intoNousResearch:mainfrom
LeonSGP43:fix/cron-approval-allowlist-20984

Conversation

@LeonSGP43
Copy link
Copy Markdown
Contributor

Summary

Fixes #20984.

Adds an explicit approvals.cron_mode: allowlist mode for unattended cron sessions. approve still allows all non-hardline dangerous commands, deny blocks dangerous cron commands, and allowlist only permits dangerous command patterns already present in command_allowlist.

This keeps the hardline blocklist unconditional and updates both approval entry points used before terminal execution:

  • check_dangerous_command()
  • check_all_command_guards()

Tests

  • scripts/run_tests.sh tests/tools/test_cron_approval_mode.py tests/tools/test_hardline_blocklist.py -k 'cron or hardline' (122 passed, 4 warnings)
  • python -m py_compile tools/approval.py hermes_cli/config.py tests/tools/test_cron_approval_mode.py
  • git diff --check

@alt-glitch alt-glitch added type/feature New feature or request comp/cron Cron scheduler and job management comp/tools Tool registry, model_tools, toolsets area/config Config system, migrations, profiles P3 Low — cosmetic, nice to have labels May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/cron Cron scheduler and job management comp/tools Tool registry, model_tools, toolsets P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add cron_mode: allowlist to restrict cron jobs to command_allowlist only

2 participants