Files
blue-team-tools/validate.sh
T
Mostafa Moradian df5c1402ec Fix file name
2023-08-02 14:21:01 +02:00

15 lines
558 B
Bash
Executable File

#!/bin/bash
# Check if the check-jsonschema tool is installed
if ! command -v check-jsonschema &> /dev/null
then
echo "check-jsonschema could not be found"
echo "Please install it from PyPI using:"
echo "pip install check-jsonschema"
exit
fi
# Validate all the Sigma rules in the current directory
echo "Validating Sigma rules against sigma-schema.json"
check-jsonschema --schemafile sigma-schema.json $(find ./rules ./rules-compliance ./rules-dfir ./rules-emerging-threats ./rules-placeholder ./rules-threat-hunting -type f -name "*.yml")