Skip to main content

input-validation

Use when: validate and sanitize untrusted input at boundaries to prevent bad data and attacks.

Source facts

Repository
kimtth/agent-skill-100-lines-or-less
Last source activity
June 26, 2026 at 02:15
Detected SKILL.md language
English
Stars
2
Forks
0

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
input-validation
description
Use when: validate and sanitize untrusted input at boundaries to prevent bad data and attacks.
Goal: reject or normalize untrusted input before it reaches logic. Use for: - handling user input, request bodies, and external data - preventing injection and corrupt-state bugs - defining a schema and rules at the boundary Workflow: 1. Validate at the trust boundary, as early as possible. 2. Use an allowlist: accept known-good, reject the rest. 3. Check type, range, format, and length explicitly. 4. Normalize encoding before validating to avoid bypasses. 5. Return clear, specific validation errors. 6. Encode output for its destination context separately. Patterns: - schema validation for structured payloads - allowlist over blocklist - parse into typed values, do not pass raw strings around - separate validation from business logic Rules: - never trust input; validate every external boundary - prefer allowlists; blocklists miss cases - validation is not a substitute for parameterized queries/encoding - fail with specific, non-leaky error messages
View on GitHub