This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

A Python tool and API that validates STIX and CybOX XML instance documents.

Source:https://github.com/STIXProject/stix-validator
Documentation:http://stix-validator.readthedocs.org
Information:http://stix.mitre.org http://cybox.mitre.org

Validation

The STIX Document Validator (sdv) can perform the following forms of STIX document validation:

The following forms of CybOX document validation are also possible:

Dependencies

The STIX Document Validator has the following dependencies:

  • Python v2.7: Python interpreter
  • lxml >= v3.2.0: XML processing library.
    • libxml2 >= v2.9.1: Required XML processing C library for lxml.
  • xlrd >= v0.9.2: XLSX library for parsing STIX Profiles.
  • ordereddict >= 1.1: A drop-in replacement for collections.OrderedDict on Python 2.6.

For a Windows installer of lxml, we recommend looking here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml

The STIX Document Validator is developed and actively tested against Python 2.7; we believe that most parts should also work with Python 2.6, however we make no guarantees. If you encounter an error under Python 2.6, please let us know so we can investigate whether a fix is feasible.

The STIX Document Validator is not compatible with Python 3.

Installation

The recommended method for installing the STIX Document Validator is via pip.

$ pip install stix-validator

This will install the sdv package into your Python installation’s site-packages and a stix-validator.py script on your PATH.

How To Use

The STIX Document Validator bundles four scripts: stix-validator.py, profile-to-sch.py, profile-to-xslt.py, and cybox-validator.py,

STIX Validation

The stix-validator.py script can can validate a STIX XML document against STIX schemas, STIX Best Practices, and STIX Profiles.

NOTE: The STIX Profile validation should be considered experimental.

Validate using bundled schemas

$ stix-validator.py <stix_document.xml>

Validate using schemaLocation

$ stix-validator.py --use-schemaloc <stix_document.xml>

Validate using non-bundled schemas

$ stix-validator.py --schema-dir </path/to/schemas> <stix_document.xml>

NOTE: If you are trying to validate a STIX document from a checked-out copy of STIX schema repository, make sure you have also cloned the CybOX schema submodule with git submodule init and git submodule update.

Validate a directory of STIX documents

$ stix-validator.py </path/to/stix_dir>

Validate multiple files and/or directories

$ stix-validator.py <one.xml> <two.xml> <directory_of_files> ...

Check “best practice” guidance

$ stix-validator.py --best-practices <stix_document.xml>

Validate using STIX Profile

$ stix-validator.py --profile <stix_profile.xlsx> <stix_document.xml>

STIX Profile to Schematron Conversion

The profile-to-sch.py script performs a conversion from a valid STIX profile to schematron.

$ profile-to-sch.py <valid_stix_profile.xlsx>

Schematron output is sent to stdout.

STIX Profile to XSLT Conversion

The profile-to-xslt.py script performs a conversion from a valid STIX profile to XSLT.

$ profile-to-xslt.py <valid_stix_profile.xlsx>

XSLT output is sent to stdout.

CybOX Validation

The cybox-validator.py script can perform CybOX XML Schema validation.

Validate using bundled schemas

$ cybox-validator.py <cybox_document.xml>

Validate using schemaLocation

$ cybox-validator.py --use-schemaloc <cybox_document.xml>

Validate using non-bundled schemas

$ cybox-validator.py --schema-dir </path/to/schemas> <cybox_document.xml>

Validate a directory of CybOX documents

$ cybox-validator.py </path/to/cybox_dir>

Validate multiple files and/or directories

$ cybox-validator.py <one.xml> <two.xml> <directory_of_files> ...

All STIX and CybOX Documents?

The STIX Document Validator bundles XML schemas with it, which includes all STIX (v1.0 through v1.2) and CybOX (2.0 through v2.1) schema files. If a document includes instances of schematic constructs defined outside of the STIX or CybOX languages, a user must point the STIX Document Validator scripts at those schemas in order to validate.

To use schemas other than those bundled with the STIX Document Validator use the --schemas-dir flag to pass in a path to a schema directory.

Common Libxml2 Error

Users often report an error which looks something like the following:

Fatal error occurred: local union type: A type, derived by list or union, must have the
simple ur-type definition as base type, not '{http://cybox.mitre.org/common-2}(NULL)'., line 350

This error is caused by an insufficient version of libxml2 being installed on the system. The STIX Document Validator requires libxml2 v2.9.1 at a minimum and is not guaranteed to work properly with earlier versions.

To see what version of libxml2 you have installed, execute the xml2-config --version command and make sure you are running at least v2.9.1.

Terms

BY USING THE STIX DOCUMENT VALIDATOR, YOU SIGNIFY YOUR ACCEPTANCE OF THE TERMS AND CONDITIONS OF USE. IF YOU DO NOT AGREE TO THESE TERMS, DO NOT USE THE STIX DOCUMENT VALIDATOR.

For more information, please refer to the LICENSE.txt file

Release History

Release History

2.5.0.dev0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.4.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.3.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.1.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.1.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.0.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
stix-validator-2.4.0.tar.gz (1.9 MB) Copy SHA256 Checksum SHA256 Source Jul 30, 2015
stix-validator-2.4.0.zip (2.8 MB) Copy SHA256 Checksum SHA256 Source Jul 30, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting