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 |
---|---|---|
|
|
A whitespace separated list of STIX files or directories of STIX files to validate. |
|
|
Recursively descend into input directories. |
|
|
Custom schema directory. If provided, input will be validated against these schemas in addition to the STIX schemas bundled with this script. |
|
|
The version of the STIX specification to validate against (e.g. “2.0”). |
|
|
Print informational notes and more verbose error messages. |
|
|
Silence all output to stdout. |
|
|
A comma-separated list of recommended best practice checks to skip. By default, no checks are disabled. Example: –disable 202,210 |
|
|
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 |
|
|
Treat warnings as errors and fail validation if any are found. |
|
|
Ensure that no custom object types are used, only those defined in the STIX specification. |
|
|
Ensure that no custom properties are used, only those defined in the STIX specification. |
|
|
Disable the caching of external source values. |
|
|
Clears the cache of external source values, then during validation downloads them again. |
|
|
Clear the cache of external source values after validation. |
|
|
Ensures that all SDOs being referenced by SROs are contained within the same bundle. |
For the list of checks that can be used with the “enabled” or “disabled” options, see the Best Practices page.