hybrid-search-implementation

Pass

Audited by Gen Agent Trust Hub on Oct 15, 2026

Risk Level: SAFEDATA_EXFILTRATIONINDIRECT_PROMPT_INJECTIONEXTERNAL_DOWNLOADS
Full Analysis
  • [DATA_EXFILTRATION]: The PostgresHybridSearch implementation in references/details.md contains a SQL injection vulnerability. In the hybrid_search method, dictionary keys from the filter_metadata object are interpolated directly into the SQL where_clause using an f-string (f" AND metadata->>'{key}' = ${len(params)}"). If these keys are derived from untrusted user input, an attacker could manipulate the SQL query to bypass search filters or exfiltrate unauthorized data from the database.
  • [INDIRECT_PROMPT_INJECTION]: The HybridRAGPipeline class in references/details.md defines a pattern for processing untrusted data from external stores that lacks adequate security boundaries.
  • Ingestion points: Content is retrieved from external vector_store and keyword_store components.
  • Boundary markers: The implementation does not use delimiters or explicit instructions to prevent the agent from executing commands embedded within the retrieved document text.
  • Capability inventory: The skill utilizes asyncpg for database access and sentence_transformers for reranking content.
  • Sanitization: There is no evidence of sanitization, escaping, or validation of the retrieved content before it is processed by the pipeline or returned to the caller.
  • [EXTERNAL_DOWNLOADS]: The search_with_rerank method in references/details.md fetches a pre-trained neural model (cross-encoder/ms-marco-MiniLM-L-6-v2) from Hugging Face's public registry using the sentence_transformers library.
Audit Metadata
Risk Level
SAFE
Analyzed
Oct 15, 2026, 08:19 PM