Score formula
Each signature match produces a score:confidence— a float between0.0and1.0representing how certain the detection engine is about the match. Heuristic matches from the Rust engine typically have confidence0.9–1.0. ML classifier and semantic matches vary.severity— an integer from1to15set by the signature author to reflect how dangerous the detected pattern is. For example,DL-S-004(Private Keys) has severity15;DL-P-007(IP Addresses) has severity3.
Corroboration (diminishing returns)
The effective scan score is not a simple sum of all match scores. InferenceWall uses a max-primary + diminishing corroboration approach, similar to OWASP CRS:- The highest individual match score becomes the primary score.
- Each additional match contributes a diminishing increment to the total.
- Multiple weak signals can push a borderline score over a threshold, but they cannot dominate over a single strong signal.
Early exit
If the accumulated score reaches or exceeds theearly_exit threshold (default 13.0) after any engine layer, the pipeline stops and returns immediately. Downstream engines are skipped.
Decision thresholds
The effective score is compared against direction-specific thresholds:
Outbound thresholds are lower because output scanning catches data leakage — exposed credentials, PII, or system prompt contents — where the cost of a false negative (letting it through) is higher than the cost of a false positive (flagging clean output).
ScanResponse example
flag decision means the content exceeded the flag threshold but not the block threshold. Your application can handle flags differently from blocks — for example, routing flagged requests to a human review queue while blocking high-confidence attacks outright.
Configuring thresholds
All five thresholds are configurable in a policy profile:Thresholds are set per policy profile, not globally. You can have different thresholds for different environments or use cases. See Policy Profiles for details.