Skip to main content

secure-file-uploads

Secure file uploads through strict acceptance rules, isolated storage, content inspection, and authorized delivery. Use when users or integrations can place files into an application.

소스 정보

저장소
protosphinx/sphinxstack
최근 소스 활동
2026년 7월 29일 13:55
감지된 SKILL.md 언어
영어
스타
3
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
2 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
secure-file-uploads
category
code
description
Secure file uploads through strict acceptance rules, isolated storage, content inspection, and authorized delivery. Use when users or integrations can place files into an application.
# secure-file-uploads Treat every uploaded byte and filename as untrusted, including files from authenticated users. ## Procedure 1. Define allowed business uses, file categories, sizes, counts, owners, retention, and download audiences. 2. Enforce request and decompressed-size limits before expensive parsing or storage. 3. Check extension, declared type, file signature, and parseability against an allowlist. 4. Generate an internal identifier and store outside executable or public application paths. 5. Quarantine new files until malware, archive, and content-policy checks complete. 6. Transform images or documents to a safe canonical representation when the product permits it. 7. Serve downloads through an authorization check with safe disposition, type, and filename headers. 8. Record upload, scan, access, rejection, retention, and deletion events with minimal metadata. 9. Test polyglots, traversal names, duplicate names, malformed files, bombs, scanner outage, and cross-user access. 10. Provide a retry or appeal path for safe files rejected by uncertain inspection. ## Guardrails - Never trust a browser-provided filename or MIME type. - Do not expose quarantined storage through a predictable URL. - A malware scan does not replace type validation, authorization, or resource bounds. ## Done - An upload acceptance and retention policy is documented - Adversarial, outage, and cross-account tests are verified - Stored, quarantined, served, and deleted file records reconcile
GitHub에서 보기