Schema Overview
Beacon detection rules are YAML documents ending in.rule.yaml. Each rule describes one security condition over Beacon endpoint events and includes enough metadata and tests for the rule to be validated before it runs.
The structural schema is the threat-rules/v1 JSON Schema in the Agent Beacon repository. The runtime engine also compiles CEL expressions and checks rule fixtures, because those checks cannot be fully represented by JSON Schema alone.
Minimal Rule
A rule must define its identity, maturity, detection logic, emitted reason, and at least one fixture.Minimal single-event rule
Top-Level Fields
Exactly one of
match or correlation must be present.
Match Rules
Amatch rule evaluates one event at a time. The event is available as e, and field paths mirror the endpoint event JSON shape.
Match expression
match when one event is enough to explain the behavior, such as a command, file read, approval decision, or MCP tool call.
Correlation Rules
Acorrelation rule evaluates an ordered sequence of events. In threat-rules/v1, correlations are scoped to a single session and must complete inside a duration window.
Session correlation
correlation when the risk comes from a sequence, such as a secret-bearing file read followed by network egress in the same agent session.
Tests
Each rule carries test fixtures that define expected verdicts. Fixtures use partial Beacon events, so a test only needs the fields that matter for the rule.Fixture shape
Field Paths
CEL expressions usee.<field> paths that match the Beacon event schema. Common paths include:
Use
beacon rules fields or the generated upstream field reference to confirm available paths.
Related
Detection Standard
Review maturity, conformance, and CEL requirements.
Detection Engine
See how YAML rules are loaded and evaluated.
beacon rules lint
Validate rule files and run embedded fixtures.
Endpoint schema fields
Review the event entities rules can match.

