web-files-file-upload-patterns
Pass
Audited by Gen Agent Trust Hub on Nov 4, 2026
Risk Level: SAFEINDIRECT_PROMPT_INJECTION
Full Analysis
- [SAFE]: The skill contains comprehensive documentation and code samples for implementing file upload features in web applications using React and TypeScript. Patterns include accessible dropzones, progress bars, and image preview logic with proper resource management, such as revoking object URLs to prevent memory leaks.\n- [SAFE]: The instructions emphasize security best practices, explicitly stating that client-side validation is for user experience only and that all checks must be repeated on the server. It provides specific patterns for magic-byte verification to detect renamed malicious files.\n- [INDIRECT_PROMPT_INJECTION]: The skill defines an interface for handling external, untrusted data via browser file inputs and drag-and-drop events.\n
- Ingestion points: The skill utilizes
input type="file"andonDropevent listeners to receive user files inexamples/core.md.\n - Boundary markers: The
SKILL.mdfile contains a dedicated 'Before writing upload code' section that warns against trusting client-side metadata and provides specific instruction to validate on the server.\n - Capability inventory: The skill demonstrates network operations via
XMLHttpRequestandfetch(inexamples/progress.mdandexamples/resumable.md), and persistence of upload metadata inlocalStoragefor resumption logic.\n - Sanitization: It recommends server-side filename sanitization using regular expressions in
examples/presigned-upload.mdto prevent path traversal or other injection attacks.
Audit Metadata