stix2-elevator


Namestix2-elevator JSON
Version 4.1.7 PyPI version JSON
download
home_pagehttps://oasis-open.github.io/cti-documentation/
SummaryUtility to upgrade STIX 1.X and CybOX content to STIX 2.X
upload_time2022-09-28 20:09:53
maintainer
docs_urlNone
authorOASIS Cyber Threat Intelligence Technical Committee
requires_python>=3.7
license
keywords stix stix2 json xml cti cyber threat intelligence
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            |Build_Status| |Coverage| |Version| |Documentation_Status|

cti-stix-elevator
=================

NOTE: This is an `OASIS TC Open
Repository <https://www.oasis-open.org/resources/open-
repositories/>`_.
See the `Governance`_ section for more information.

The stix2-elevator is a software tool for converting STIX 1.x XML to
STIX
2.0 or 2.1 JSON. Due to the differences between STIX 1.x and STIX 2.x, this
conversion is best-effort only. During the conversion, stix2-
elevator
provides information on the assumptions it needs to make to produce
valid STIX
2.x JSON, and what information was not able to be converted.

To convert STIX 2.x JSON back to STIX 1.x XML use the `stix2-slider`

The stix2-elevator is a "best-effort" attempt to convert STIX 1.x content to STIX 2.x content.
**Caution should be taken if the elevator is to be used in a production environment as warnings
concerning the conversion are often generated.**  Users should determine which warnings are
acceptable and use the --disable option in conjunction with the –error-policy option only to produce
results when no other warnings are emitted.

**STIX 1.x Composite Indicator Expressions and CybOX 2.x Composite
Observable Expressions allow a level of flexibility not present in
STIX
2 patterns. These composite expressions can frequently have ambiguous
interpretations, so STIX 2 Indicators created by the stix2-elevator
from
STIX 1.x Indicators containing composite expressions should be
inspected
to ensure the STIX 2 Indicator has the intended meaning.**

For more information, see `the
documentation <https://stix2-elevator.readthedocs.io/>`__ on
ReadTheDocs.

Please enter any comments on how to improve the elevator into the issue tracker.

Requirements
------------

- Python 3.7+
- `python-stix <https://stix.readthedocs.io/en/stable/>`_ and its dependencies

  .. note::

      Make sure to use either the latest version of python-stix 1.1.1.x or
      1.2.0.x, depending on whether you want to support STIX 1.1.1 or STIX 1.2.

-  `python-stix2 <https://pypi.org/project/stix2/>`_ >= 3.0.0
-  `stix2-validator <https://pypi.org/project/stix2-validator/>`_ >= 3.0.0
   and its dependencies
-  `pycountry <https://pypi.org/project/pycountry/>`_ >= 20.7.0
-  `stixmarx <https://pypi.org/project/stixmarx/>`_ >= 1.0.8

Installation
------------

Install with pip

.. code-block:: bash

    $ pip install stix2-elevator

This will install all necessary dependencies, including the latest
version of python-stix.

If you need to support older STIX 1.1.1 content, install python-stix
1.1.1.x first

.. code-block:: bash

    $ pip install 'stix<1.2'
    $ pip install stix2-elevator

You can also install the stix2-elevator from GitHub to get the latest
(unstable) version

.. code-block:: bash

    $ pip install git+https://github.com/oasis-open/cti-stix-elevator.git

Installation Steps for ACS Data Marking Support
-----------------------------------------------

ACS data markings correspond to the common marking scheme used by the U.S. government (e.g., U, C, S, TS).
To elevate STIX 1.x content that contains ACS data markings, it is necessary to install an additional python package
called 'stix_edh'.

Install with pip

.. code-block:: bash

    $ pip install stix2-elevator[acs]

Usage
-----

It is recommended that you ensure that the input STIX 1.x file is
valid before submitting it to the elevator.
Use the `stix-validator <https://pypi.org/project/stix-validator/>`_.

As A Script
~~~~~~~~~~~

The elevator comes with a bundled script which you can use to elevate
STIX 1.x content to STIX 2.x content:

.. code-block:: text

    usage: stix2_elevator [-h]
              [--missing-policy {use-extensions,use-custom-properties,add-to-description,ignore}]
              [--header-object-type {report,grouping}]
              [--custom-property-prefix CUSTOM_PROPERTY_PREFIX]
              [--infrastructure]
              [--acs]
              [--incidents]
              [--package-created-by-id PACKAGE_CREATED_BY_ID]
              [--default-timestamp DEFAULT_TIMESTAMP]
              [--validator-args VALIDATOR_ARGS]
              [-e ENABLED]
              [-d DISABLED]
              [-s]
              [--message-log-directory MESSAGE_LOG_DIRECTORY]
              [--log-level {DEBUG,INFO,WARN,ERROR,CRITICAL}]
              [-m MARKINGS_ALLOWED]
              [-p {no_policy,strict_policy}]
              [-v {2.0,2.1}]
              [-r]
              file


stix2-elevator v4.1.7

positional arguments:

.. code-block:: text

  file          The input STIX 1.x document to be elevated.

optional arguments:

.. code-block:: text

  -h, --help
                Show this help message and exit

  --missing-policy {use-extensions,use-custom-properties,add-to-description,ignore}
                Policy for including STIX 1.x content that cannot be
                represented directly in STIX 2.x. The default is 'add-
                to-description'.

  --header-object-type {report,grouping}
                What STIX 2 type to use to store extra information
                from the STIX 1 package header.The default is
                'report'.

  --custom-property-prefix CUSTOM_PROPERTY_PREFIX
                Prefix to use for custom property names when missing
                policy is 'use-custom-properties'. The default is
                'elevator'.

  --infrastructure
                Infrastructure will be included in the conversion.
                Default for version 2.1 is true.

  --incidents
                Incidents will be included in the conversion.
                Default for version 2.1 is true.

  --acs
                Process ACS data markings
                Default is false.

  --package-created-by-id PACKAGE_CREATED_BY_ID
                Use provided identifier for "created_by_ref"
                properties.

                Example: --package-created-by-id "identity--1234abcd-1a12-42a3-0ab4-1234abcd5678"

  --default-timestamp DEFAULT_TIMESTAMP
                Use provided timestamp for properties that require a
                timestamp.

                Example: --default-timestamp "2016-11-15T13:10:35.053000Z"

  --validator-args VALIDATOR_ARGS
                Arguments to pass to stix2-validator.
                See https://stix2-validator.readthedocs.io/en/latest/options.html.

                Example: --validator-args="-v --strict-types -d 212"

  -e ENABLED, --enable ENABLED
                A comma-separated list of the stix2-elevator messages
                to enable. Not to be used with --disable.

                Example: --enable 250

  -d DISABLED, --disable DISABLED
                A comma-separated list of the stix2-elevator messages
                to disable. Not to be used with --enable.

                Example: --disable 212,220

  -s, --silent
                If this flag is set, all stix2-elevator messages will
                be disabled.

  --message-log-directory MESSAGE_LOG_DIRECTORY
                If this flag is set, all stix2-elevator messages will
                be saved to a file. The name of the file will be the
                input file with extension .log in the specified
                directory.

                Note, make sure the directory already exists.

                Example: --message-log-directory "../logs".

  --log-level {DEBUG,INFO,WARN,ERROR,CRITICAL}
                The logging output level.

  -m MARKINGS_ALLOWED, --markings-allowed MARKINGS_ALLOWED
                Avoid error exit, if these markings types
                (as specified via their python class names) are in the
                content, but not supported by the elevator. Specify as
                a comma-separated list.

                Example: --markings-allowed "ISAMarkingsAssertion,ISAMarkings"

  -p {no_policy,strict_policy},
  --error-policy {no_policy,strict_policy},
  --policy {no_policy,strict_policy}   #deprecated
               The policy to deal with errors. The default is 'no_policy'.

  -v {2.0,2.1}, --version {2.0,2.1}
               The version of stix 2 to be produced. The default is 2.1

  -r, --ignore-required-properties
                        Do not provide missing required properties


Refer to elevator_log_messages.rst for all stix2-elevator messages. Use the
associated code number to --enable or --disable a message. By default, the
stix2-elevator displays all messages.

Note: disabling the message does not disable the functionality.

As A Library
~~~~~~~~~~~~

You can also use this library to integrate STIX elevation into your own tools.

.. code-block:: python

    # Elevate a STIX 1.x via filename
    # Use set_option_value to override default elevator options
    # Read the documentation for options
    from stix2elevator import elevate
    from stix2elevator.options import initialize_options, set_option_value

    initialize_options(options={"spec_version": "2.1"})

    results = elevate("stix_file.xml")
    print(results)

The same method can also accept a string as an argument.

.. code-block:: python

    # Elevate a STIX 1.x via string
    # Use set_option_value to override default elevator options
    # Read the documentation for options
    from stix2elevator import elevate
    from stix2elevator.options import initialize_options, set_option_value

    initialize_options(options={"spec_version": "2.1"})

    results = elevate("<stix:Package...")
    print(results)

The same method can also accept a STIX 1.x package object as an argument.

.. code-block:: python

    # Elevate a STIX 1.x via string
    from stix2elevator import elevate
    from stix2elevator.options import initialize_options

    initialize_options(options={"spec_version": "2.1"})

    results = elevate(<STIX Package Object>)
    print(results)

To set others options, use set_option_value() found in options.py, or add them as keywords to initialize_options().

Using the stepper
~~~~~~~~~~~~~~~~~

The stix-stepper is a simple script that will convert STIX 2.0 content to STIX 2.1 content.

You can invoke it as follows.

.. code-block:: bash

    $ stix_stepper <2.0 file>

The 2.1 content is printed to stdout

Governance
----------

This GitHub public repository (
**https://github.com/oasis-open/cti-stix-elevator** ) was
`proposed <https://lists.oasis-
open.org/archives/cti/201610/msg00106.html>`__
and
`approved <https://lists.oasis-
open.org/archives/cti/201610/msg00126.html>`__
[`bis <https://issues.oasis-open.org/browse/TCADMIN-2477>`__] by the
`OASIS Cyber Threat Intelligence (CTI)
TC <https://www.oasis-open.org/committees/cti/>`__ as an `OASIS TC
Open Repository <https://www.oasis-open.org/resources/open-
repositories/>`__
to support development of open source resources related to Technical
Committee work.

While this TC Open Repository remains associated with the sponsor TC,
its
development priorities, leadership, intellectual property terms,
participation rules, and other matters of governance are `separate and
distinct <https://github.com/oasis-open/cti-stix-
elevator/blob/master/CONTRIBUTING.md#governance-distinct-from-oasis-
tc-process>`__
from the OASIS TC Process and related policies.

All contributions made to this TC Open Repository are subject to open
source license terms expressed in the `BSD-3-Clause
License <https://www.oasis-open.org/sites/www.oasis-
open.org/files/BSD-3-Clause.txt>`__.
That license was selected as the declared `"Applicable
License" <https://www.oasis-open.org/resources/open-
repositories/licenses>`__
when the TC Open Repository was created.

As documented in `"Public Participation
Invited <https://github.com/oasis-open/cti-stix-
elevator/blob/master/CONTRIBUTING.md#public-participation-
invited>`__",
contributions to this OASIS TC Open Repository are invited from all
parties, whether affiliated with OASIS or not. Participants must have
a
GitHub account, but no fees or OASIS membership obligations are
required. Participation is expected to be consistent with the `OASIS
TC Open Repository Guidelines and
Procedures <https://www.oasis-open.org/policies-guidelines/open-
repositories>`__,
the open source
`LICENSE <https://github.com/oasis-open/cti-stix-
elevator/blob/master/LICENSE>`__
designated for this particular repository, and the requirement for an
`Individual Contributor License
Agreement <https://www.oasis-open.org/resources/open-
repositories/cla/individual-cla>`__
that governs intellectual property.

Maintainers
~~~~~~~~~~~

TC Open Repository
`Maintainers <https://www.oasis-open.org/resources/open-
repositories/maintainers-guide>`__
are responsible for oversight of this project's community development
activities, including evaluation of GitHub `pull
requests <https://github.com/oasis-open/cti-stix-
elevator/blob/master/CONTRIBUTING.md#fork-and-pull-collaboration-
model>`__
and
`preserving <https://www.oasis-open.org/policies-guidelines/open-
repositories#repositoryManagement>`__
open source principles of openness and fairness. Maintainers are
recognized and trusted experts who serve to implement community goals
and consensus design preferences.

Initially, the associated TC members have designated one or more
persons
to serve as Maintainer(s); subsequently, participating community
members
may select additional or substitute Maintainers, per `consensus
agreements <https://www.oasis-open.org/resources/open-
repositories/maintainers-guide#additionalMaintainers>`__.

**Current Maintainers of this TC Open Repository**

-  `Jason Keirstead <mailto:Jason.Keirstead@ca.ibm.com>`__; GitHub ID:
   https://github.com/JasonKeirstead; WWW: `IBM <http://www.ibm.com/>`__
-  `Duncan Sparrell <mailto:duncan@sfractal.com>`__; GitHub ID:
   https://github.com/sparrell; WWW: `sFractal <http://sfractal.com/>`__

About OASIS TC Open Repositories
--------------------------------

-  `TC Open Repositories: Overview and
   Resources <https://www.oasis-open.org/resources/open-
   repositories/>`__
-  `Frequently Asked
   Questions <https://www.oasis-open.org/resources/open-
   repositories/faq>`__
-  `Open Source
   Licenses <https://www.oasis-open.org/resources/open-
   repositories/licenses>`__
-  `Contributor License Agreements
   (CLAs) <https://www.oasis-open.org/resources/open-
   repositories/cla>`__
-  `Maintainers' Guidelines and
   Agreement <https://www.oasis-open.org/resources/open-
   repositories/maintainers-guide>`__

Feedback
--------

Questions or comments about this TC Open Repository's activities
should be
composed as GitHub issues or comments. If use of an issue/comment is
not
possible or appropriate, questions may be directed by email to the
Maintainer(s) `listed above <#currentMaintainers>`__. Please send
general questions about TC Open Repository participation to OASIS
Staff at
repository-admin@oasis-open.org and any specific CLA-related questions
to repository-cla@oasis-open.org.

.. |Build_Status| image:: https://github.com/oasis-open/cti-stix-elevator/workflows/cti-stix-elevator%20test%20harness/badge.svg
   :target: https://github.com/oasis-open/cti-stix-elevator/actions?query=workflow%3A%22cti-stix-elevator+test+harness%22
.. |Coverage| image:: https://codecov.io/gh/oasis-open/cti-stix-elevator/branch/master/graph/badge.svg
   :target: https://codecov.io/gh/oasis-open/cti-stix-elevator
.. |Version| image:: https://img.shields.io/pypi/v/stix2-elevator.svg?maxAge=3600
   :target: https://pypi.org/project/stix2-elevator/
.. |Documentation_Status| image:: https://readthedocs.org/projects/stix2-elevator/badge/?version=latest
   :target: https://stix2-elevator.readthedocs.io/en/latest/
   :alt: Documentation Status

            

Raw data

            {
    "_id": null,
    "home_page": "https://oasis-open.github.io/cti-documentation/",
    "name": "stix2-elevator",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "stix stix2 json xml cti cyber threat intelligence",
    "author": "OASIS Cyber Threat Intelligence Technical Committee",
    "author_email": "cti-users@lists.oasis-open.org",
    "download_url": "https://files.pythonhosted.org/packages/ac/a7/3762b048580d4dc247a0489e830987ed4f693ad21f1bac17452a2aeec176/stix2-elevator-4.1.7.tar.gz",
    "platform": null,
    "description": "|Build_Status| |Coverage| |Version| |Documentation_Status|\n\ncti-stix-elevator\n=================\n\nNOTE: This is an `OASIS TC Open\nRepository <https://www.oasis-open.org/resources/open-\nrepositories/>`_.\nSee the `Governance`_ section for more information.\n\nThe stix2-elevator is a software tool for converting STIX 1.x XML to\nSTIX\n2.0 or 2.1 JSON. Due to the differences between STIX 1.x and STIX 2.x, this\nconversion is best-effort only. During the conversion, stix2-\nelevator\nprovides information on the assumptions it needs to make to produce\nvalid STIX\n2.x JSON, and what information was not able to be converted.\n\nTo convert STIX 2.x JSON back to STIX 1.x XML use the `stix2-slider`\n\nThe stix2-elevator is a \"best-effort\" attempt to convert STIX 1.x content to STIX 2.x content.\n**Caution should be taken if the elevator is to be used in a production environment as warnings\nconcerning the conversion are often generated.**  Users should determine which warnings are\nacceptable and use the --disable option in conjunction with the \u2013error-policy option only to produce\nresults when no other warnings are emitted.\n\n**STIX 1.x Composite Indicator Expressions and CybOX 2.x Composite\nObservable Expressions allow a level of flexibility not present in\nSTIX\n2 patterns. These composite expressions can frequently have ambiguous\ninterpretations, so STIX 2 Indicators created by the stix2-elevator\nfrom\nSTIX 1.x Indicators containing composite expressions should be\ninspected\nto ensure the STIX 2 Indicator has the intended meaning.**\n\nFor more information, see `the\ndocumentation <https://stix2-elevator.readthedocs.io/>`__ on\nReadTheDocs.\n\nPlease enter any comments on how to improve the elevator into the issue tracker.\n\nRequirements\n------------\n\n- Python 3.7+\n- `python-stix <https://stix.readthedocs.io/en/stable/>`_ and its dependencies\n\n  .. note::\n\n      Make sure to use either the latest version of python-stix 1.1.1.x or\n      1.2.0.x, depending on whether you want to support STIX 1.1.1 or STIX 1.2.\n\n-  `python-stix2 <https://pypi.org/project/stix2/>`_ >= 3.0.0\n-  `stix2-validator <https://pypi.org/project/stix2-validator/>`_ >= 3.0.0\n   and its dependencies\n-  `pycountry <https://pypi.org/project/pycountry/>`_ >= 20.7.0\n-  `stixmarx <https://pypi.org/project/stixmarx/>`_ >= 1.0.8\n\nInstallation\n------------\n\nInstall with pip\n\n.. code-block:: bash\n\n    $ pip install stix2-elevator\n\nThis will install all necessary dependencies, including the latest\nversion of python-stix.\n\nIf you need to support older STIX 1.1.1 content, install python-stix\n1.1.1.x first\n\n.. code-block:: bash\n\n    $ pip install 'stix<1.2'\n    $ pip install stix2-elevator\n\nYou can also install the stix2-elevator from GitHub to get the latest\n(unstable) version\n\n.. code-block:: bash\n\n    $ pip install git+https://github.com/oasis-open/cti-stix-elevator.git\n\nInstallation Steps for ACS Data Marking Support\n-----------------------------------------------\n\nACS data markings correspond to the common marking scheme used by the U.S. government (e.g., U, C, S, TS).\nTo elevate STIX 1.x content that contains ACS data markings, it is necessary to install an additional python package\ncalled 'stix_edh'.\n\nInstall with pip\n\n.. code-block:: bash\n\n    $ pip install stix2-elevator[acs]\n\nUsage\n-----\n\nIt is recommended that you ensure that the input STIX 1.x file is\nvalid before submitting it to the elevator.\nUse the `stix-validator <https://pypi.org/project/stix-validator/>`_.\n\nAs A Script\n~~~~~~~~~~~\n\nThe elevator comes with a bundled script which you can use to elevate\nSTIX 1.x content to STIX 2.x content:\n\n.. code-block:: text\n\n    usage: stix2_elevator [-h]\n              [--missing-policy {use-extensions,use-custom-properties,add-to-description,ignore}]\n              [--header-object-type {report,grouping}]\n              [--custom-property-prefix CUSTOM_PROPERTY_PREFIX]\n              [--infrastructure]\n              [--acs]\n              [--incidents]\n              [--package-created-by-id PACKAGE_CREATED_BY_ID]\n              [--default-timestamp DEFAULT_TIMESTAMP]\n              [--validator-args VALIDATOR_ARGS]\n              [-e ENABLED]\n              [-d DISABLED]\n              [-s]\n              [--message-log-directory MESSAGE_LOG_DIRECTORY]\n              [--log-level {DEBUG,INFO,WARN,ERROR,CRITICAL}]\n              [-m MARKINGS_ALLOWED]\n              [-p {no_policy,strict_policy}]\n              [-v {2.0,2.1}]\n              [-r]\n              file\n\n\nstix2-elevator v4.1.7\n\npositional arguments:\n\n.. code-block:: text\n\n  file          The input STIX 1.x document to be elevated.\n\noptional arguments:\n\n.. code-block:: text\n\n  -h, --help\n                Show this help message and exit\n\n  --missing-policy {use-extensions,use-custom-properties,add-to-description,ignore}\n                Policy for including STIX 1.x content that cannot be\n                represented directly in STIX 2.x. The default is 'add-\n                to-description'.\n\n  --header-object-type {report,grouping}\n                What STIX 2 type to use to store extra information\n                from the STIX 1 package header.The default is\n                'report'.\n\n  --custom-property-prefix CUSTOM_PROPERTY_PREFIX\n                Prefix to use for custom property names when missing\n                policy is 'use-custom-properties'. The default is\n                'elevator'.\n\n  --infrastructure\n                Infrastructure will be included in the conversion.\n                Default for version 2.1 is true.\n\n  --incidents\n                Incidents will be included in the conversion.\n                Default for version 2.1 is true.\n\n  --acs\n                Process ACS data markings\n                Default is false.\n\n  --package-created-by-id PACKAGE_CREATED_BY_ID\n                Use provided identifier for \"created_by_ref\"\n                properties.\n\n                Example: --package-created-by-id \"identity--1234abcd-1a12-42a3-0ab4-1234abcd5678\"\n\n  --default-timestamp DEFAULT_TIMESTAMP\n                Use provided timestamp for properties that require a\n                timestamp.\n\n                Example: --default-timestamp \"2016-11-15T13:10:35.053000Z\"\n\n  --validator-args VALIDATOR_ARGS\n                Arguments to pass to stix2-validator.\n                See https://stix2-validator.readthedocs.io/en/latest/options.html.\n\n                Example: --validator-args=\"-v --strict-types -d 212\"\n\n  -e ENABLED, --enable ENABLED\n                A comma-separated list of the stix2-elevator messages\n                to enable. Not to be used with --disable.\n\n                Example: --enable 250\n\n  -d DISABLED, --disable DISABLED\n                A comma-separated list of the stix2-elevator messages\n                to disable. Not to be used with --enable.\n\n                Example: --disable 212,220\n\n  -s, --silent\n                If this flag is set, all stix2-elevator messages will\n                be disabled.\n\n  --message-log-directory MESSAGE_LOG_DIRECTORY\n                If this flag is set, all stix2-elevator messages will\n                be saved to a file. The name of the file will be the\n                input file with extension .log in the specified\n                directory.\n\n                Note, make sure the directory already exists.\n\n                Example: --message-log-directory \"../logs\".\n\n  --log-level {DEBUG,INFO,WARN,ERROR,CRITICAL}\n                The logging output level.\n\n  -m MARKINGS_ALLOWED, --markings-allowed MARKINGS_ALLOWED\n                Avoid error exit, if these markings types\n                (as specified via their python class names) are in the\n                content, but not supported by the elevator. Specify as\n                a comma-separated list.\n\n                Example: --markings-allowed \"ISAMarkingsAssertion,ISAMarkings\"\n\n  -p {no_policy,strict_policy},\n  --error-policy {no_policy,strict_policy},\n  --policy {no_policy,strict_policy}   #deprecated\n               The policy to deal with errors. The default is 'no_policy'.\n\n  -v {2.0,2.1}, --version {2.0,2.1}\n               The version of stix 2 to be produced. The default is 2.1\n\n  -r, --ignore-required-properties\n                        Do not provide missing required properties\n\n\nRefer to elevator_log_messages.rst for all stix2-elevator messages. Use the\nassociated code number to --enable or --disable a message. By default, the\nstix2-elevator displays all messages.\n\nNote: disabling the message does not disable the functionality.\n\nAs A Library\n~~~~~~~~~~~~\n\nYou can also use this library to integrate STIX elevation into your own tools.\n\n.. code-block:: python\n\n    # Elevate a STIX 1.x via filename\n    # Use set_option_value to override default elevator options\n    # Read the documentation for options\n    from stix2elevator import elevate\n    from stix2elevator.options import initialize_options, set_option_value\n\n    initialize_options(options={\"spec_version\": \"2.1\"})\n\n    results = elevate(\"stix_file.xml\")\n    print(results)\n\nThe same method can also accept a string as an argument.\n\n.. code-block:: python\n\n    # Elevate a STIX 1.x via string\n    # Use set_option_value to override default elevator options\n    # Read the documentation for options\n    from stix2elevator import elevate\n    from stix2elevator.options import initialize_options, set_option_value\n\n    initialize_options(options={\"spec_version\": \"2.1\"})\n\n    results = elevate(\"<stix:Package...\")\n    print(results)\n\nThe same method can also accept a STIX 1.x package object as an argument.\n\n.. code-block:: python\n\n    # Elevate a STIX 1.x via string\n    from stix2elevator import elevate\n    from stix2elevator.options import initialize_options\n\n    initialize_options(options={\"spec_version\": \"2.1\"})\n\n    results = elevate(<STIX Package Object>)\n    print(results)\n\nTo set others options, use set_option_value() found in options.py, or add them as keywords to initialize_options().\n\nUsing the stepper\n~~~~~~~~~~~~~~~~~\n\nThe stix-stepper is a simple script that will convert STIX 2.0 content to STIX 2.1 content.\n\nYou can invoke it as follows.\n\n.. code-block:: bash\n\n    $ stix_stepper <2.0 file>\n\nThe 2.1 content is printed to stdout\n\nGovernance\n----------\n\nThis GitHub public repository (\n**https://github.com/oasis-open/cti-stix-elevator** ) was\n`proposed <https://lists.oasis-\nopen.org/archives/cti/201610/msg00106.html>`__\nand\n`approved <https://lists.oasis-\nopen.org/archives/cti/201610/msg00126.html>`__\n[`bis <https://issues.oasis-open.org/browse/TCADMIN-2477>`__] by the\n`OASIS Cyber Threat Intelligence (CTI)\nTC <https://www.oasis-open.org/committees/cti/>`__ as an `OASIS TC\nOpen Repository <https://www.oasis-open.org/resources/open-\nrepositories/>`__\nto support development of open source resources related to Technical\nCommittee work.\n\nWhile this TC Open Repository remains associated with the sponsor TC,\nits\ndevelopment priorities, leadership, intellectual property terms,\nparticipation rules, and other matters of governance are `separate and\ndistinct <https://github.com/oasis-open/cti-stix-\nelevator/blob/master/CONTRIBUTING.md#governance-distinct-from-oasis-\ntc-process>`__\nfrom the OASIS TC Process and related policies.\n\nAll contributions made to this TC Open Repository are subject to open\nsource license terms expressed in the `BSD-3-Clause\nLicense <https://www.oasis-open.org/sites/www.oasis-\nopen.org/files/BSD-3-Clause.txt>`__.\nThat license was selected as the declared `\"Applicable\nLicense\" <https://www.oasis-open.org/resources/open-\nrepositories/licenses>`__\nwhen the TC Open Repository was created.\n\nAs documented in `\"Public Participation\nInvited <https://github.com/oasis-open/cti-stix-\nelevator/blob/master/CONTRIBUTING.md#public-participation-\ninvited>`__\",\ncontributions to this OASIS TC Open Repository are invited from all\nparties, whether affiliated with OASIS or not. Participants must have\na\nGitHub account, but no fees or OASIS membership obligations are\nrequired. Participation is expected to be consistent with the `OASIS\nTC Open Repository Guidelines and\nProcedures <https://www.oasis-open.org/policies-guidelines/open-\nrepositories>`__,\nthe open source\n`LICENSE <https://github.com/oasis-open/cti-stix-\nelevator/blob/master/LICENSE>`__\ndesignated for this particular repository, and the requirement for an\n`Individual Contributor License\nAgreement <https://www.oasis-open.org/resources/open-\nrepositories/cla/individual-cla>`__\nthat governs intellectual property.\n\nMaintainers\n~~~~~~~~~~~\n\nTC Open Repository\n`Maintainers <https://www.oasis-open.org/resources/open-\nrepositories/maintainers-guide>`__\nare responsible for oversight of this project's community development\nactivities, including evaluation of GitHub `pull\nrequests <https://github.com/oasis-open/cti-stix-\nelevator/blob/master/CONTRIBUTING.md#fork-and-pull-collaboration-\nmodel>`__\nand\n`preserving <https://www.oasis-open.org/policies-guidelines/open-\nrepositories#repositoryManagement>`__\nopen source principles of openness and fairness. Maintainers are\nrecognized and trusted experts who serve to implement community goals\nand consensus design preferences.\n\nInitially, the associated TC members have designated one or more\npersons\nto serve as Maintainer(s); subsequently, participating community\nmembers\nmay select additional or substitute Maintainers, per `consensus\nagreements <https://www.oasis-open.org/resources/open-\nrepositories/maintainers-guide#additionalMaintainers>`__.\n\n**Current Maintainers of this TC Open Repository**\n\n-  `Jason Keirstead <mailto:Jason.Keirstead@ca.ibm.com>`__; GitHub ID:\n   https://github.com/JasonKeirstead; WWW: `IBM <http://www.ibm.com/>`__\n-  `Duncan Sparrell <mailto:duncan@sfractal.com>`__; GitHub ID:\n   https://github.com/sparrell; WWW: `sFractal <http://sfractal.com/>`__\n\nAbout OASIS TC Open Repositories\n--------------------------------\n\n-  `TC Open Repositories: Overview and\n   Resources <https://www.oasis-open.org/resources/open-\n   repositories/>`__\n-  `Frequently Asked\n   Questions <https://www.oasis-open.org/resources/open-\n   repositories/faq>`__\n-  `Open Source\n   Licenses <https://www.oasis-open.org/resources/open-\n   repositories/licenses>`__\n-  `Contributor License Agreements\n   (CLAs) <https://www.oasis-open.org/resources/open-\n   repositories/cla>`__\n-  `Maintainers' Guidelines and\n   Agreement <https://www.oasis-open.org/resources/open-\n   repositories/maintainers-guide>`__\n\nFeedback\n--------\n\nQuestions or comments about this TC Open Repository's activities\nshould be\ncomposed as GitHub issues or comments. If use of an issue/comment is\nnot\npossible or appropriate, questions may be directed by email to the\nMaintainer(s) `listed above <#currentMaintainers>`__. Please send\ngeneral questions about TC Open Repository participation to OASIS\nStaff at\nrepository-admin@oasis-open.org and any specific CLA-related questions\nto repository-cla@oasis-open.org.\n\n.. |Build_Status| image:: https://github.com/oasis-open/cti-stix-elevator/workflows/cti-stix-elevator%20test%20harness/badge.svg\n   :target: https://github.com/oasis-open/cti-stix-elevator/actions?query=workflow%3A%22cti-stix-elevator+test+harness%22\n.. |Coverage| image:: https://codecov.io/gh/oasis-open/cti-stix-elevator/branch/master/graph/badge.svg\n   :target: https://codecov.io/gh/oasis-open/cti-stix-elevator\n.. |Version| image:: https://img.shields.io/pypi/v/stix2-elevator.svg?maxAge=3600\n   :target: https://pypi.org/project/stix2-elevator/\n.. |Documentation_Status| image:: https://readthedocs.org/projects/stix2-elevator/badge/?version=latest\n   :target: https://stix2-elevator.readthedocs.io/en/latest/\n   :alt: Documentation Status\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Utility to upgrade STIX 1.X and CybOX content to STIX 2.X",
    "version": "4.1.7",
    "project_urls": {
        "Bug Tracker": "https://github.com/oasis-open/cti-stix-elevator/issues/",
        "Documentation": "https://stix2-elevator.readthedocs.io/",
        "Homepage": "https://oasis-open.github.io/cti-documentation/",
        "Source Code": "https://github.com/oasis-open/cti-stix-elevator/"
    },
    "split_keywords": [
        "stix",
        "stix2",
        "json",
        "xml",
        "cti",
        "cyber",
        "threat",
        "intelligence"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9b77211af6ebbe0481d7895647e4c3d86501d6c391804960810e7b32ad9aa4fe",
                "md5": "ea8c9d5fe24891163a997b2b04026a7d",
                "sha256": "e44d97b3c7a75645acf19169dfa78204d2637252441ad481f2554022e313c44f"
            },
            "downloads": -1,
            "filename": "stix2_elevator-4.1.7-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ea8c9d5fe24891163a997b2b04026a7d",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.7",
            "size": 104179,
            "upload_time": "2022-09-28T20:09:51",
            "upload_time_iso_8601": "2022-09-28T20:09:51.185270Z",
            "url": "https://files.pythonhosted.org/packages/9b/77/211af6ebbe0481d7895647e4c3d86501d6c391804960810e7b32ad9aa4fe/stix2_elevator-4.1.7-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aca73762b048580d4dc247a0489e830987ed4f693ad21f1bac17452a2aeec176",
                "md5": "8e948048107c9770c2c714ae5318c9c8",
                "sha256": "00a64705cf050092f03dd88b59d35dfa3ebd1d767efad7ceb2fc649ef501cab3"
            },
            "downloads": -1,
            "filename": "stix2-elevator-4.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "8e948048107c9770c2c714ae5318c9c8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 97304,
            "upload_time": "2022-09-28T20:09:53",
            "upload_time_iso_8601": "2022-09-28T20:09:53.926147Z",
            "url": "https://files.pythonhosted.org/packages/ac/a7/3762b048580d4dc247a0489e830987ed4f693ad21f1bac17452a2aeec176/stix2-elevator-4.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-09-28 20:09:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "oasis-open",
    "github_project": "cti-stix-elevator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "stix2-elevator"
}
        
Elapsed time: 0.21943s