Supplemental Rules
Supplemental rules extend Bulwark’s built-in health checks with custom detections — no code required. Rules are plain-text files (YAML, JSON, or XML) that describe conditions to evaluate against the data Bulwark collects from an AD environment. Triggered rules appear in thesupplemental_rule_results list in the output alongside built-in findings.
How It Works
When Bulwark completes data collection, it loads all supplemental rules from the path you specify. Each rule’s conditions are evaluated against the collectedHealthCheckData. If a rule’s conditions are satisfied, it is added to the results. Rules that do not trigger are silently skipped.
If a field referenced by a criterion is not present in the collected data, Bulwark attempts a live LDAP query to retrieve it (see LDAP Fallback).
Supplying Rules
CLI
TUI
From the main menu, select Rules — Ingest and manage supplemental rules, then type the path to a file or directory and press Apply.Rule File Format
Each file must contain a top-levelrules list. A single file may contain multiple rules.
YAML
JSON
XML
Rule Fields
| Field | Required | Description |
|---|---|---|
id | yes | Unique identifier (e.g., SUPP-001) |
name | yes | Short human-readable name shown in output |
description | no | Longer explanation of what the rule checks |
category | no | Grouping label (e.g., accounts, gpo, pki) |
severity | no | critical, high, medium, low, info |
solution | no | Recommended remediation text |
conditions | yes | Evaluation logic (see below) |
Conditions
| Field | Values | Default | Description |
|---|---|---|---|
match | all / any | all | all = every criterion must be true (AND). any = at least one (OR) |
criteria | list | — | One or more criterion objects |
Operators
| Operator | Description | Example value |
|---|---|---|
eq | Equal to | "0", "true", "Windows Server 2019" |
ne | Not equal to | "false" |
lt | Less than (numeric) | "10" |
gt | Greater than (numeric) | "50" |
lte | Less than or equal to | "100" |
gte | Greater than or equal to | "1" |
contains | String contains substring (case-insensitive) | "2012" |
exists | Field is present and non-empty/non-zero | (no value needed) |
count_gt | List length greater than | "5" |
count_lt | List length less than | "2" |
count_eq | List length equals | "0" |
LDAP Fallback
If a field path cannot be resolved from collected data, Bulwark performs a live LDAP query using one of four structured notations — all prefixed withldap..
Notation 1 — Attribute Lookup: ldap.<attr>
Searches the domain object for the attribute, falls back to subtree scan.
Notation 2 — Type Attribute Query: ldap.<type>.self.<attr>
Searches all objects of <type> and returns every value of <attr> as a list.
Notation 3 — Type + Filter Query: ldap.<type>.filter.<ldap-filter>
Finds objects of <type> matching the raw LDAP filter. Returns distinguished names as a list.
Notation 4 — Raw Filter Query: ldap.filter.<ldap-filter>
Searches the entire domain with a raw LDAP filter. No type restriction.
Supported Object Types
| Token | LDAP Filter |
|---|---|
user | (&(objectClass=user)(objectCategory=person)) |
computer | (objectCategory=computer) |
group | (objectClass=group) |
gpo | (objectClass=groupPolicyContainer) |
ou | (objectClass=organizationalUnit) |
domain | (objectClass=domain) |
trust | (objectClass=trustedDomain) |
dc / domaincontroller | Domain controllers (UAC bit 8192) |
pki / ca | (objectClass=certificationAuthority) |
template / certtemplate | (objectClass=pKICertificateTemplate) |
(objectClass=<token>).

