abnormal_security.ai_security_mailbox: items in scanning state are not properly updated #12932
Labels
bug
Something isn't working, use only for issues
Integration:abnormal_security
Abnormal Security
Team:Security-Service Integrations
Security Service Integrations Team [elastic/security-service-integrations]
The integration's data source may include items that are not currently classified; they are returned in with
judgementStatus
state of "Scanning".The current algorithm for collecting documents from the API is (blurring heavily over the details):
These events progress the cursor (even though we do not gain useful information from them), meaning that the integration never revisits the event to obtain it when the
judgementStatus
has been resolved to a useful vales. We could pin the cursor timestamp to before the earliestjudgementStatus
:"Scanning" to ensure that we always retry collecting these documents (falling back to the current time as we currently do if there are none), but this would result in re-ingestion of all documents after that time, including documents that were in a resolved state. We could instead add a look-back time which would be improve the situation probabilistically; we could get arbitrarily close to 100% also at the cost of potential re-ingestion.Instead of these approaches, I propose that we change the algorithm to maintain a list of work items that are in the scanning state:
This has the potential to have unbounded growth on the scanning list in pathological cases (i.e. where abnormal security have a continued behaviour of not moving items out of scanning), so we may want to have a condition to check that to avoid the issue, publishing and error in the case that we exceed some high water; this would require dumping all events in the scanning list and emitting an error to ingest, but the situation could be improved to dumping only the oldest (or newest) items on the scanning list after the two-parameter
tail
, andfront
list functions become available.The text was updated successfully, but these errors were encountered: