Skip to main content

validate-untrusted-input

Validate untrusted input at a system boundary with explicit schemas, limits, normalization, and safe errors. Use when user, file, network, or integration data enters trusted application logic.

Datos de origen

Repositorio
protosphinx/sphinxstack
Última actividad en el origen
29 de julio de 2026 a las 13:55
Idioma detectado de SKILL.md
inglés
Estrellas
3
Forks
0

Opciones de instalación

De forma predeterminada está seleccionado el prompt que primero revisa el origen. Puedes cambiar a un comando directo o descargar una copia local.

Revisa los archivos de origen

Lee SKILL.md y los archivos complementarios que muestra SkillsMP antes de decidir si quieres instalarlo.

Explorador de archivos
2 archivos

Mostrando SKILL.md

SKILL.md
Instrucciones de origen · Vista previa de solo lectura
name
validate-untrusted-input
category
code
description
Validate untrusted input at a system boundary with explicit schemas, limits, normalization, and safe errors. Use when user, file, network, or integration data enters trusted application logic.
# validate-untrusted-input Accept only data the application can safely understand and process within bounded resources. ## Procedure 1. Map every input boundary and the downstream operation it can influence. 2. Define an allowlist schema for fields, types, formats, ranges, lengths, counts, and nesting depth. 3. Decide explicitly whether each representation is rejected, normalized, or preserved. 4. Decode and canonicalize once before validation, accounting for Unicode, encodings, paths, and identifiers. 5. Enforce validation on the trusted server boundary even when the client also validates. 6. Return stable field-level errors without echoing secrets or unsafe raw values. 7. Test missing, extra, null, boundary, oversized, malformed, ambiguous, and adversarial values. 8. Record rejected-input metrics by rule without logging sensitive payloads. ## Guardrails - Validation is not output encoding, authorization, parameterized querying, or malware scanning. - Never rely on a denylist as the primary definition of valid input. - Bound parsing work before allocating large memory or performing expensive transformations. ## Done - A versioned input schema and normalization policy are documented - Boundary, fuzz, and resource-limit tests are verified - Rejection metrics and safe error responses are recorded without sensitive values
Ver en GitHub