Edison Watch

Policy Rules (CEL)

Define advanced security policies using Common Expression Language (CEL).

Introduction

Policy Rules provide the most granular and powerful control over agentic actions in Edison Watch. Using Common Expression Language (CEL), you can define complex conditions that target specific users, tools, and data patterns.

For complex scenarios, use the Policies tab to define CEL (Common Expression Language) rules.

Rule Structure

  • Scope: Who does this rule apply to? (Global, specific roles, or users).
  • Resource: Which tools/servers does this target?
  • Filter: A CEL expression for precise matching (e.g., tool.args.path.startsWith("/etc/")).
  • Actions: What should happen? (Block, Allow Override, Tag, etc.).

Common Policy Examples

ScenarioCEL ExpressionAction
Block access to /etctool.args.path.startsWith("/etc/")Block
Restricted SSH filestool.args.path.contains(".ssh/")Mark Private
Manager-only deletionsprincipal.roles.exists(r, r == "manager")Allow Override

Priority Matters: Rules are evaluated in order of priority. Higher priority rules match first. Allow Override can be used to permit actions that would otherwise be blocked by global policies.

Getting Started

Navigate to Policies in the admin dashboard. If no policies are defined, you will see the empty state.

Empty policies view

Click Create your first rule to begin. You can choose to start from a pre-configured template or build a custom rule from scratch.

New rule creation options

Using Templates

Templates are the fastest way to implement common security patterns like blocking sensitive file access or restricting administrative tools.

Selecting a policy template
  1. Select Use a template.
  2. Browse categories like Filesystem or builtin.
  3. Select a template like Prevent deletion to load its configuration into the editor.
Editing a template-based rule

Rule Structure

A policy rule consists of four main sections:

1. Basic Info

Define the rule's identity, priority, and evaluation phase.

  • Priority: Higher numbers are evaluated first.
  • Phase: PRE (before the tool call) or POST (after the tool returns data).
  • Status: Enabled, Disabled, or Tentative. Tentative is a special status that allows you to test a rule without affecting production traffic.
Basic info section

2. Scope

Define who the rule applies to and which resources it targets.

  • Principal: Target global users, specific roles, or individual user IDs.
  • Resource: Target specific MCP servers or tool name patterns (regex).
Scope configuration

3. CEL Filter

The core logic of the rule. CEL filters allow you to inspect tool arguments, session state, and user details.

Use the Schema Reference Panel on the right side of the editor to browse available fields and click to insert them into your expression.

4. Actions

Define what happens when a rule matches.

  • Block: Prevents the action entirely.
  • Allow Override: Requires user confirmation but permits the action.
  • Tag: Attaches a metadata tag to the session for auditing.
Actions section

Managing Policies

Once created, policies appear in the sidebar list. You can quickly toggle their status between Enabled, Disabled, or Tentative.

Policy rule overview

Editing Rules

To edit a rule, click the Edit Rule button in the top-right corner of the rule detail view.

Policy rule edit
  1. Modify the rule's properties and logic. The editor is identical to the new rule creation editor.
  2. Click Save to apply the changes.

Evaluating Rules

To evaluate a rule, click the Evaluate button in the top-right corner of the rule detail view.

Policy rule evaluate
  1. Input a user, role, and tool call.
  2. Click Run Simulation.
  3. Review whether the rule matches and what action would be taken.

Deleting Rules

Deleting Rules

To remove a policy, click the Trash icon in the top-right corner of the rule detail view and confirm the deletion.

Deleting a rule is permanent. We recommend setting a rule to Disabled if you might need it again in the future.


For more information on the underlying security model, see the Security Architecture.

On this page