Add decision log levels and the fields needed to review an allow #9
Loading…
Reference in a new issue
No description provided.
Delete branch "decision-log"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The log recorded refusals and failures only, so a false allow left no trace. A request the gate passed with a WAF score, or one the model cleared by a narrow margin, was invisible. Since v0.1.8 most hosts produce no log lines at all.
Change
New setting
CENTINELA_LOG_DECISIONS:blocked(default)escalatedallAn unknown value fails at startup. Rate-limited requests stay at one line per client per window at every level.
New fields on each
decisionline:idreview-queuedallow and its latereviewverdict share itscoresrulesmsExisting fields are unchanged. Query strings, headers and bodies are still never logged.
Example at
escalated:Notes
escalatedadds a line for every scored or model-judged allow;alladds one per request.policy.DecisiongainsScores, andrequest.RequestgainsIDandReceived(neither is sent to the model or the training log).Tests
review-queuedallow and its late verdict share an id.make vet,make buildandmake test(race detector) pass.Merging to
mainrunsbuild-and-push, which tags and publishes the next patch version.The log recorded refusals and failures only, so a false allow left no trace: a request the gate passed with a WAF score, or one the model cleared by a narrow margin, was invisible. CENTINELA_LOG_DECISIONS selects which decisions get a line: blocked refusals and failures (the default, as before) escalated also every allowed request that showed a signal: anything past the gate, and anything the gate passed with a WAF score above 0 all every request Each line gains: id per request, shared by a review-queued allow and its late verdict scores the model's three strongest hazards and severity, whether or not any reached a threshold; kept with cached verdicts rules up to 12 matched CRS rule ids ms time since the request arrived Query strings, headers and bodies are still never logged.🔎 ojo scan results
Details (12)