Skip to main content
Block specific commands from being executed by Ona Agent. Use deny lists to prevent dangerous operations, enforce security policies, and maintain compliance. This is part of Guardrails.
Agents settings page showing Command Deny List text area with blocked command patterns

How it works

  1. User provides input to Ona Agent
  2. Agent decides to execute a command
  3. System checks command against deny list
  4. Command is executed (if allowed) or blocked with error message

Pattern matching

PatternEffect
shutdownBlocks exactly “shutdown”
shutdown*Blocks “shutdown”, “shutdown -h”, “shutdown now”
rm *Blocks all rm commands with arguments
Slash commands (/clear, /support-bundle) are NOT blocked by deny lists—they’re converted to prompts before reaching the agent. Bash commands (prefixed with !) are subject to deny list filtering.

Configuration

Go to Settings → Agents. Only administrators can access.
  1. Locate the Policies section
  2. Add patterns to Command Deny List (one per line)
  3. Save changes
Changes apply to new agent sessions. Existing sessions must be restarted.

Example patterns

# Block package management
apt *
yum *
dnf *

# Block cloud provider CLIs
aws *
gcloud *

Effect on users

When blocked, users see:
Error: command execution prohibited: Command 'rm -rf /' matches deny pattern 'rm *'.
Do not attempt to retry this command as it is blocked by security policy.
  • Manual commands unaffected: Users can still run commands directly in terminal
  • Agent only: Only Ona Agent execution is restricted
  • No retries: Agent is instructed not to retry blocked commands

Security considerations

Protects against:
  • Accidental destructive commands
  • Malicious prompt injection
  • Compliance violations
  • Resource abuse
Does not protect against:
  • Direct user commands in terminal
  • Application-level actions
  • Slash commands (cannot be blocked via deny lists)

Best practices

  • Start with broad patterns (aws * instead of listing variants)
  • Test in a non-production environment first
  • Document why patterns were added
  • Review and update periodically

Testing

  1. Create a new environment
  2. Ask Ona Agent to run a blocked command
  3. Verify the error message appears

Getting help

Enterprise customers can contact your account representative.