spring-ai-integration

Fail

Audited by Gen Agent Trust Hub on Sep 18, 2026

Risk Level: HIGHCREDENTIALS_UNSAFEINDIRECT_PROMPT_INJECTION
Full Analysis
  • [CREDENTIALS_UNSAFE]: The file examples/bad-ai-service.java contains a hardcoded API key string (sk-ant-abc123...). Although this file is explicitly labeled as a demonstration of bad practices to avoid, the presence of a hardcoded credential pattern in source code is a significant security risk.
  • [INDIRECT_PROMPT_INJECTION]: The skill facilitates the integration of external data (such as customer emails, order items, order descriptions, and user queries for RAG pipelines) directly into LLM prompts.
  • Ingestion points: Data enters the system through variables such as content, language, customerEmail, items, orderDescription, and question across various methods in SKILL.md and templates/AiServiceTemplate.java.
  • Boundary markers: While the skill demonstrates the use of Spring AI's .param() method for template interpolation, it lacks explicit delimiters or instructions to the model to ignore potentially malicious instructions embedded within the user-provided data.
  • Capability inventory: The skill uses ChatClient to perform network operations against LLM provider APIs (Anthropic and OpenAI) and modifies vector databases using VectorStore.add().
  • Sanitization: No input validation or sanitization logic is present to filter out adversarial content from external inputs before they are included in the prompt context.
Recommendations
  • AI detected serious security threats
Audit Metadata
Risk Level
HIGH
Analyzed
Sep 18, 2026, 06:38 AM
Security Audit — agent-trust-hub — spring-ai-integration