instructor
Pass
Audited by Gen Agent Trust Hub on Sep 30, 2026
Risk Level: SAFEINDIRECT_PROMPT_INJECTION
Full Analysis
- [SAFE]: The skill is an educational resource for the 'instructor' library, a well-known open-source tool. The documentation and scripts focus on reliable data extraction and validation.
- Dependency management: All listed dependencies (instructor, pydantic, openai, anthropic) are standard, well-maintained libraries in the AI development ecosystem.
- Secret Management: The skill correctly uses placeholders like 'your-api-key' in code snippets, preventing the accidental exposure of sensitive credentials.
- [INDIRECT_PROMPT_INJECTION]: The skill facilitates the processing of potentially untrusted data from LLM outputs, which is a common attack surface for indirect prompt injection.
- Ingestion points: Code examples in
SKILL.mdandreferences/examples.mddemonstrate passing user-provided or external text (e.g., articles, reviews) to LLMs via theinstructorclient. - Boundary markers: The library uses Pydantic
response_modelschemas to define strict boundaries for the LLM's response format, which limits the effectiveness of unstructured injections. - Capability inventory: The demonstrated capabilities are limited to network requests to LLM provider APIs (OpenAI and Anthropic). There are no examples showing unsafe operations like writing to the filesystem or executing shell commands based on the extracted data.
- Sanitization: The skill extensively demonstrates how to use Pydantic's built-in and custom validators (e.g.,
field_validator,EmailStr,HttpUrl) to filter and sanitize LLM outputs before they are used in the application, which serves as a mitigation against malicious or malformed content.
Audit Metadata