Skip to main content
Validation rules grade a scenario run once the agent is done. Edit them in the Validation section of the scenario form, or as the validation array of the scenario through the API. The engine always checks that the job completed first, even when the array is empty.
Every rule needs a human-readable label, shown in the results. required defaults to true; an optional rule counts in the compliance score but never fails the run.

Validators

host_state

Runs with the same shell and rules as setup steps - see How commands run. on picks a host from the scenario’s hosts, default the first one. If the host does not answer at all, the run ends in Error instead of failing the rule: an unreachable host says nothing about the agent.

pattern_match

The pattern is tested against each value separately - each command, each message - never against a joined blob.
  • A positive rule passes if any value matches.
  • A negated rule passes only if no value matches.
For task-level targets, the values of every task in the job are tested. If the job created no tasks, task-level rules fail with “No tasks to check” - negated ones included. task_plan is still accepted for older scenarios, but no longer has evidence on current versions. Do not use it in new scenarios. See Regular expression traps before writing patterns.

How a run is scored

The verdict, compliance, and remediation are computed from these rules - see How a run is graded.