Install any skill in seconds. Free to start, no credit card required.
Get Started Free →utkusen/sast-fileupload
Detect insecure file upload vulnerabilities in a codebase using a three-phase approach: discovery (find all upload sites), batched verify (check extension bypass and related issues in parallel subagents, 3 sites each), and merge (consolidate batch results). Requires sast/architecture.md (run sast-analysis first). Outputs findings to sast/fileupload-results.md.
Passed 11 of 18 test cases with the skill, and 12 of 18 without it.
2 fixed12 passed either way5 still failing3 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
During Phase 1 discovery of a static security assessment, no user file upload routes or multipart form ingestion routines were found in the target codebase. How should Phase 2 and Phase 3 of the file upload assessment proceed?
| Checked | Without skill | With skill |
|---|---|---|
| specifies skipping Phase 2 verification when zero upload sites are discovered | Missed | Passed |
| specifies writing a zero sites summary directly to sast/fileupload-results.md | Missed | Passed |
The instructions your model reads when the skill loads.
You are performing a focused security assessment to find insecure file upload vulnerabilities in a codebase. This skill uses a three-phase approach with subagents: discovery (find all places where uploaded files are received and stored), batched verify (check bypass vectors in parallel batches of up to 3 upload sites each), and merge (consolidate batch reports into one results file).
Prerequisites: sast/architecture.md must exist. Run the analysis skill first if it doesn't.
Insecure file upload occurs when an application accepts files from users without properly validating or restricting what can be uploaded, allowing an attacker to upload executable or malicious files. The most critical outcome is Remote Code Execution (RCE): an attacker uploads a web shell (e.g., a .php file) and the server executes it when accessed via a direct URL.
The core pattern: a user-supplied file reaches a storage location without adequate extension validation, and the stored file is accessible or executable.
file.save(upload_path) with no validationContent-Type: image/png without verifying the actual extension or file content — trivially bypassed by setting the header manually.php is blocked but .php3, .php4, .php5, .phtml, .phar, .shtml are not.php but allowing .PHP, .Php, .pHpshell.php.jpg — code extracts the last .jpg and considers it safe, but the server (Apache) serves it as PHP../../webroot/shell.php stored via an unsanitized filename../ but not encoded variants %2e%2e%2fDo not flag these as file upload vulnerabilities:
<script> that is reflected back — that's XSS, not an upload execution issueContent-Disposition: attachment, or stored in an object storage bucket with no public execution capabilityWhen you see these patterns together, the code is likely not vulnerable:
1. Allowlist of safe extensions (most important)
test cases passed, vs 12 / 18 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.