Skip to main content

Command Overview

beacon rules lint validates rule files and runs their embedded conformance fixtures.
Command syntax
Use this command while authoring rules or before installing or publishing a rule pack.

What lint checks

beacon rules lint:
  • loads one .rule.yaml file or every .rule.yaml file under a directory
  • validates rule structure
  • compiles CEL expressions against the Beacon endpoint event schema
  • enforces maturity gates for experimental, stable, and deprecated rules
  • runs every embedded fixture and checks the declared verdict
Stable rules must include at least one match fixture and at least one no_match fixture.

Examples

Lint the default ./rules directory:
Lint default rules directory
Lint a specific directory:
Lint a rule directory
Lint one rule file:
Lint one rule

Rule fixture shape

Each fixture declares the expected verdict and an ordered list of partial Beacon events.
Fixture example

beacon rules fields

Print event fields available to CEL expressions.

beacon rules add

Install validated rules into the local store.