langchain4j-testing-strategies
Pass
Audited by Gen Agent Trust Hub on Mar 24, 2026
Risk Level: SAFE
Full Analysis
- [PROMPT_INJECTION]: The skill includes text patterns associated with prompt injections (e.g., 'Ignore previous instructions') within its unit testing documentation. These are explicitly used as test payloads for a PromptInjectionGuardrail to demonstrate how developers can verify security filters and are not intended as instructions for the agent itself.
- [EXTERNAL_DOWNLOADS]: The skill references standard dependencies from Maven Central and configures tests to use well-known Docker images such as Ollama and Qdrant via Testcontainers. These are established infrastructure components for integration testing and originate from well-known technology services.
- [CREDENTIALS_UNSAFE]: Demonstrates secure credential management practices by referencing environment variables (e.g., System.getenv('OPENAI_API_KEY')) in test configurations instead of hardcoding secrets.
- [INDIRECT_PROMPT_INJECTION]: The skill provides patterns for building applications that process external user input. It mitigates potential risks by documenting methods for implementing and testing input/output guardrails.
- Ingestion points: untrusted data enters the agent context through AI service chat methods as shown in references/unit-testing.md.
- Boundary markers: the skill demonstrates the use of InputGuardrail objects to delimit user input.
- Capability inventory: includes tools permitted in the skill configuration such as Bash, Write, and Read, which are addressed by the recommended testing and guardrail patterns in references/unit-testing.md.
- Sanitization: provided through the PromptInjectionGuardrail implementation example.
Audit Metadata