{
  "x402Version": 2,
  "id": 36454,
  "slug": "36454",
  "resource": "https://shellpermit.schemasure.com/v1/guard/shell",
  "description": "Decide whether an agent-authored bash command complies with an execution policy, using a real shell tokenizer rather than pattern matching. Catches recursive deletes, force pushes, cluster and infrastructure teardown, raw device writes, path escapes, privilege escalation, and curl-piped-to-shell through pipelines, substitutions, quoting games and base64. Returns reason codes with spans and an optional short-lived permit bound to the exact canonical command. Never executes anything.",
  "type": "http",
  "serviceName": "ShellPermit",
  "resourceType": "Security",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x9876af0F6D8Ed5155Cd02d1ca56D128601612690",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "30000",
      "amountUsd": 0.03,
      "maxTimeoutSeconds": 60
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "properties": {
          "confidence": {
            "type": "number"
          },
          "evidence": {
            "items": {
              "properties": {
                "code": {
                  "description": "Stable reason code, e.g. REMOTE_CODE_EXECUTION.",
                  "type": "string"
                },
                "data": {
                  "type": "object"
                },
                "detail": {
                  "type": "string"
                },
                "disposition": {
                  "description": "What this finding does to the verdict, which is a different axis from how bad it is.",
                  "enum": [
                    "block",
                    "unknown",
                    "warn",
                    "info"
                  ],
                  "type": "string"
                },
                "severity": {
                  "enum": [
                    "info",
                    "low",
                    "medium",
                    "high",
                    "critical"
                  ],
                  "type": "string"
                },
                "source": {
                  "type": "string"
                },
                "span": {
                  "properties": {
                    "end": {
                      "type": "integer"
                    },
                    "start": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              },
              "required": [
                "code",
                "severity",
                "detail",
                "disposition"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "ok": {
            "type": "boolean"
          },
          "result": {
            "properties": {
              "canonical_command": {
                "description": "What a permit binds. Every operand preserved.",
                "type": "string"
              },
              "cmd_fingerprint": {
                "description": "ADVISORY ONLY. Operands discarded; never authorize on it.",
                "type": "string"
              },
              "cmd_hash": {
                "description": "BINDING. sha256 of canonical_command.",
                "type": "string"
              },
              "permit": {
                "description": "Compact JWS, 60s TTL, one audience.",
                "type": "string"
              }
            },
            "required": [
              "canonical_command",
              "cmd_hash",
              "cmd_fingerprint"
            ],
            "type": "object"
          },
          "risk_codes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "verdict": {
            "enum": [
              "pass",
              "warn",
              "unknown",
              "block"
            ],
            "type": "string"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "ok",
          "verdict",
          "confidence",
          "risk_codes",
          "evidence",
          "result",
          "warnings"
        ],
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "input": {
          "body": {
            "audience": "executor:acme-prod-01",
            "command": "rm -rf ./dist && npm run build",
            "issue_permit": true,
            "policy": {
              "allow_destructive": true,
              "allow_network_egress": false,
              "allowed_roots": [
                "/srv/app"
              ],
              "cwd": "/srv/app"
            },
            "shell": "bash"
          },
          "bodyType": "json",
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "confidence": 1,
            "evidence": [],
            "ok": true,
            "result": {
              "canonical_command": "rm -f -r ./dist && npm run build",
              "cmd_fingerprint": "a1b2c3d4e5f60718",
              "cmd_hash": "sha256:0f4c…1c2d",
              "permit": "eyJhbGciOiJFZDI1NTE5Iiwia2lkIjoi…"
            },
            "risk_codes": [],
            "verdict": "pass",
            "warnings": [
              "cmd_fingerprint is ADVISORY and must not be used for authorization."
            ]
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "audience": {
                    "description": "Identity of the ONE executor the permit is for. Required when issue_permit is true. Wildcards are rejected.",
                    "type": "string"
                  },
                  "command": {
                    "maxLength": 32768,
                    "minLength": 1,
                    "type": "string"
                  },
                  "env": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Environment the executor will run with, used only for static expansion so that paths like \"$HOME/.cache\" can be resolved and decided rather than reported as unresolvable.",
                    "type": "object"
                  },
                  "issue_permit": {
                    "type": "boolean"
                  },
                  "policy": {
                    "additionalProperties": false,
                    "properties": {
                      "allow_destructive": {
                        "description": "Permit deletes, truncations, and overwrites. Defaults to false.",
                        "type": "boolean"
                      },
                      "allow_network_egress": {
                        "description": "Permit commands that reach the network. Defaults to false.",
                        "type": "boolean"
                      },
                      "allow_privilege_escalation": {
                        "description": "Permit sudo, su, chmod 777, chown root. Defaults to false.",
                        "type": "boolean"
                      },
                      "allowed_commands": {
                        "description": "If set, argv[0] must appear here.",
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "allowed_roots": {
                        "description": "Absolute directories the command may touch. Containment is lexical, not symlink-resolved.",
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "cwd": {
                        "description": "Absolute working directory relative operands resolve against. Defaults to the first allowed root.",
                        "type": "string"
                      },
                      "denied_commands": {
                        "description": "Always blocked, applied after allowed_commands.",
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "max_segments": {
                        "description": "Ceiling on chained segments. Defaults to 32.",
                        "minimum": 1,
                        "type": "integer"
                      },
                      "protected_branches": {
                        "description": "Branches a force push must never target. Defaults to main, master, trunk, develop, production, prod, release.",
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "timeout_ms": {
                        "description": "Execution timeout written into the permit obligations. Defaults to 120000.",
                        "minimum": 1,
                        "type": "integer"
                      }
                    },
                    "type": "object"
                  },
                  "shell": {
                    "description": "Required. Only bash is supported in v1: a permit issued under one shell's grammar and executed under another is a parser differential with a signature on it.",
                    "enum": [
                      "bash"
                    ],
                    "type": "string"
                  },
                  "subject": {
                    "description": "Opaque caller label recorded as the permit subject.",
                    "type": "string"
                  }
                },
                "required": [
                  "shell",
                  "command"
                ],
                "type": "object"
              },
              "bodyType": {
                "enum": [
                  "json",
                  "form-data",
                  "text"
                ],
                "type": "string"
              },
              "method": {
                "enum": [
                  "POST"
                ],
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method",
              "bodyType",
              "body"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "properties": {
                  "confidence": {
                    "type": "number"
                  },
                  "evidence": {
                    "items": {
                      "properties": {
                        "code": {
                          "description": "Stable reason code, e.g. REMOTE_CODE_EXECUTION.",
                          "type": "string"
                        },
                        "data": {
                          "type": "object"
                        },
                        "detail": {
                          "type": "string"
                        },
                        "disposition": {
                          "description": "What this finding does to the verdict, which is a different axis from how bad it is.",
                          "enum": [
                            "block",
                            "unknown",
                            "warn",
                            "info"
                          ],
                          "type": "string"
                        },
                        "severity": {
                          "enum": [
                            "info",
                            "low",
                            "medium",
                            "high",
                            "critical"
                          ],
                          "type": "string"
                        },
                        "source": {
                          "type": "string"
                        },
                        "span": {
                          "properties": {
                            "end": {
                              "type": "integer"
                            },
                            "start": {
                              "type": "integer"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "required": [
                        "code",
                        "severity",
                        "detail",
                        "disposition"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "ok": {
                    "type": "boolean"
                  },
                  "result": {
                    "properties": {
                      "canonical_command": {
                        "description": "What a permit binds. Every operand preserved.",
                        "type": "string"
                      },
                      "cmd_fingerprint": {
                        "description": "ADVISORY ONLY. Operands discarded; never authorize on it.",
                        "type": "string"
                      },
                      "cmd_hash": {
                        "description": "BINDING. sha256 of canonical_command.",
                        "type": "string"
                      },
                      "permit": {
                        "description": "Compact JWS, 60s TTL, one audience.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "canonical_command",
                      "cmd_hash",
                      "cmd_fingerprint"
                    ],
                    "type": "object"
                  },
                  "risk_codes": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "verdict": {
                    "enum": [
                      "pass",
                      "warn",
                      "unknown",
                      "block"
                    ],
                    "type": "string"
                  },
                  "warnings": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "ok",
                  "verdict",
                  "confidence",
                  "risk_codes",
                  "evidence",
                  "result",
                  "warnings"
                ],
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "shell",
    "bash",
    "command",
    "guard",
    "policy",
    "bazaar"
  ],
  "sourceHost": "shellpermit.schemasure.com",
  "lastUpdated": "2026-10-10T07:41:47.506Z",
  "quality": {
    "calls30d": 23,
    "uniquePayers30d": 1,
    "lastCalledAt": "2026-10-10T07:41:47.231Z"
  },
  "metadata": {
    "serviceName": "ShellPermit",
    "extensions": {
      "bazaar": {
        "info": {
          "input": {
            "body": {
              "audience": "executor:acme-prod-01",
              "command": "rm -rf ./dist && npm run build",
              "issue_permit": true,
              "policy": {
                "allow_destructive": true,
                "allow_network_egress": false,
                "allowed_roots": [
                  "/srv/app"
                ],
                "cwd": "/srv/app"
              },
              "shell": "bash"
            },
            "bodyType": "json",
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "confidence": 1,
              "evidence": [],
              "ok": true,
              "result": {
                "canonical_command": "rm -f -r ./dist && npm run build",
                "cmd_fingerprint": "a1b2c3d4e5f60718",
                "cmd_hash": "sha256:0f4c…1c2d",
                "permit": "eyJhbGciOiJFZDI1NTE5Iiwia2lkIjoi…"
              },
              "risk_codes": [],
              "verdict": "pass",
              "warnings": [
                "cmd_fingerprint is ADVISORY and must not be used for authorization."
              ]
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "audience": {
                      "description": "Identity of the ONE executor the permit is for. Required when issue_permit is true. Wildcards are rejected.",
                      "type": "string"
                    },
                    "command": {
                      "maxLength": 32768,
                      "minLength": 1,
                      "type": "string"
                    },
                    "env": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "Environment the executor will run with, used only for static expansion so that paths like \"$HOME/.cache\" can be resolved and decided rather than reported as unresolvable.",
                      "type": "object"
                    },
                    "issue_permit": {
                      "type": "boolean"
                    },
                    "policy": {
                      "additionalProperties": false,
                      "properties": {
                        "allow_destructive": {
                          "description": "Permit deletes, truncations, and overwrites. Defaults to false.",
                          "type": "boolean"
                        },
                        "allow_network_egress": {
                          "description": "Permit commands that reach the network. Defaults to false.",
                          "type": "boolean"
                        },
                        "allow_privilege_escalation": {
                          "description": "Permit sudo, su, chmod 777, chown root. Defaults to false.",
                          "type": "boolean"
                        },
                        "allowed_commands": {
                          "description": "If set, argv[0] must appear here.",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "allowed_roots": {
                          "description": "Absolute directories the command may touch. Containment is lexical, not symlink-resolved.",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "cwd": {
                          "description": "Absolute working directory relative operands resolve against. Defaults to the first allowed root.",
                          "type": "string"
                        },
                        "denied_commands": {
                          "description": "Always blocked, applied after allowed_commands.",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "max_segments": {
                          "description": "Ceiling on chained segments. Defaults to 32.",
                          "minimum": 1,
                          "type": "integer"
                        },
                        "protected_branches": {
                          "description": "Branches a force push must never target. Defaults to main, master, trunk, develop, production, prod, release.",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "timeout_ms": {
                          "description": "Execution timeout written into the permit obligations. Defaults to 120000.",
                          "minimum": 1,
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    },
                    "shell": {
                      "description": "Required. Only bash is supported in v1: a permit issued under one shell's grammar and executed under another is a parser differential with a signature on it.",
                      "enum": [
                        "bash"
                      ],
                      "type": "string"
                    },
                    "subject": {
                      "description": "Opaque caller label recorded as the permit subject.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "shell",
                    "command"
                  ],
                  "type": "object"
                },
                "bodyType": {
                  "enum": [
                    "json",
                    "form-data",
                    "text"
                  ],
                  "type": "string"
                },
                "method": {
                  "enum": [
                    "POST"
                  ],
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method",
                "bodyType",
                "body"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "properties": {
                    "confidence": {
                      "type": "number"
                    },
                    "evidence": {
                      "items": {
                        "properties": {
                          "code": {
                            "description": "Stable reason code, e.g. REMOTE_CODE_EXECUTION.",
                            "type": "string"
                          },
                          "data": {
                            "type": "object"
                          },
                          "detail": {
                            "type": "string"
                          },
                          "disposition": {
                            "description": "What this finding does to the verdict, which is a different axis from how bad it is.",
                            "enum": [
                              "block",
                              "unknown",
                              "warn",
                              "info"
                            ],
                            "type": "string"
                          },
                          "severity": {
                            "enum": [
                              "info",
                              "low",
                              "medium",
                              "high",
                              "critical"
                            ],
                            "type": "string"
                          },
                          "source": {
                            "type": "string"
                          },
                          "span": {
                            "properties": {
                              "end": {
                                "type": "integer"
                              },
                              "start": {
                                "type": "integer"
                              }
                            },
                            "type": "object"
                          }
                        },
                        "required": [
                          "code",
                          "severity",
                          "detail",
                          "disposition"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "properties": {
                        "canonical_command": {
                          "description": "What a permit binds. Every operand preserved.",
                          "type": "string"
                        },
                        "cmd_fingerprint": {
                          "description": "ADVISORY ONLY. Operands discarded; never authorize on it.",
                          "type": "string"
                        },
                        "cmd_hash": {
                          "description": "BINDING. sha256 of canonical_command.",
                          "type": "string"
                        },
                        "permit": {
                          "description": "Compact JWS, 60s TTL, one audience.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "canonical_command",
                        "cmd_hash",
                        "cmd_fingerprint"
                      ],
                      "type": "object"
                    },
                    "risk_codes": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "verdict": {
                      "enum": [
                        "pass",
                        "warn",
                        "unknown",
                        "block"
                      ],
                      "type": "string"
                    },
                    "warnings": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "ok",
                    "verdict",
                    "confidence",
                    "risk_codes",
                    "evidence",
                    "result",
                    "warnings"
                  ],
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "shellpermit.schemasure.com",
    "manifest_name": "shellpermit.schemasure.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {
      "confidence": 0,
      "evidence": [
        {
          "code": "string",
          "data": {},
          "detail": "string",
          "disposition": "block",
          "severity": "info",
          "source": "string",
          "span": {
            "end": 0,
            "start": 0
          }
        }
      ],
      "ok": true,
      "result": {
        "canonical_command": "string",
        "cmd_fingerprint": "string",
        "cmd_hash": "string",
        "permit": "string"
      },
      "risk_codes": [
        "string"
      ],
      "verdict": "pass",
      "warnings": [
        "string"
      ]
    },
    "type": "string"
  }
}