Skip to content
Back to skills

Forge File Uploads

ASecurity

Handle file uploads safely: size and type limits, direct-to-storage uploads, malware and path safety, and cleanup

  • 7 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 30, 2026
ai-agentsrust

Works with

  • cli

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add ansh44233/forge --skill forge-file-uploads --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Forge File Uploads?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Forge File Uploads
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ansh44233-forge-file-uploads/badge)](https://www.skillsdirectory.com/skills/ansh44233-forge-file-uploads)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: forge-file-uploads
description: "Handle file uploads safely: size and type limits, direct-to-storage uploads, malware and path safety, and cleanup"
---

<!-- Generated from catalog/skills/file-uploads/SKILL.md by scripts/build-plugin.ts. Edit the catalog, not this file. -->

# File uploads

Uploads are untrusted input that is also large.

## Limits and validation
- Enforce a max size at the proxy and the app; reject before buffering the whole file.
- Check type by content (magic bytes), not by extension or `Content-Type` alone; allow-list types.
- Generate the stored file name yourself; never use the client name in a filesystem path.

## Architecture
- Prefer direct-to-storage uploads with short-lived presigned URLs; the app only records metadata.
- Serve user files from a separate domain or with `Content-Disposition: attachment` to avoid stored XSS.
- Images: strip EXIF metadata; generate resized variants asynchronously.

## Lifecycle
- Scan with antivirus where the risk warrants it; quarantine until scanned.
- Delete orphaned uploads (abandoned forms) with a lifecycle rule or job.

## Verify
Tests cover an oversized file, a disguised file (e.g. HTML renamed `.png`), and a path-traversal name (`../../x`); all are rejected.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.