Copy the default policy
signatures map.Edit thresholds, mode, and per-signature overrides
Open
~/.inferwall/policies/my-policy.yaml and modify the values you want to change:Point InferenceWall at your policy
Drop the file into
~/.inferwall/policies/ and InferenceWall will auto-discover it on the next startup. To explicitly select a specific file, set IW_POLICY_PATH:IW_POLICY_PATH is useful in CI/CD pipelines or container deployments where you want deterministic policy selection rather than auto-discovery.Policy YAML fields
Top-level fields
| Field | Type | Description |
|---|---|---|
name | string | Human-readable policy name for logging and audit events |
version | string | SemVer string; increment when you make changes |
mode | monitor | enforce | Global enforcement mode (see below) |
thresholds | object | Five scoring thresholds (see below) |
signatures | map | Per-signature overrides keyed by signature ID |
Thresholds
| Threshold | Description | Default | Strict |
|---|---|---|---|
inbound_flag | Score to flag an incoming request | 4.0 | 2.5 |
inbound_block | Score to block an incoming request | 10.0 | 7.0 |
outbound_flag | Score to flag an outgoing response | 3.0 | 2.0 |
outbound_block | Score to block an outgoing response | 7.0 | 5.0 |
early_exit | Score at which downstream engines are skipped | 13.0 | 10.0 |
Enforcement modes
| Mode | Behavior |
|---|---|
monitor | All signatures run and log matches, but no blocking or flagging actions are taken |
enforce | Signatures contribute scores to threshold comparisons and trigger flag or block decisions |
Per-signature overrides
Override individual signatures within thesignatures map:
| Field | Values | Description |
|---|---|---|
action | enforce, monitor | Overrides the global mode for this specific signature |
anomaly_points | 1–15 | Overrides the signature’s default scoring weight |
Override precedence
When multiple sources could set a signature’s action, InferenceWall resolves them in this order (highest wins):- Per-signature override —
signatures.<ID>.actionin the policy file - Global policy mode — the top-level
modefield - Signature default action —
tuning.default_actionin the signature YAML
Environment variable
.yaml files in ~/.inferwall/policies/.
Auto-discovery
Drop any.yaml file into ~/.inferwall/policies/ and InferenceWall will pick it up on the next startup. Use this when managing multiple policy profiles (e.g., strict.yaml, permissive.yaml) and switching between them by setting IW_POLICY_PATH.
Further reading
Policy concepts
How InferenceWall resolves policies, applies overrides, and manages the policy lifecycle.
Scoring concepts
The anomaly scoring model: confidence weighting, diminishing corroboration, and threshold math.