Custom Commands

Security

Sandboxing, permission gates, and what a script cannot do.

AuditScript runs in a sandbox with hard limits so a malicious or buggy script cannot crash the bot or affect other servers.

Sandboxing#

  • No filesystem or shell access, no eval
  • Step and time limits enforce termination
  • Loop iteration cap prevents infinite loops
  • Recursion and stack depth capped

HTTP restrictions#

  • Private IP ranges blocked by default (localhost, 10.x, 172.16-31.x, 192.168.x)
  • Only http and https protocols allowed
  • Optional allowlist via ACTION_HTTP_ALLOWLIST env for host restriction
  • Response body capped at 128KB

Permission gates#

A script cannot bypass Discord permissions the invoker does not have. Actions that fail due to missing permissions silently no-op, preserving the invoker's effective scope.