Skip to main content
Policy profiles give you control over how InferenceWall behaves at runtime: which mode it operates in, where the decision thresholds sit, and whether individual signatures are enforced or demoted to monitoring. You configure all of this in YAML — no code changes required.

Default policy

InferenceWall ships with a built-in default policy:
The signatures field is empty by default, meaning all signatures run with their built-in settings.

Enforcement modes

Thresholds

You can override any of the five thresholds in your policy: The “Strict” column shows values from the built-in strict policy profile, which is appropriate for high-sensitivity deployments.

Per-signature overrides

Use the signatures field to override individual signatures within a policy:

Override precedence

When determining how a signature behaves, InferenceWall applies this order:
  1. Per-signature override — highest priority; always wins.
  2. Global policy mode — applies to all signatures not explicitly overridden.
  3. Signature default action — the default_action field set by the signature author; lowest priority.
This means you can force a single high-value signature to enforce even while running the rest of the pipeline in monitor mode — useful when you want to block only the most dangerous attacks while you calibrate thresholds.
1

Deploy in monitor mode

Set mode: monitor in your policy. InferenceWall will scan all traffic and log every match, but will not block anything. This lets you see what your real traffic looks like without risk.
2

Observe for 1–2 weeks

Review the logged matches. Look at score distributions, which signatures are firing, and on what content. Identify any signatures that fire frequently on legitimate traffic (false positives).
3

Configure allowlists for false positives

Demote noisy signatures to monitor via per-signature overrides, or raise the relevant thresholds. This brings false positives under control before you start enforcing.
4

Flip high-confidence signatures to enforce

Move your highest-severity signatures to action: enforce individually. Start with credential leakage (DL-S-*) and coercive injection (INJ-D-029, INJ-D-030) — these have near-zero false positive rates.
5

Switch global mode to enforce

Once you are satisfied with the false positive rate, set mode: enforce globally. All signatures will contribute to scoring and threshold-based blocking from this point forward.

Creating a custom policy

Copy the default policy, modify it, and save it to ~/.inferwall/policies/:
The pipeline auto-discovers all .yaml files in ~/.inferwall/policies/. To select a policy explicitly — for example in CI/CD or container deployments — set the IW_POLICY_PATH environment variable:
If IW_POLICY_PATH points to a file that does not exist, the pipeline will fail to start. Verify the path before deploying.

For the full policy customization reference, including all available fields and environment variable overrides, see Custom Policies.