Skip to content

Commit aec48c5

Browse files
authored
Document FAA key name constraints (#881)
Add information about watch item key name requirements to the FAA docs pages.
1 parent 57c5d0b commit aec48c5

2 files changed

Lines changed: 26 additions & 3 deletions

File tree

docs/docs/configuration/faa.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,19 @@ configuration keys. Per-policy `EventDetailURL` and `EventDetailText` values
4141

4242
Each entry in the `WatchItems` dictionary represents a single rule. The key for
4343
each entry is the rule name, which will be used in logs and in the block
44-
notification UI. Each rule contains three main components:
44+
notification UI.
45+
46+
:::info
47+
48+
Rule names (the `WatchItems` dictionary keys) must be valid C identifiers,
49+
matching the regular expression `^[A-Za-z_][A-Za-z0-9_]*$`. Names must start
50+
with a letter or underscore and contain only letters, digits, and underscores.
51+
For example, `ChromeCookies` and `my_rule_1` are valid, but `my-rule` and
52+
`My Rule` are not. Invalid names will be rejected and an error will be logged.
53+
54+
:::
55+
56+
Each rule contains three main components:
4557

4658
- `Paths`: Array of path patterns to monitor
4759
- `Processes`: List of allowed/denied processes with specific identifiers

docs/docs/features/faa.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,19 @@ configuration](/configuration/faa.md) and then a dictionary of individual
115115
rules under the `WatchItems` key.
116116

117117
The key for each entry in the `WatchItems` dictionary is a name for that rule,
118-
which will be used in logs and in the block UI. The rule then contains `Paths`,
119-
`Processes` and `Options` fields.
118+
which will be used in logs and in the block UI.
119+
120+
:::info
121+
122+
Rule names (the `WatchItems` dictionary keys) must be valid C identifiers,
123+
matching the regular expression `^[A-Za-z_][A-Za-z0-9_]*$`. Names must start
124+
with a letter or underscore and contain only letters, digits, and underscores.
125+
For example, `ChromeCookies` and `my_rule_1` are valid, but `my-rule` and
126+
`My Rule` are not. Invalid names will be rejected and an error will be logged.
127+
128+
:::
129+
130+
The rule then contains `Paths`, `Processes` and `Options` fields.
120131

121132
### Path Patterns
122133

0 commit comments

Comments
 (0)