Skip to main content

Overview

The Exec capability lets CORE run shell commands on your machine. This is powerful but requires careful configuration - you control exactly which commands are allowed through allow/deny patterns.

Security Model

Commands are validated against three layers before execution:
  1. Built-in deny list — common-sense blocks like rm -rf /, sudo, curl … | bash. Skipped only if allowUnsafe: true.
  2. User deny patterns — checked next; takes precedence over allow.
  3. User allow patterns — if configured, the command must match at least one. If empty, all non-denied commands are allowed.
In addition, when at least one folder is registered the dir parameter must resolve into a folder with the exec scope — otherwise the call fails with FOLDER_SCOPE_DENIED.

Configuration

Configure exec patterns through the CLI:
Or set them in your gateway slots configuration.

Pattern Format

Patterns use the format Bash(<glob>):

Example Configuration


Gateway Tool

exec_command

Execute a shell command:

Response


Use Cases

Git operations: CORE checks branch status, creates commits, pushes changes:
Build and test: Run build scripts and test suites:
System checks: Query system state:
File operations: Read and process files:

Development Workflow

Read-Only Access

Always Deny


Notes

  • Commands run with your user permissions (the user the gateway service runs as).
  • Output is captured and returned (stdout, stderr, exitCode).
  • Long-running commands should set timeout.
  • Commands that require user input will hang — avoid interactive commands. Use coding_ask with the appropriate agent for interactive flows.
  • The exec slot can be turned off entirely in corebrain gateway config — disabled slots are not just hidden in the manifest, their HTTP route is not registered at all.