Repository navigation
fix(eval): reclaim suppression entries of fired deadman correlations - #863
Merged
Merged
Conversation
A deadman group is dropped once it fires, so it no longer counts toward `max_state_entries`, and the only pass that cleared expired suppression entries ran when that cap was hit. Every fired deadman group therefore left its last alert in memory for good. Dropping a fired group now also drops its last alert when no suppress applies. Otherwise the deadline path reclaims expired entries at most once per second of the newest tenant clock. Both that pass and the cap eviction measure each entry against its own tenant's clock, falling back to the newest event time for a tenant without one, so a tenant running ahead cannot end another tenant's suppression early or expire an alert that an idle tick fired ahead of other tenants' events.
A command enricher's argv is the operator's, and event values reach the
command only through env. A config that puts a ${detection.*} or
${correlation.*} reference anywhere in command, uses a non-literal env
key, gives a variable that loads code an event value, or has a cmd argv
expand such a variable as %NAME% fails at load. The per-program argv
reading, the leading-dash check, and the fuzz targets that exercised
them are removed.
fuzz_command_strict builds command enricher configs from argv entries and env keys and values drawn from literals, environment and event references, and cmd %NAME% forms, and checks that a config loads exactly when the argv has no event reference, every env key is literal, no loader variable takes an event value, and a cmd argv does not expand one as %NAME%.
Refuse event values in command enricher argv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A fired deadman group is dropped from the correlation state, so it no longer counts toward
max_state_entries. The only pass that cleared expired suppression entries ran when that cap was hit, so with absence correlations the cap was rarely reached and every fired deadman group left its last alert in memory for good. A deadman rule over many distinct groups grewlast_alertwithout bound.rsigma.suppressnor the engine default), its last alert is dropped with it, since nothing reads it.Tests cover 10,000 fired deadman groups with and without suppress (the entries drop to zero once the window passes), and suppression across two tenants whose clocks are far apart, including the idle-tick alert case through the state cap.