file-uploads
設計安全的檔案上傳
檔案上傳可能造成安全性、效能和儲存問題。這項技能可協助 Claude、Codex 和 Claude Code 規劃更安全的上傳流程。
使用我的智慧代理安裝
將此請求複製給你的智慧代理,其中包含權威 Skill 頁面和清單。
Review the Skillstore skill "file-uploads" from https://skillstore.io/skills/sickn33-file-uploads.md and its manifest at https://skillstore.io/api/skills/sickn33-file-uploads/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智慧代理仍應顯示其計畫,並依安全政策請求必要確認。
Agent 可讀資源
當 AI Agent、爬蟲或腳本需要乾淨脈絡、而不是讀取完整頁面時,請使用這些連結。
測試它
正在使用「file-uploads」。 我需要讓使用者上傳個人資料照片,同時不讓我的伺服器過載。
預期結果:
使用預簽署 URL、強制執行較小的大小限制、驗證圖片內容、清理檔名,並在確認儲存後處理縮圖。
正在使用「file-uploads」。 我們的應用程式需要支援高達數 GB 的影片上傳。
預期結果:
使用分段上傳搭配可續傳的用戶端行為、短效上傳憑證、嚴格的物件鍵,以及針對已放棄分段的清理機制。
正在使用「file-uploads」。 我想檢查我的上傳設計是否安全。
預期結果:
審查 magic byte 驗證、大小上限規則、檔名正規化、儲存權限,以及預簽署 URL 可被分享的位置。
安全審計
安全All four static findings are false positives caused by defensive examples that explain upload threats and their mitigations. No malicious intent, system access, reconnaissance, or prompt injection was found.
風險因素
📁 檔案系統存取 (1)
分享與引用此報告
分享版本化評估報告、中性徽章、嵌入卡片與引用。Skillstore 只報告證據,不判斷該 Skill 是否安全。
複製報告連結
https://skillstore.io/skills/sickn33-file-uploads/audits/5?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/sickn33-file-uploads?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/sickn33-file-uploads?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/sickn33-file-uploads/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/sickn33-file-uploads.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>學術引用 (APA · BibTeX · CFF)
APA 引用
sickn33. (2026). file-uploads security audit report (audit version 5) [Author version unspecified]. Skillstore. https://skillstore.io/skills/sickn33-file-uploads/audits/5BibTeX 引用
@techreport{sickn33-sickn33-file-uploads-2026,
author = {sickn33},
title = {file-uploads security audit report (audit version 5)},
institution = {Skillstore},
year = {2026},
number = {5},
url = {https://skillstore.io/skills/sickn33-file-uploads/audits/5},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "file-uploads security audit report (audit version 5)"
version: "unspecified"
type: report
authors:
- name: "sickn33"
date-released: "2026-07-23"
url: "https://skillstore.io/skills/sickn33-file-uploads/audits/5"
identifiers:
- type: other
value: "skillstore:sickn33-file-uploads:audit:5"
description: "Skillstore immutable audit report identifier"
Skillstore 評分
評分依據 證據置信度: 高你可以打造什麼
規劃直接上傳至儲存空間的流程
設計預簽署 URL 流程,讓大型上傳不經過應用程式伺服器。
審查上傳安全控制
檢查檔案類型驗證、大小限制、檔名處理,以及預簽署 URL 發放風險。
改善媒體上傳效能
為包含大型或頻繁媒體檔案的應用程式規劃分段上傳和圖片最佳化。
試試這些提示
協助我為我的應用程式選擇安全的檔案上傳架構。比較伺服器代理上傳和預簽署 URL 上傳。
審查這個上傳設計是否存在安全缺口。重點放在檔案類型驗證、大小限制、檔名,以及預簽署 URL 暴露。
使用分段上傳設計大型檔案上傳流程。包含重試行為、進度追蹤、清理和儲存限制。
針對此上傳工作流程比較 S3 和 Cloudflare R2。包含預簽署 URL、分段行為、圖片最佳化和安全控制。
最佳實務
- 使用 magic bytes 驗證檔案內容,而不是信任副檔名。
- 針對未完成的上傳使用嚴格的上傳大小限制和清理規則。
- 偏好使用短效、具狹窄權限範圍的預簽署 URL。
避免
- 信任用戶端提供的檔名或檔案類型。
- 在沒有必要的情況下,透過應用程式伺服器代理大型上傳。
- 在預期的使用者和時間範圍之外快取或分享預簽署 URL。