{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/aquasecurity/trivy-policies/blob/main/pkg/rego/schemas/dockerfile.json",
  "type": "object",
  "properties": {
    "Stages": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/stage"
      }
    }
  },
  "$defs": {
    "stage": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string"
        },
        "Commands": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/command"
          }
        }
      }
    },
    "command": {
      "type": "object",
      "properties": {
        "Flags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "Value": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "Cmd": {
          "type": "string"
        },
        "SubCmd": {
          "type": "string"
        },
        "Original": {
          "type": "string"
        },
        "Path": {
          "type": "string"
        },
        "JSON": {
          "type": "boolean"
        },
        "Stage": {
          "type": "integer"
        },
        "StartLine": {
          "type": "integer"
        },
        "EndLine": {
          "type": "integer"
        }
      }
    }
  }
}