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
PostgresHybridSearchimplementation inreferences/details.mdcontains a SQL injection vulnerability. In thehybrid_searchmethod, dictionary keys from thefilter_metadataobject are interpolated directly into the SQLwhere_clauseusing 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
HybridRAGPipelineclass inreferences/details.mddefines a pattern for processing untrusted data from external stores that lacks adequate security boundaries. - Ingestion points: Content is retrieved from external
vector_storeandkeyword_storecomponents. - 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
asyncpgfor database access andsentence_transformersfor 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_rerankmethod inreferences/details.mdfetches a pre-trained neural model (cross-encoder/ms-marco-MiniLM-L-6-v2) from Hugging Face's public registry using thesentence_transformerslibrary.
Audit Metadata