Skip to main content
Rules read the same scan evidence you search. A protocol field you can query in InfraQL is available to a rule condition under the infrawatch module, so there is one field reference for both: the Data Dictionary.

Map a search field to a rule path

Take the service field and prefix it with infrawatch.scan.: That is the whole mapping. Browse the fields, their types, and their meanings in the Data Dictionary, then write the condition against the prefixed path.

Service fields

Every protocol, its fields, and what each value means.

Common fields

Port, transport, protocol, and the fields shared across every service.

Write the condition

Guard a field with defined before comparing it. A service that was never observed speaking the protocol has no value there, and an unguarded comparison against it does not match:
String fields support the comparisons you would expect, including case-insensitive matching:

Confirm the exact field set

The Data Dictionary is the readable reference. When you need certainty, ask the API for the authoritative set: The authoring schema is derived from the protobuf descriptors linked into the same binary as the rule runtime, so it is exact by construction. It is also where to look for a protocol the Data Dictionary does not list yet, because scanning can observe a protocol before it is exposed as a search field.
Validate before saving. POST /rules/validate compiles the real source and returns compiler diagnostics, which is faster than finding a typo after the rule is live.

Write a rule

Structure, metadata, classification, and the rule lifecycle.

Copy an example

Working detections for common exposure patterns.