Skip to main content

input-validation-and-sanitization

Use this skill when implementing any endpoint, form handler, CLI tool, or function that accepts external input. Validate and sanitize all untrusted data before processing — never assume input is safe.

소스 정보

저장소
aiming-lab/MetaClaw
최근 소스 활동
2026년 3월 10일 18:04
감지된 SKILL.md 언어
영어
스타
3,456
포크
450

설치 방법

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

소스 파일 검토

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

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
input-validation-and-sanitization
description
Use this skill when implementing any endpoint, form handler, CLI tool, or function that accepts external input. Validate and sanitize all untrusted data before processing — never assume input is safe.
category
security
# Input Validation and Sanitization **Validation principles:** - Validate at the system boundary (API layer, form handler) — not deep in business logic. - Validate type, range, length, and format explicitly. - Reject unexpected input by default (allowlist > denylist). **SQL injection prevention:** Always use parameterized queries or an ORM. **XSS prevention:** Escape HTML output; use Content-Security-Policy headers; avoid `innerHTML` with user data. **Path traversal prevention:** Resolve paths to canonical form and verify they are under the expected directory. ```python import os base = '/allowed/dir' canonical = os.path.realpath(os.path.join(base, user_input)) assert canonical.startswith(base + os.sep) ```
GitHub에서 보기