minimal-api-file-upload

Pass

Audited by Gen Agent Trust Hub on Sep 14, 2026

Risk Level: SAFEINDIRECT_PROMPT_INJECTION
Full Analysis
  • Indirect Prompt Injection Surface: The skill provides instructions for building endpoints that ingest external data via file uploads. This represents a potential surface for indirect prompt injection or file-based attacks if an agent later processes the content of these files without sufficient isolation.
  • Ingestion Points: Data enters the application context through IFormFile in Step 1 and MultipartReader in Step 5.
  • Capabilities: The instructions utilize file system capabilities, including Directory.CreateDirectory and File.Create in Steps 4 and 5.
  • Sanitization Patterns: The skill proactively addresses common vulnerabilities by providing patterns for file signature (magic byte) validation, Content-Type verification, and safe filename generation using Guid.NewGuid() to prevent path traversal in Step 4.
  • Boundary Markers: While the code includes validation logic to verify file integrity, it does not explicitly define prompt-level boundaries or "ignore embedded instructions" warnings for the AI agent itself, which is a standard consideration for agent-facing file processing.
Audit Metadata
Risk Level
SAFE
Analyzed
Sep 14, 2026, 07:06 PM
Security Audit — agent-trust-hub — minimal-api-file-upload