Bow Tie Kreative SECURITY Grammar

JSON Schemas

LAKA Security Tool Registry

tool-registry 4 required 4 properties

Required properties

  • registry_id
  • version
  • default_policy
  • tools

The schema in full

schemas/tool-registry.schema.json · draft 2020-12
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://bowtiekreative.example/schemas/laka-security/tool-registry.schema.json",
  "title": "LAKA Security Tool Registry",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "registry_id",
    "version",
    "default_policy",
    "tools"
  ],
  "properties": {
    "registry_id": {
      "type": "string"
    },
    "version": {
      "type": "string"
    },
    "default_policy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "unknown_tool",
        "unregistered_version",
        "active_mode",
        "mutating_mode"
      ],
      "properties": {
        "unknown_tool": {
          "enum": [
            "deny",
            "plan-only"
          ]
        },
        "unregistered_version": {
          "enum": [
            "deny",
            "plan-only"
          ]
        },
        "active_mode": {
          "enum": [
            "deny",
            "separate-approval",
            "allow"
          ]
        },
        "mutating_mode": {
          "enum": [
            "deny",
            "separate-approval",
            "allow"
          ]
        }
      }
    },
    "tools": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "tool_id",
          "category",
          "execution_plane",
          "allowed_modes",
          "target_types",
          "network_effect",
          "mutation",
          "allow_by_default",
          "required_gates",
          "constraints",
          "evidence_outputs",
          "forbidden_capabilities"
        ],
        "properties": {
          "tool_id": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "version_policy": {
            "type": "string"
          },
          "execution_plane": {
            "enum": [
              "knowledge",
              "observe",
              "prove",
              "change"
            ]
          },
          "allowed_modes": {
            "type": "array",
            "minItems": 1,
            "items": {
              "enum": [
                "inventory",
                "passive",
                "audit",
                "active",
                "change",
                "containment",
                "recovery"
              ]
            }
          },
          "target_types": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string"
            }
          },
          "required_privileges": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "network_effect": {
            "enum": [
              "none",
              "passive-receive",
              "bounded-requests",
              "active-payloads"
            ]
          },
          "mutation": {
            "enum": [
              "none",
              "test-data-only",
              "configuration",
              "containment",
              "recovery"
            ]
          },
          "allow_by_default": {
            "type": "boolean"
          },
          "required_gates": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "constraints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "evidence_outputs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "forbidden_capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "parser": {
            "type": "string"
          },
          "timeout_seconds": {
            "type": "integer",
            "minimum": 1
          },
          "concurrency": {
            "type": "integer",
            "minimum": 1
          }
        }
      }
    }
  }
}

Validate against it

curl -X POST https://security.bowtiekreative.com/v1/validate \
  -H 'content-type: application/json' \
  --data '{"schema": "tool-registry", "document": { … }}'

This schema as JSON →