| { |
| "$schema": "https://json-schema.org/draft/2020-12/schema", |
| "$id": "https://huggingface.co/datasets/IV-CAN/IV-CAN-v1/raw/main/schema/label.schema.json", |
| "title": "IV-CAN-v1 trial label", |
| "type": "object", |
| "additionalProperties": false, |
| "required": ["group_name", "collection_duration_sec", "attacking_duration_sec", "attack_start_timestamp", "attack_end_timestamp", "data_collection_info", "data_attack_info"], |
| "properties": { |
| "group_name": {"type": "string", "pattern": "^(?:benign|dos|fuzzing|replay|spoofing|suspension|masquerade)_[0-9]{4}$"}, |
| "collection_duration_sec": {"type": "number", "minimum": 0}, |
| "attacking_duration_sec": {"type": "number", "minimum": 0}, |
| "attack_start_timestamp": {"type": ["number", "null"], "minimum": 0}, |
| "attack_end_timestamp": {"type": ["number", "null"], "minimum": 0}, |
| "data_collection_info": {"$ref": "#/$defs/collection"}, |
| "data_attack_info": {"oneOf": [{"type": "null"}, {"$ref": "#/$defs/attack"}]} |
| }, |
| "$defs": { |
| "collection": { |
| "type": "object", |
| "additionalProperties": false, |
| "required": ["avg_speed", "description", "end_place", "intelligent_driving", "road_type", "start_place"], |
| "properties": { |
| "avg_speed": {"type": "number", "minimum": 0}, |
| "description": {"type": "string"}, |
| "end_place": {"type": "string"}, |
| "intelligent_driving": {"type": "boolean"}, |
| "road_type": {"enum": ["UrbanOrdinaryRoad", "RuralRoad", "InternalRoad", "UORWithLKN", "HighwayWithLKN", "Highway", "UrbanExpressway"]}, |
| "start_place": {"type": "string"} |
| } |
| }, |
| "attack": { |
| "type": "object", |
| "additionalProperties": false, |
| "required": ["attack_effect", "attack_type", "attacked_domain"], |
| "properties": { |
| "attacked_domain": {"type": "integer", "minimum": 1, "maximum": 5}, |
| "attack_effect": { |
| "type": "object", "additionalProperties": false, "required": ["description", "level"], |
| "properties": {"description": {"type": "string"}, "level": {"enum": ["no effect", "system warning", "non-motion control compromised", "motion control compromised"]}} |
| }, |
| "attack_type": {"$ref": "#/$defs/attack_type"} |
| } |
| }, |
| "attack_type": { |
| "oneOf": [ |
| {"type": "object", "additionalProperties": false, "required": ["kind", "config"], "properties": {"kind": {"const": "DoS"}, "config": {"$ref": "#/$defs/dos_config"}}}, |
| {"type": "object", "additionalProperties": false, "required": ["kind", "config"], "properties": {"kind": {"const": "fuzzing"}, "config": {"$ref": "#/$defs/fuzz_config"}}}, |
| {"type": "object", "additionalProperties": false, "required": ["kind", "config"], "properties": {"kind": {"const": "replay"}, "config": {"$ref": "#/$defs/replay_config"}}}, |
| {"type": "object", "additionalProperties": false, "required": ["kind", "config"], "properties": {"kind": {"const": "suspension"}, "config": {"$ref": "#/$defs/suspension_config"}}}, |
| {"type": "object", "additionalProperties": false, "required": ["kind", "config"], "properties": {"kind": {"enum": ["spoofing", "masquerade"]}, "config": {"type": "null"}}} |
| ] |
| }, |
| "dos_config": { |
| "type": "object", "additionalProperties": false, "required": ["id_option", "dlc_option", "ext_option", "data_option"], |
| "properties": {"id_option": {"enum": ["aliveId", "zeroId"]}, "dlc_option": {"enum": ["dlcChange", "dlcKeep"]}, "ext_option": {"enum": ["extendedId", "standardId"]}, "data_option": {"enum": ["FFData", "randomData"]}} |
| }, |
| "fuzz_config": { |
| "type": "object", "additionalProperties": false, "required": ["id_option", "dlc_option"], |
| "properties": {"id_option": {"enum": ["aliveId", "randomId"]}, "dlc_option": {"enum": ["dlcChange", "dlcKeep"]}} |
| }, |
| "replay_config": { |
| "type": "object", "additionalProperties": false, "required": ["timing"], |
| "properties": {"timing": {"enum": ["delay", "immediate"]}} |
| }, |
| "suspension_config": { |
| "type": "object", "additionalProperties": false, "required": ["suspension_CAN_id_list", "suspension_duration_sec"], |
| "properties": {"suspension_duration_sec": {"type": "number", "exclusiveMinimum": 0}, "suspension_CAN_id_list": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "string", "pattern": "^0x(?:[0-9A-F]{4}|[0-9A-F]{8})$"}}} |
| } |
| } |
| } |
|
|