Skip to content

Finding title search misses non-ASCII matches on SQLite: case folding is ASCII only #4001

Closed

Description

Description

get_findings_async filters by title through FindingEntry.title.ilike(...), which compiles to lower(title) LIKE lower(pattern) on SQLite, and SQLite's lower() only folds ASCII letters. A finding titled CAFÉ security review is found when searching CAFÉ but missed when searching café, while the same data on Azure SQL matches both directions.

This is the same class as the seed value search issue fixed for value_search, which now folds through the Unicode-aware UnicodeCaseFold on both sides for exactly this reason.

Steps to reproduce

  1. Create an operation and add a finding whose title contains a non-ASCII uppercase letter, for example CAFÉ security review.
  2. Search the operation's findings with title_query="café" through get_findings_async on SQLite.
  3. The finding is not returned; searching CAFÉ returns it.

Expected behavior

The title search should fold non-ASCII letters the same way on both backends, matching what the seed value search and the harm category filters already do.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions