Skip to content

FEAT: Introduce IdentifierFilters to allow generic DB queries on identifier…#1557

Open
behnam-o wants to merge 30 commits intomicrosoft:mainfrom
behnam-o:dev/identifier-filter
Open

FEAT: Introduce IdentifierFilters to allow generic DB queries on identifier…#1557
behnam-o wants to merge 30 commits intomicrosoft:mainfrom
behnam-o:dev/identifier-filter

Conversation

@behnam-o
Copy link
Copy Markdown
Contributor

@behnam-o behnam-o commented Apr 1, 2026

  1. Introduce IdentifierFilters which allow us to query memory entities by matching properties of their referenced identifiers
  2. Replace some existing identifier-based queries with the new generic functions
  3. Add tests
  4. [stretch but along the same lines] introduces a few similar internal methods that operate on identifiers, abstracting the entity specificities from DB interface implementations (for example, we have a method on the interface to get unique values out of an array that holds converter classes, found somewhere in an attack identifier property. Today, each implementation of memory (AzureSQL/SQLite) has a hard-coded query that does only that by explicitly referencing the attack result table, doing some json magic, and extracting the values. With these new methods, the interface requires the implementations to implement mechansims to extract unique values out of any array in a JSON column, so 1) they don't need to hard-code queries on specific component types and 2) it can be reused on any desired property/identifier without having to update the memory implementations

Copy link
Copy Markdown
Contributor

@ValbuenaVC ValbuenaVC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR (#1451) might be a useful reference since it also handled filtering concerns, although for datasets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants