-
Notifications
You must be signed in to change notification settings - Fork 385
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d2ae83a
commit 35c9526
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |