BE: Implement auto-dismiss services and workers

Why are we doing this work

To integrate auto-dismiss logic with vulnerability ingestion, we need to implement a new AutoDismissService to take the ingested vulnerability IDs and a worker that will call this service and can be triggered by subscribing to an event Sbom::VulnerabilitiesCreatedEvent.

Relevant links

Implementation plan

The service should have similar behavior as AutoResolveService:

  • Filter the ingested vulnerabilities based on the matched policy criteria
  • Implement criteria matching logic (file path, directory, identifier)
  • Perform state transitions for vulnerabilities
  • Support budget-based processing of max 1000 vulnerabilities (&10894 (comment 2559622385))
  • Perform updates in batches
  • Add event tracking for auto-dismissal actions
  • Implement activity timeline entries for auto-dismissed vulnerabilities
  • Store pipeline context in dismissal metadata
  • Refactor common logic between AutoResolveService and AutoDismissService

Verification steps

Edited by 🤖 GitLab Bot 🤖