Skip to main content
The action classifier assigns a risk level to every action in the system. This classification drives audit logging verbosity, confirmation gate requirements, and security policy enforcement.

Overview

Every action gets classified into one of three levels: Fail-closed principle: Unknown actions default to destructive. If an action is not in the registry, it is treated as the highest risk level. Registry locking: After bootstrap completes, lockRegistry() is called to prevent runtime classification downgrades by malicious plugins. Once locked, registerAction() throws an error.
Source: packages/core/src/security/action-classifier.ts. 178 registered actions across 21 categories.

API

classifyAction

Returns the registered classification for an action, or "destructive" for unknown actions (fail-closed).

requiresConfirmation

Returns true if the action is classified as "destructive".

registerAction

Register a new action type with its classification. Overwrites any existing registration. Throws Error if the registry has been locked via lockRegistry().

lockRegistry

Locks the registry, preventing any further registrations. Idempotent — calling multiple times is a no-op.

isRegistryLocked

Returns true if lockRegistry() has been called.

Usage Example

Complete Action Registry

All 178 registered actions from ACTION_REGISTRY, grouped by category.

Configuration

The ActionConfirmationConfigSchema controls confirmation gate behavior:
Source: packages/core/src/config/schema-security.tsActionConfirmationConfigSchema Zod schema.

Classification Summary

Security Model

Defense-in-depth security architecture

Safe Path

Path traversal prevention

Tool Security

SSRF guard, tool policies, content scanner