eve/schema: check that each array has at least one element

Ticket: #5167
pull/8237/head
Philippe Antoine 4 years ago committed by Victor Julien
parent b39a4c63fe
commit 37af957d83

@ -110,6 +110,7 @@
}, },
"files": { "files": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"optional": true, "optional": true,
@ -152,6 +153,7 @@
}, },
"sid": { "sid": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "integer" "type": "integer"
} }
@ -162,6 +164,7 @@
}, },
"vlan": { "vlan": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "number" "type": "number"
} }
@ -202,60 +205,70 @@
"properties": { "properties": {
"affected_product": { "affected_product": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"attack_target": { "attack_target": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"created_at": { "created_at": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"deployment": { "deployment": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"former_category": { "former_category": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"malware_family": { "malware_family": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"policy": { "policy": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"signature_severity": { "signature_severity": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"tag": { "tag": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"updated_at": { "updated_at": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
@ -453,6 +466,7 @@
}, },
"interfaces": { "interfaces": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -549,18 +563,21 @@
}, },
"dns_servers": { "dns_servers": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"params": { "params": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"routers": { "routers": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
@ -592,6 +609,7 @@
}, },
"objects": { "objects": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -621,6 +639,7 @@
}, },
"points": { "points": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"additionalProperties": true "additionalProperties": true
@ -680,6 +699,7 @@
"properties": { "properties": {
"indicators": { "indicators": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
@ -710,6 +730,7 @@
}, },
"objects": { "objects": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -739,6 +760,7 @@
}, },
"points": { "points": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"additionalProperties": true "additionalProperties": true
@ -819,6 +841,7 @@
}, },
"objects": { "objects": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -848,6 +871,7 @@
}, },
"points": { "points": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"additionalProperties": true "additionalProperties": true
@ -907,6 +931,7 @@
"properties": { "properties": {
"indicators": { "indicators": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
@ -962,6 +987,7 @@
}, },
"answers": { "answers": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"optional": true, "optional": true,
@ -1003,6 +1029,7 @@
}, },
"authorities": { "authorities": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"optional": true, "optional": true,
@ -1053,6 +1080,7 @@
}, },
"query": { "query": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"optional": true, "optional": true,
@ -1121,42 +1149,49 @@
"properties": { "properties": {
"A": { "A": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"AAAA": { "AAAA": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"CNAME": { "CNAME": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"MX": { "MX": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"NULL": { "NULL": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"PTR": { "PTR": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"SRV": { "SRV": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"optional": true, "optional": true,
@ -1179,6 +1214,7 @@
}, },
"TXT": { "TXT": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
@ -1292,18 +1328,21 @@
}, },
"url": { "url": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"attachment": { "attachment": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"to": { "to": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
@ -1348,12 +1387,14 @@
}, },
"dest_macs": { "dest_macs": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"src_macs": { "src_macs": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
@ -1406,6 +1447,7 @@
}, },
"sid": { "sid": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "integer" "type": "integer"
} }
@ -1547,12 +1589,14 @@
}, },
"completion_code": { "completion_code": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"reply": { "reply": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
@ -1633,6 +1677,7 @@
}, },
"request_headers": { "request_headers": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -1651,6 +1696,7 @@
}, },
"response_headers": { "response_headers": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -1702,6 +1748,7 @@
}, },
"settings": { "settings": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -1726,6 +1773,7 @@
}, },
"settings": { "settings": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -1772,6 +1820,7 @@
}, },
"request_headers": { "request_headers": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -1790,6 +1839,7 @@
}, },
"response_headers": { "response_headers": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -1908,6 +1958,7 @@
}, },
"payload": { "payload": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
@ -1923,6 +1974,7 @@
}, },
"vendor_ids": { "vendor_ids": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
@ -1944,6 +1996,7 @@
}, },
"proposals": { "proposals": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -2075,12 +2128,14 @@
"properties": { "properties": {
"flowbits": { "flowbits": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"flowvars": { "flowvars": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -2099,6 +2154,7 @@
}, },
"pktvars": { "pktvars": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -2584,6 +2640,7 @@
}, },
"qos_granted": { "qos_granted": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "integer" "type": "integer"
} }
@ -2608,6 +2665,7 @@
}, },
"topics": { "topics": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -2641,6 +2699,7 @@
}, },
"reason_codes": { "reason_codes": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "integer" "type": "integer"
} }
@ -2665,6 +2724,7 @@
}, },
"topics": { "topics": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
@ -2831,6 +2891,7 @@
"properties": { "properties": {
"optional_parameters": { "optional_parameters": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -2903,6 +2964,7 @@
}, },
"parameter_status": { "parameter_status": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -2976,6 +3038,7 @@
"properties": { "properties": {
"cyu": { "cyu": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -2991,6 +3054,7 @@
}, },
"extensions": { "extensions": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -3002,6 +3066,7 @@
}, },
"values": { "values": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
@ -3063,6 +3128,7 @@
}, },
"channels": { "channels": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
@ -3105,6 +3171,7 @@
}, },
"capabilities": { "capabilities": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
@ -3403,6 +3470,7 @@
}, },
"client_dialects": { "client_dialects": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
@ -3462,6 +3530,7 @@
}, },
"interfaces": { "interfaces": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"optional": true, "optional": true,
@ -3520,6 +3589,7 @@
}, },
"snames": { "snames": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
@ -3597,6 +3667,7 @@
}, },
"rcpt_to": { "rcpt_to": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
@ -3622,6 +3693,7 @@
}, },
"vars": { "vars": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
@ -4743,6 +4815,7 @@
}, },
"engines": { "engines": {
"type": "array", "type": "array",
"minItems": 1,
"items": [ "items": [
{ {
"type": "object", "type": "object",
@ -5347,12 +5420,14 @@
"properties": { "properties": {
"id": { "id": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
}, },
"label": { "label": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }

Loading…
Cancel
Save