input-validation-injection

Installation
SKILL.md

Input Validation and Injection Defense

Ensure untrusted input is validated and never interpreted as code. Prevent injection across SQL, LDAP, OS commands, templating, and JavaScript runtime object graphs.

Core Strategy

  • Validate early at trust boundaries with positive (allow-list) validation and canonicalization.
  • Treat all untrusted input as data, never as code. Use safe APIs that separate code from data.
  • Parameterize queries/commands; escape only as last resort and context-specific.

Validation Playbook

  • Syntactic validation: enforce format, type, ranges, and lengths for each field.
  • Semantic validation: enforce business rules (e.g., start <= end date, enum allow-lists).
  • Normalization: canonicalize encodings before validation; validate complete strings (regex anchors ^$); beware ReDoS.
  • Free-form text: define character class allow-lists; normalize Unicode; set length bounds.
  • Files: validate by content type (magic), size caps, and safe extensions; server-generate filenames; scan; store outside web root.

SQL Injection Prevention

Installs
2
GitHub Stars
52
First Seen
Jul 18, 2026
input-validation-injection — redhatproductsecurity/prodsec-skills