{
  "handle": "InputGuard",
  "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 {{fail_closed}} behaviour, rejecting the input and logging the attempt.",
  "gloss": "Input validation and sanitization",
  "failure_modes": [
    "Bypass via unexpected encoding or type coercion.",
    "Overly permissive schema allows malformed input through."
  ],
  "_meta": {
    "tier": 2,
    "ring": 0,
    "caution": "Validation boundary — bypass enables injection or unexpected state.",
    "supersedes": [
      "sema:InputGuard#mh:SHA-256:077022daa9665f3562ad8253b9b6c63ccf7e71d84b74ab48c44e6de421b8bdcb",
      "sema:InputGuard#mh:SHA-256:fb8233411dd70e49aba71650dccb3ccbf6704261d5e75d2ff0edef6990e415be",
      "sema:InputGuard#mh:SHA-256:8c3e3319216468f86dc7e8baa97d91f18110bedc30643db39f9deb2ef52a8be9",
      "sema:InputGuard#mh:SHA-256:f33c7c914e869216a9cd3dcf182648cc9363c46b40d46fc45621145c8878134b"
    ],
    "path": [
      "Infrastructure",
      "Verification"
    ]
  },
  "sema_ref": "InputGuard#0ba7",
  "sema_id": "sema:InputGuard#mh:SHA-256:0ba715e91627fa1f6759a739da0d4159cac6404c8b45b6e97910d98ef0e8a079",
  "sema_stub": "0ba7",
  "invariants": [
    "Declares the schema or constraint it enforces.",
    "Names the component it guards.",
    "No input reaches the guarded component without satisfying that constraint."
  ],
  "dependencies": {
    "references": {
      "fail_closed": "sema:FailClosed#mh:SHA-256:dfbcf50c68d036ae4f18719bf59f41eddd83b5510bd60ff1326f8854240d8066"
    }
  },
  "sema_layer": "Infrastructure",
  "sema_category": "Verification",
  "used_by": {
    "composes_with": {
      "AgentSandbox": "sema:AgentSandbox#mh:SHA-256:1594a10a882956e4b8501764091e1d5025ba0b405cce34b7ef931bb17e5c634a",
      "PromptChain": "sema:PromptChain#mh:SHA-256:02b5f2277c89d51e35336a8735f5a8bf26304332db887961bb23790c8c82b2f9",
      "ToolInvoke": "sema:ToolInvoke#mh:SHA-256:1096039316801cc8ef6e2855a6300574bb8596bb8e57c2764fd3bee741fa217e"
    },
    "references": {
      "DataMinimization": "sema:DataMinimization#mh:SHA-256:e8c8cd89b8e187d501000746c5216fef9ea41558a20fde07372881a2948994eb",
      "HackDetect": "sema:HackDetect#mh:SHA-256:17781b110b307b405fa83ece40419c64370baa612d923b1e513392893fcaacba"
    }
  }
}
