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.

Quellinformationen

Repository
protosphinx/sphinxstack
Letzte Quellaktivität
29. Juli 2026 um 13:55
Erkannte Sprache von SKILL.md
Englisch
Sterne
3
Forks
0

Installationsoptionen

Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.

Quelldateien prüfen

Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.

Datei-Explorer
2 Dateien

SKILL.md wird angezeigt

SKILL.md
Quellanweisungen · Schreibgeschützte Vorschau
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
Auf GitHub ansehen