file-upload-handling
Pass
Audited by Gen Agent Trust Hub on Sep 16, 2026
Risk Level: SAFEINDIRECT_PROMPT_INJECTION
Full Analysis
- [INDIRECT_PROMPT_INJECTION]: The skill is designed to handle untrusted user data via file uploads, which is a primary vector for indirect prompt injection. However, the provided implementations include robust security controls to mitigate this risk.
- Ingestion points: File upload endpoints defined in
references/fastapi-file-upload.md,references/pythonflask-file-upload.md, andreferences/nodejs-express-file-upload-with-multer.mdaccept binary and text data from users. - Boundary markers: The skill demonstrates the use of extension whitelists (
ALLOWED_EXTENSIONS) and MIME type verification to restrict the type of content the system processes. - Capability inventory: The skill includes code for writing to the local file system (
aiofiles,multer.diskStorage) and uploading to cloud storage (boto3). - Sanitization: The templates prioritize security by using randomized hashes for filenames to prevent directory traversal and overwriting existing files. The Flask example specifically utilizes
secure_filenameandsafe_jointo ensure file paths remain within the intended directory. - [EXTERNAL_DOWNLOADS]: The skill references standard, well-known libraries for file handling and web development. These include
fastapi,aiofiles, andboto3for Python, andmulterfor Node.js. All dependencies are standard industry tools for the described tasks.
Audit Metadata