Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计异常

file-upload文件上传

Agent Skill

file-upload 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

282

周安装

12

GitHub Stars

9

下载量

99
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:file-upload(文件上传)
来源仓库:https://github.com/florianbuetow/claude-code
仓库路径:skills/file-upload
安装命令:
npx skills add https://github.com/florianbuetow/claude-code --skill file-upload
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/florianbuetow/claude-code --skill file-upload

简介

用于查找、检索和筛选相关信息。file-upload 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

  • 适合根据关键词快速定位候选结果。
  • 可结合来源仓库继续核验具体用法。
  • 安装前建议确认权限和维护状态。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 注意是否会触发联网或文件读写。

SKILL.md

File Upload Security (UPLD)

Analyze source code for file upload vulnerabilities including client-only validation, missing content-type verification, no magic byte checking, path traversal in filenames, upload to webroot with execution, and zip slip (archive extraction path traversal). Insecure file uploads can lead to remote code execution, denial of service, and data exfiltration.

Supported Flags

Read ../../shared/schemas/flags.md for the full flag specification. This skill supports all cross-cutting flags. Key flags for this skill:

  • --scope determines which files to analyze (default: changed)
  • --depth standard reads code and checks upload handlers
  • --depth deep traces file paths from upload through storage to serving
  • --severity filters output (upload issues are often critical or high)

Framework Context

Key CWEs in scope:

  • CWE-434: Unrestricted Upload of File with Dangerous Type
  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory
  • CWE-79: Cross-Site Scripting (via uploaded HTML/SVG)
  • CWE-400: Uncontrolled Resource Consumption (via file size)
  • CWE-611: Improper Restriction of XML External Entity Reference (via uploaded XML)

Detection Patterns

Read references/detection-patterns.md for the full catalog of code patterns, search heuristics, language-specific examples, and false positive guidance.

Workflow

1. Determine Scope

Parse flags and resolve the file list per ../../shared/schemas/flags.md. Filter to files likely to contain upload logic:

  • Upload handlers (**/upload/**, **/uploads/**, **/attachments/**)
  • File processing (**/files/**, **/media/**, **/storage/**)
  • Multipart form handling (**/middleware/**, **/controllers/**)
  • Archive extraction (**/extract/**, **/unzip/**, **/import/**)
  • Frontend validation (**/components/**, **/views/**)

2. Check for Available Scanners

Detect scanners per ../../shared/schemas/scanners.md:

  1. semgrep -- primary scanner for upload patterns
  2. bandit -- Python file handling issues
  3. brakeman -- Rails file upload vulnerabilities

Record which scanners are available and which are missing.

3. Run Scanners (If Available)

If semgrep is available, run with rules targeting upload security:

semgrep scan --config auto --json --quiet <target>

Filter results to rules matching file upload, path traversal, and content-type patterns. Normalize output to the findings schema.

4. Claude Code Analysis

Regardless of scanner availability, perform manual code analysis:

  1. Client-only validation: Find client-side file type checks (HTML accept attribute, JavaScript validation) without corresponding server-side checks.
  2. Content-type verification: Check upload handlers verify Content-Type against an allowlist and do not trust the client-provided value alone.
  3. Magic byte validation: Verify upload handlers check file magic bytes (file signatures) to confirm the file type matches the claimed type.
  4. Path traversal in filename: Find places where the original filename is used in file path construction without sanitization.
  5. Upload to webroot: Check whether uploaded files are stored in web-accessible directories where they could be executed.
  6. Archive extraction: Find zip/tar extraction code and verify paths are validated to prevent directory traversal (zip slip).

When --depth deep, additionally trace:

  • Full file path from upload to storage to serving
  • File serving configuration (static file handlers, CDN configuration)
  • Archive extraction to final storage location

5. Report Findings

Format output per ../../shared/schemas/findings.md using the UPLD prefix (e.g., UPLD-001, UPLD-002).

Include for each finding:

  • Severity and confidence
  • Exact file location with code snippet
  • Attack scenario (what malicious file could achieve)
  • Concrete fix with diff when possible
  • CWE and OWASP references

What to Look For

These are the high-signal patterns specific to file upload security. Each maps to a detection pattern in references/detection-patterns.md.

  1. Client-only file type validation -- HTML accept attribute or JavaScript checks without server-side enforcement.
  2. Missing content-type verification -- Upload handler accepts any file type or trusts the client-provided Content-Type header.
  3. No magic byte validation -- File type determined solely by extension or Content-Type, not by reading the file header bytes.
  4. Path traversal in filename -- Original filename used in path construction (e.g., ../../../etc/passwd) without sanitization.
  5. Upload to executable directory -- Files stored in webroot where a server could execute uploaded scripts (.php, .jsp, .py).
  6. Zip slip vulnerability -- Archive extraction writes files outside the intended directory via ../ entries in archive member paths.
  7. Missing file size limit -- No server-side limit on upload size, enabling denial of service via large files.
  8. Dangerous file types allowed -- No blocklist for executable file types (.exe, .sh, .php, .jsp, .py).

Scanner Integration

ScannerCoverageCommand
semgrepPath traversal, unrestricted upload, zip slipsemgrep scan --config auto --json --quiet <target>
banditPython file handling, path traversalbandit -r <target> -f json -q
brakemanRails file upload, content typebrakeman -q -f json -o /dev/stdout

Fallback (no scanner): Use Grep with patterns from references/detection-patterns.md to find upload handlers, filename usage, archive extraction, and content-type checks. Report findings with confidence: medium.

Output Format

Use the findings schema from ../../shared/schemas/findings.md.

  • ID prefix: UPLD (e.g., UPLD-001)
  • metadata.tool: file-upload
  • metadata.framework: specialized
  • metadata.category: UPLD
  • references.cwe: CWE-434, CWE-22
  • references.owasp: A04:2021 (Insecure Design)
  • references.stride: T (Tampering) or E (Elevation of Privilege)

Severity guidance for this category:

  • critical: Upload to webroot with execution, zip slip to sensitive directories, no validation at all
  • high: Missing server-side type validation, path traversal in filename, dangerous types allowed
  • medium: Client-only validation, missing magic bytes check, no file size limit
  • low: Overly permissive allowlist, missing secondary validation layer

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.38%
按下载量换算34

Claude

30.9%
按下载量换算31

Cursor

20.8%
按下载量换算21

Gemini CLI

9.7%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills