Aegisify company logo

We're Here to Help

Resources & Help Center

Search our knowledge base, view documentation, or get support. Everything you need in one place.

How do I tune the heuristic thresholds (score, encoding, metacharacters, token length)?

The heuristic layer has four tuning values in Aegisify WAF → WAF Settings → Managed Protection → Heuristic anomaly layer. Each one controls how sensitive a single signal is, and together they decide whether a request is suspicious.

The four thresholds

  • Score threshold (default 40). The total heuristic score a request must reach before the heuristic action applies. Lower values make the layer more aggressive.
  • Percent encoding (default 8). Flags unusually dense percent-encoding in one value. Lower values can misclassify normal URLs and forms that encode reserved characters.
  • Metacharacters (default 12). Flags a concentrated set of shell, query, or expression symbols. Code editors, search tools, and technical forms can legitimately contain many symbols.
  • Long token (default 900 characters). Flags very long uninterrupted strings that may be encoded payloads. Lowering it can affect signed data or application tokens.

A safe tuning process

  1. Keep the heuristic action at Log while tuning.
  2. Review heuristic events in Logs / Attack Story. Filter by category to isolate them.
  3. If legitimate requests are flagged, raise the specific signal threshold that caused it rather than the overall score.
  4. If obvious attacks score below the threshold, lower the score threshold in small steps.
  5. Only after a quiet period, move the action to Challenge or Block.

Use the Policy Test

WAF Settings → Test & Recovery → Policy Test lets you evaluate a sample path and payload against the current policy without sending a real request, creating a log entry, or blocking anything. It is the fastest way to check a tuning change.

Related: Heuristic layer evaluation, Sensitivity mode.

2026-12-01T03:50:45+00:00January 12th, 2026||

Find this article interesting, please share.