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" and onDrop event listeners to receive user files in examples/core.md.\n
  • Boundary markers: The SKILL.md file 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 XMLHttpRequest and fetch (in examples/progress.md and examples/resumable.md), and persistence of upload metadata in localStorage for resumption logic.\n
  • Sanitization: It recommends server-side filename sanitization using regular expressions in examples/presigned-upload.md to prevent path traversal or other injection attacks.
Audit Metadata
Risk Level
SAFE
Analyzed
Nov 4, 2026, 01:04 PM