Repository navigation
fix(enrichment): keep skipped and shed status out of enriched fields - #860
Merged
Merged
Conversation
A substring fieldref compared only the first 1024 scalar values of each field, so a match on a later value was never found. Count each side's candidates instead, and return the row as a match when either side has more than 1024; otherwise compare every pair.
…us, not under inject_field
# Conflicts: # CHANGELOG.md
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.
An enricher that its open circuit breaker skipped, or that was shed for want of capacity, used to write
{"status": "skipped"}or{"status": "shed"}under itsinject_field. Everything downstream then read that marker as if it were the enriched value:enrichment.<field>resolved to the marker object, so matchers such as!= ""or=~ ".+"matched a detection that was never enriched.entity_graphgrouping, the marker stringified to the same value for every skipped detection, so unrelated entities skipped by the same breaker were joined into one incident.Now the enricher's
inject_fieldstays absent, and the status moves to a newEvaluationResult::enrichment_statusmap (enricher id toskippedorshed), serialized as a top-levelenrichment_statusobject and left out when empty. The detection is still delivered and is visibly marked, but the marker can no longer stand in for a real value.entity_graphnow uses the same scalar rule as risk-object extraction: only a string, number, or boolean forms a join edge. A selector that resolves to an object or array contributes no edge (previously its JSON text joined incidents), and neither does the empty string, which risk extraction already ignored.EvaluationResultgains a public field, so code that builds it with a struct literal needsenrichment_status: Default::default().