Pcornel
Automation · Validation

Input Validation

Cheat sheet · https://pcornel.dk/topic.php?topic=5914

Back to the Topic

Answer

Input Validation rejects malformed, out-of-range, ambiguous or unauthorized automation inputs before they can influence control flow or target state.

Remember

  • Input parsed ≠ input semantically valid.
  • Type-valid input ≠ authorized input.
  • Default applied ≠ caller intent preserved.
  • Sanitized input ≠ safe downstream command or query automatically.

First checks

  • Schema/type checks on inputs — structure
  • Allowlists and ranges — values
  • Reject unknown fields — strictness

Commands

jq empty <input.json>
Read-only/validation observation for whether the selected JSON document is syntactically parseable.

Verify in this order

input → validation → accept/reject

Where it usually breaks

Input Validation proves conformity to the declared input contract only; downstream authorization, command safety, target capability and workload outcome require separate evidence.

Input Validation validation proof-boundary map

BoundaryHealthy evidenceSuspicious evidence
Criteria / inputCriteria, source revision, validator and exact target identity are explicitA generic pass exists without versioned criteria or target correlation
Preconditions / operationCurrent authoritative facts are bound to the exact operationStale preflight or requested state substitutes for execution-time facts
Effective outcomeAuthoritative state/read-back and service-relevant evidence match the expected resultTool/test/validator success substitutes for effective target or workload proof
Limits / next actionCoverage limits, unknowns and failures drive the next narrower checkUnknown evidence becomes pass, retries hide failures or broad success is inferred from one check

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5914

Confirmation

Confirm action

Continue?