You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SECURITY] nginx, disk cleanup, cert renewal and security-update tools bypass AUTO_APPLY approval #89
With AUTO_APPLY=false, several new tools that change hosts still run without human approval.
apply_nginx_config and restart_nginx (agent/core.py#L1570-L1582) have no dry_run and no approval step. They write files under /etc/nginx/ and reload or restart nginx immediately.
cleanup_stale_logs, install_log_cleanup_cron, renew_certificates and apply_security_updates are only gated by a dry_run argument, and the model chooses that value (inputs.get("dry_run", True)). If the model passes dry_run=false, the action runs live even with AUTO_APPLY=false.
NginxTools._run, DiskCleanup._run and SecurityUpdates._run call SafeExecutor().run(), which bypasses classification ("bypassing safety for internal approved calls"). These calls aren't approved; they come straight from the model.
The model's tool arguments can be steered by alert text and logs (prompt injection), so the AUTO_APPLY switch isn't actually enforced for these tools.
Expected
When AUTO_APPLY=false, every tool that changes a host returns requires_approval with an approval payload, the same way SafeExecutor.run_safe does. The model's dry_run choice should only be able to make a call safer, never less safe.
Suggested fix
In execute_tool, force dry_run=True for these tools unless self.auto_apply is true.
Give apply_nginx_config/restart_nginx the approval flow (or run_safe) when AUTO_APPLY=false.
Add tests: with AUTO_APPLY=false, dry_run=false and a recording runner, no mutating command is executed.
Activity
fix: require approval for host mutations when auto apply is disabled (o…
Merge pull request #103 from Nitjsefnie-OSC/fix/auto-apply-host-mutat…