Add schema for mapping

pull/75/head
Raphaël Vinot 2017-08-31 23:16:36 +02:00
parent 05ce75f7fe
commit 718443dc5c
4 changed files with 22 additions and 1 deletions

View File

@ -11,4 +11,5 @@ do
done
cat schema.json | jq . | sponge schema.json
cat schema_mapping.json | jq . | sponge schema_mapping.json
cat MANIFEST.json | jq . | sponge MANIFEST.json

View File

@ -47,7 +47,6 @@
},
"ransomware": {
"values": [
"veris:action:malware:variety=\"Ransomware\"",
"ecsirt:malicious-code=\"ransomware\"",
"enisa:nefarious-activity-abuse=\"ransomware\"",
"malware_classification:malware-category=\"Ransomware\"",

20
schema_mapping.json Normal file
View File

@ -0,0 +1,20 @@
{
"$schema": "http://json-schema.org/schema#",
"title": "Validator for the mapping in misp-taxonomies",
"id": "https://www.github.com/MISP/misp-taxonomies/schema_mapping.json",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^.*$": {
"properties": {
"values": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
}
}
}
}

View File

@ -27,3 +27,4 @@ do
echo ''
done
jsonschema -i mapping/mapping.json schema_mapping.json