{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "timestamp" : {
      "type" : "string",
      "format" : "date-time",
      "x-isAttributed" : false,
      "description" : "The timestamp when the event originally occurred"
    },
    "asset" : {
      "type" : "string",
      "x-isAttributed" : true,
      "description" : "Primary asset involved in the alert"
    },
    "secondary_asset" : {
      "type" : "string",
      "x-isAttributed" : true,
      "description" : "Secondary asset related to the alert"
    },
    "destination_user" : {
      "type" : "string",
      "x-isAttributed" : true,
      "description" : "Username of the destination user"
    },
    "destination_user_domain" : {
      "type" : "string",
      "x-isAttributed" : true,
      "description" : "Domain of the destination user"
    },
    "source_user" : {
      "type" : "string",
      "x-isAttributed" : true,
      "description" : "Username of the source user"
    },
    "source_user_domain" : {
      "type" : "string",
      "x-isAttributed" : true,
      "description" : "Domain of the source user"
    },
    "source_address" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Network address of the source system",
      "oneOf" : [ {
        "format" : "ipv4"
      }, {
        "format" : "ipv6"
      }, {
        "format" : "hostname"
      } ]
    },
    "destination_address" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Network address of the destination system",
      "oneOf" : [ {
        "format" : "ipv4"
      }, {
        "format" : "ipv6"
      }, {
        "format" : "hostname"
      } ]
    },
    "alert_name" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Name of the generated alert"
    },
    "source_port" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Port number used by the source",
      "pattern" : "\\d+"
    },
    "destination_port" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Port number used by the destination",
      "pattern" : "\\d+"
    },
    "device_address" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Address of the device that detected the alert",
      "oneOf" : [ {
        "format" : "ipv4"
      }, {
        "format" : "ipv6"
      }, {
        "format" : "hostname"
      } ]
    },
    "protocol" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Protocol used in the communication"
    },
    "signature_name" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Name of the detection signature that triggered the alert"
    },
    "severity" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Severity level of the event (for example, low, medium, high)"
    },
    "source_json" : {
      "type" : "object",
      "x-isAttributed" : false,
      "description" : "The data that was received or collected by our collector or endpoint agent, formatted as JSON"
    },
    "r7_context" : {
      "type" : "object",
      "properties" : {
        "source_user" : {
          "type" : "object",
          "properties" : {
            "domain" : {
              "type" : "string",
              "x-isAttributed" : false,
              "format" : "hostname",
              "description" : "The domain of the user"
            },
            "name" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The name of the r7context resource"
            },
            "rrn" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The RRN (Rapid7 Resource Name) of the r7context resource",
              "pattern" : "rrn(_[^\\s:]+)?:[^\\s:]+:[^\\s:]*:[^\\s:]*(:[^\\s:]+)+"
            },
            "type" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The type of r7context field",
              "const" : "user"
            }
          },
          "required" : [ "name", "rrn", "type" ],
          "x-isAttributed" : true
        },
        "destination_user" : {
          "type" : "object",
          "properties" : {
            "domain" : {
              "type" : "string",
              "x-isAttributed" : false,
              "format" : "hostname",
              "description" : "The domain of the user"
            },
            "name" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The name of the r7context resource"
            },
            "rrn" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The RRN (Rapid7 Resource Name) of the r7context resource",
              "pattern" : "rrn(_[^\\s:]+)?:[^\\s:]+:[^\\s:]*:[^\\s:]*(:[^\\s:]+)+"
            },
            "type" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The type of r7context field",
              "const" : "user"
            }
          },
          "required" : [ "name", "rrn", "type" ],
          "x-isAttributed" : true
        },
        "asset" : {
          "type" : "object",
          "properties" : {
            "name" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The name of the r7context resource"
            },
            "rrn" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The RRN (Rapid7 Resource Name) of the r7context resource",
              "pattern" : "rrn(_[^\\s:]+)?:[^\\s:]+:[^\\s:]*:[^\\s:]*(:[^\\s:]+)+"
            },
            "type" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The type of r7context field",
              "const" : "asset"
            }
          },
          "required" : [ "name", "rrn", "type" ],
          "x-isAttributed" : true
        },
        "secondary_asset" : {
          "type" : "object",
          "properties" : {
            "name" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The name of the r7context resource"
            },
            "rrn" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The RRN (Rapid7 Resource Name) of the r7context resource",
              "pattern" : "rrn(_[^\\s:]+)?:[^\\s:]+:[^\\s:]*:[^\\s:]*(:[^\\s:]+)+"
            },
            "type" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The type of r7context field",
              "const" : "asset"
            }
          },
          "required" : [ "name", "rrn", "type" ],
          "x-isAttributed" : true
        }
      },
      "x-isAttributed" : true,
      "description" : "R7_context includes attributed information related to the entry, with references to Rapid7-specific RRNs"
    },
    "entry_id" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Unique Entry ID assigned to each document or log entry"
    },
    "custom_data" : {
      "type" : "object",
      "x-isAttributed" : false,
      "description" : "JSON string produced by applying one or more user-defined custom parsers to the original data"
    },
    "geoip_city" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The city name of the source IP address"
    },
    "geoip_country_code" : {
      "type" : "string",
      "x-isAttributed" : false,
      "pattern" : "[A-Z]{2}",
      "description" : "Two-character ISO 3166-1 country code for the source IP address"
    },
    "geoip_country_name" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The country name of the source IP address"
    },
    "geoip_organization" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The organization name attributed from source IP address"
    },
    "geoip_region" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The region name of the source IP address"
    },
    "source_data" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The unparsed, original log line as received from the collector"
    }
  },
  "required" : [ "timestamp", "source_address", "destination_address" ],
  "description" : "Advanced malware alert"
}