file-upload

file-upload is a skill for Claude Code, Codex from emre-guler/websec. It costs 67 tokens per session (5,708 once invoked), scanned A, original, MIT.

A security review for file-upload features, where users send documents, images, archives, or other files to an application. It checks how uploads are accepted, named, stored, and later served.

In plain words
What is it for?
Use it to review multipart upload handlers, URL-based imports, archive imports, storage paths, file names, size limits, and the settings that serve uploaded files.
Why use it?
It helps find cases where an attacker could upload executable code, place files in unintended locations, run scripts in the server, show harmful content to other users, or exhaust storage and processing resources.

Skill for Claude CodeCodex

Part of the websec plugin — 36 skills, 2 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/emre-guler/websec/file-upload
Any agent
npx skills add emre-guler/websec --skill file-upload
Clone the repo
git clone --depth 1 https://github.com/emre-guler/websec

Made for: Claude Code, Codex.

Or install websec, the plugin that ships this one along with the rest of its 36 skills, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for file-upload

README.md
[![agentmods](https://agentmods.dev/badge/skills/emre-guler/websec/file-upload.svg)](https://agentmods.dev/skills/emre-guler/websec/file-upload)
Your own site
<a href="https://agentmods.dev/skills/emre-guler/websec/file-upload"><img src="https://agentmods.dev/badge/skills/emre-guler/websec/file-upload.svg" alt="Measured on agentmods" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,708 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00067 $0.05708
Opus 5 $0.00034 $0.02854
Sonnet 5 $0.00013 $0.01142
Haiku 4.5 $0.00007 $0.00571

Measured 3d ago against content hash 021283c5fe3e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

file-upload scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/file-upload/SKILL.md · 170 lines

How it starts

The opening of the file, as written. The whole thing — 170 lines — stays where its author put it; the contents beside it link to each section on GitHub.

File Upload Detection

Overview

File upload flaws arise when an application accepts a file from a user but does not sufficiently constrain its type, name, contents, or size, and then stores or serves it somewhere that gives the file power it should not have. The flaw sits across three linked points in the request lifecycle: the handler that parses the multipart body or fetches the file, the code that decides the storage path and name, and the configuration that determines how the stored file is later served. The attacker is a remote user, often unauthenticated, who submits a crafted file. In the worst case a file the server will interpret lands in a location the server executes, giving remote code execution and full compromise; short of that, an inline-served document yields stored cross-site scripting against every viewer, a traversal in the name places a file anywhere writable, and an oversized or highly compressible file exhausts resources. This skill finds such flaws by locating every upload and storage site, checking each site in parallel, and merging the results into <output_dir>/file-upload-results.md.

What it is NOT

  • Path traversal (/websec:path-traversal): a traversal sequence in an uploaded name is an upload attack technique and belongs here when the fix is to stop deriving the destination from the name. Test: would the file still be dangerous if it landed exactly where the developer intended? If yes, it is an upload flaw; if the whole problem is the destination escaping the directory, that skill may own it and either home is defensible — pick one and say why.
  • Server-side request forgery (/websec:ssrf): a "fetch from URL" import is that skill's finding when the flaw is the server reaching an attacker-chosen destination. It is this skill's when the flaw is what happens to the retrieved bytes afterwards. The same endpoint can produce one of each.
  • Cross-site scripting (/websec:xss): an uploaded document that runs script in viewers' browsers is stored scripting delivered through upload. Report it here when the missing control is upload-side (type allow-list, disposition, sniffing protection); note it for that skill when the missing control is output encoding elsewhere.
  • Operating system command injection (/websec:os-command-injection): an uploaded interpreted file gives command execution, but the flaw is the upload pipeline, not a shell-invoking sink. That skill owns handlers that pass a filename or file contents into a shell command.
  • Race conditions (/websec:race-conditions): a non-atomic validate-then-store window is listed here as a variant because it is specific to upload pipelines. A general concurrency flaw in unrelated business state belongs to that skill.
  • Deserialization (/websec:deserialization): an uploaded file whose contents are fed to a native object deserializer is that skill's; note the upload as the delivery path.
  • Not a finding: an upload that is stored with a server-generated random name, an extension derived from a verified content type, in a location that never executes and is served with a non-interpretable content type plus an attachment disposition and sniffing protection; acceptance of a file alone, with no demonstrated execution, inline serving, traversal, or resource impact; a filename reflected into a success message with no filesystem or output consequence.

Read the full file on GitHub · 170 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 170 lines · 67 tokens per session scan A 021283c5fe3e

Subscribe to this mod's changes

file-upload is a skill published in the GitHub repository emre-guler/websec (2 stars, last pushed 6d ago), licensed MIT. It adds 67 tokens to every session and 5,708 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

vantage

Autonomous, artifact-driven SAST (Static Application Security Testing) for web AND mobile app repositories, plus optional code-level remediation. Use whenever the user asks to security-review, pentest, audit, or scan a codebase for vulnerabilities — web (SQLi, XSS, IDOR/BOLA, auth bypass, SSRF, XXE, hardcoded secrets…

tinoimammp/vantage-security-agent · 230 tokens

prowler-ui

Prowler UI-specific patterns. For generic patterns, see: typescript, react-19, nextjs-16, tailwind-4. Trigger: When working inside ui/ on Prowler-specific conventions (shadcn, folder placement, actions/adapters, shared types/hooks/lib).

prowler-cloud/prowler · 64 tokens

prowler-pr

Creates Pull Requests for Prowler following the project template and conventions. Trigger: When working on pull request requirements or creation (PR template sections, PR title Conventional Commits check, changelog gate/no-changelog label), or when inspecting PR-related GitHub workflows like conventional-commit.yml…

prowler-cloud/prowler · 84 tokens

prowler-test-api

Testing patterns for Prowler API: JSON:API, Celery tasks, RLS isolation, RBAC. Trigger: When writing tests for api/ (JSON:API requests/assertions, cross-tenant isolation, RBAC, Celery tasks, viewsets/serializers).

prowler-cloud/prowler · 62 tokens

tailwind-4

Tailwind CSS 4 patterns and best practices. Trigger: When styling with Tailwind (className, variants, cn()), especially when dynamic styling or CSS variables are involved (no var() in className).

prowler-cloud/prowler · 47 tokens

prowler-docs

Prowler documentation style guide and writing standards. Trigger: When writing documentation for Prowler features, tutorials, or guides.

prowler-cloud/prowler · 31 tokens