Skip to content

Commit

Permalink
#900 readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeleonard committed Nov 16, 2020
1 parent d2ae83a commit 35c9526
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions utils/flavors/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Readme

Program that help checking and fixing the validity of the JSON file of a flavor.


```
usage: check_json_schema.py [-h] [-r] [-f FILE] [-s SCHEMA]
optional arguments:
-h, --help show this help message and exit
-r, --report Generate report for all JSON flavors of all Analyzers and responders
-f FILE, --file FILE Validate JSON of the Flavor definition file
-s SCHEMA, --schema SCHEMA
JSON Schema of a flavor
```


## Examples


- Check all flavors found in analyzers and responders. From the Cortex-Analyzers folder:

```bash
python3 utils/flavors/check_json_schema.py -r

```

- Check a specific file:

```bash
python3 utils/flavors/check_json_schema.py -f analyzers/VirusTotal/VirusTotal_Scan.json -s utils/flavors/flavor_schema.json

❌ analyzers/VirusTotal/VirusTotal_Scan.json
deque([]): 'registration_required' is a required property
deque([]): 'subscription_required' is a required property
deque([]): 'free_subscription' is a required property
```

```bash
python3 utils/flavors/check_json_schema.py -f analyzers/SEKOIAIntelligenceCenter/IntelligenceCenter_Context.json -s utils/flavors/flavor_schema.json

✅ analyzers/SEKOIAIntelligenceCenter/IntelligenceCenter_Context.json
```

0 comments on commit 35c9526

Please sign in to comment.