ai-ml
Pass
Audited by Gen Agent Trust Hub on Jun 18, 2026
Risk Level: SAFEPROMPT_INJECTION
Full Analysis
- [PROMPT_INJECTION]: The chat endpoint in
src/ai_service/api/endpoints/chat.pydirectly interpolates user-provided text into the message list sent to the LLM without applying protective delimiters or specific instructions to ignore malicious prompt injection attempts. - [INDIRECT_PROMPT_INJECTION]: The skill features a SQL Agent that translates natural language into database queries, creating a surface for indirect prompt injection.
- Ingestion points: User input is ingested via the
ChatRequestmodel insrc/ai_service/api/endpoints/chat.pyand passed toSQLAgent.queryinsrc/ai_service/agents/sql_agent.py. - Boundary markers: The
SQL_SYSTEM_PROMPTprovides high-level instructions to only generateSELECTqueries, but there are no structural delimiters separating user content from system instructions. - Capability inventory: The agent possesses the capability to execute arbitrary SQL queries (filtered) against a configured database using the SQLAlchemy-based
SQLQueryToolinsrc/ai_service/tools/sql_tool.py. - Sanitization: The
SQLQueryToolimplements basic blocklist-based sanitization, checking for keywords likeDELETE,DROP, andUPDATE. However, it relies on simple string matching which may be bypassed by sophisticated SQL injection or database-specific syntax.
Audit Metadata