Options

These are the different options that can be set, whether the validator is used as a command-line script or as a Python library. When using the validator as a library, these options can be passed as parameters to the ValidationOptions constructor.

Script Library Description
FILES files A whitespace separated list of STIX files or directories of STIX files to validate.
-r, --recursive recursive Recursively descend into input directories.
-s SCHEMA_DIR, --schemas SCHEMA_DIR schema_dir Custom schema directory. If provided, input will be validated against these schemas in addition to the STIX schemas bundled with this script.
-v, --verbose verbose Print informational notes and more verbose error messages.
-q, --silent silent Silence all output to stdout.
-d DISABLED, --disable DISABLED, --ignore DISABLED disabled A comma-separated list of recommended best practice checks to skip. By default, no checks are disabled. Example: –disable 202,210
-e ENABLED, --enable ENABLED, --select ENABLED enabled A comma-separated list of recommended best practice checks to enable. If the –disable option is not used, no other checks will be run. By default, all checks are enabled. Example: –enable 218
--strict strict Treat warnings as errors and fail validation if any are found.
--strict-types strict_types Ensure that no custom object types are used, only those defined in the STIX specification.
--strict-properties strict_properties Ensure that no custom properties are used, only those defined in the STIX specification.
--no-cache no_cache Disable the caching of external source values.
--refresh-cache refresh_cache Clears the cache of external source values, then during validation downloads them again.
--clear-cache clear_cache Clear the cache of external source values after validation.

For the list of checks that can be used with the “enabled” or “disabled” options, see the Best Practices page.