---
library: "bootstrap"
slug: "InputGuard"
name: "InputGuard"
ref: "InputGuard#0ba7"
hash: "sema:InputGuard#mh:SHA-256:0ba715e91627fa1f6759a739da0d4159cac6404c8b45b6e97910d98ef0e8a079"
type: "Verification"
layer: "Infrastructure"
version: "0.11.0"
root: "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5"
license: null
url: "https://semahash.org/vocabularies/bootstrap/patterns/InputGuard"
---

# InputGuard

Input validation and sanitization

Infrastructure · Verification

## Mechanism

A validation filter that sanitizes inputs before they reach a sensitive component. It enforces schema compliance, type safety, and constraint satisfaction. On violation it applies [FailClosed](https://semahash.org/vocabularies/bootstrap/patterns/FailClosed.md) behaviour, rejecting the input and logging the attempt.

## Invariants

- Declares the schema or constraint it enforces.
- Names the component it guards.
- No input reaches the guarded component without satisfying that constraint.

## Failure modes

- Bypass via unexpected encoding or type coercion.
- Overly permissive schema allows malformed input through.

## Caution

Validation boundary — bypass enables injection or unexpected state.

## Where this came from

—

## Builds on

- [FailClosed](https://semahash.org/vocabularies/bootstrap/patterns/FailClosed.md) (references)

## Used by

- [AgentSandbox](https://semahash.org/vocabularies/bootstrap/patterns/AgentSandbox.md) (composes_with)
- [DataMinimization](https://semahash.org/vocabularies/bootstrap/patterns/DataMinimization.md) (references)
- [HackDetect](https://semahash.org/vocabularies/bootstrap/patterns/HackDetect.md) (references)
- [PromptChain](https://semahash.org/vocabularies/bootstrap/patterns/PromptChain.md) (composes_with)
- [ToolInvoke](https://semahash.org/vocabularies/bootstrap/patterns/ToolInvoke.md) (composes_with)

## Identity

- Library: bootstrap 0.11.0 (root a6a3d1ff0f98)
- Ref: InputGuard#0ba7
- Hash: sema:InputGuard#mh:SHA-256:0ba715e91627fa1f6759a739da0d4159cac6404c8b45b6e97910d98ef0e8a079

## Links

- Page: https://semahash.org/vocabularies/bootstrap/patterns/InputGuard
- JSON: https://semahash.org/vocabularies/bootstrap/patterns/InputGuard.json
- Library: https://semahash.org/vocabularies/bootstrap
- Library index: https://semahash.org/vocabularies/bootstrap/index.json
