fastapi-ai-scaffold

Pass

Audited by Gen Agent Trust Hub on Sep 4, 2026

Risk Level: SAFEINDIRECT_PROMPT_INJECTIONCOMMAND_EXECUTION
Full Analysis
  • [INDIRECT_PROMPT_INJECTION]: The scaffolded application processes untrusted user data through an LLM, creating a vulnerability surface for indirect prompt injection.\n
  • Ingestion points: User messages are ingested via the PredictIn and ChatIn schemas in the generated app/api/v1/inference.py.tmpl file.\n
  • Boundary markers: The validate_with_retry function in app/ml/guardrails.py.tmpl lacks robust delimiters or explicit 'ignore' instructions when re-injecting validation errors (which may contain user-supplied content) back into the prompt for correction.\n
  • Capability inventory: The generated service utilizes SQLModel for database access, httpx.AsyncClient for external API calls, and local file access for model loading.\n
  • Sanitization: Input length and content existence checks are implemented in app/ml/guardrails.py.tmpl via the check_input function.\n- [COMMAND_EXECUTION]: The skill provides a project generation script (scripts/new-fastapi-ai-service.sh) that executes shell commands.\n
  • Evidence: The script uses mkdir, cp, and sed to build the target project structure. It implements slug sanitization to mitigate command injection risks into sed, but it facilitates the execution of local shell operations during the scaffolding process.
Audit Metadata
Risk Level
SAFE
Analyzed
Sep 4, 2026, 06:53 AM
Security Audit — agent-trust-hub — fastapi-ai-scaffold