|Build_Status| |Coverage| |Version|
cti-stix-slider
===============
NOTE: This is an `OASIS TC Open
Repository <https://www.oasis-open.org/resources/open-
repositories/>`_.
See the `Governance`_ section for more information.
The stix-slider is a software tool for 'sliding' STIX 2.x JSON to STIX
1.x XML. Due to the differences between STIX 1.x and STIX 2.x, this
conversion is best-effort only. During the conversion, stix-slider
provides information on the assumptions it needs to make to produce
valid STIX
1.x XML, and what information was not able to be converted.
The stix-slider is a work-in-progress. It should be used to explore
how STIX 2.x content could potentially be represented in STIX 1.x.
Using the current version of the slider will provide insight to issues
that might need to be mitigated to convert your STIX 2.x content for
use in application that accept only STIX 1.x content.
**It should not be used in a production environment, and should not be
considered final.**
Please enter any comments on how to improve it into the issue tracker.
For more information, see `the
documentation <https://cti-stix-slider.readthedocs.io/>`__ on
ReadTheDocs.
Requirements
------------
- Python 3.8+
- `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/python-stix2>`_ >= 3.0.0
- `stixmarx <https://pypi.org/project/stixmarx>`_ >= 1.0.8
- `stix-validator <https://pypi.org/project/stix-validator>`_ >= 3.0.0
Installation
------------
Install with pip::
$ pip install stix2-slider
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::
$ pip install 'stix<1.2'
$ pip install stix2-slider
You can also install the stix-slider from GitHub to get the latest
(unstable) version::
$ pip install git+https://github.com/oasis-open/cti-stix-slider.git
Usage
-----
It is recommended that you ensure that the input STIX 2.x file is
valid before submitting it to the slider.
Use the `stix2-validator <https://pypi.org/project//stix2-validator>`_.
As A Script
~~~~~~~~~~~
The slider comes with a bundled script which you can use to convert
STIX 2.x content to STIX 1.x content::
usage: stix2_slider [-h] [--no-squirrel-gaps] [--validator-args VALIDATOR_ARGS]
[-e ENABLE] [-d DISABLE] [-s]
[--message-log-directory MESSAGE_LOG_DIRECTORY]
[--log-level {DEBUG,INFO,WARN,ERROR,CRITICAL}]
[--use-namespace USE_NAMESPACE]
file
stix2-slider v4.0.1
The stix2-slider is a work-in-progress. It should be used to explore how
existing STIX 2.x would potentially be represented in STIX 1.x. Using the
current version of the stix2-slider will provide insight to issues that might need
to be mitigated so you can use an application that supports only STIX 1.x content.
positional arguments: The input STIX 2.x document to be 'slid' to STIX 1.x..
optional arguments:
-h, --help show this help message and exit
--no-squirrel-gaps Do not include STIX 2.x content that cannot be
represented directly in STIX 1.x using the description
property.
--validator-args VALIDATOR_ARGS
Arguments to pass to stix-validator. Example:
stix2_slider <file> --validator-args="--best-
practices"
-e ENABLE, --enable ENABLE
A comma-separated list of the stix2-slider messages to
enable. If the --disable option is not used, no other
messages will be shown. Example: stix2_slider <file>
--enable 250
-d DISABLE, --disable DISABLE
A comma-separated list of the stix2-slider messages to
disable. Example: stix2_slider <file> --disable
212,220
-s, --silent If this flag is set. All stix2-slider messages will be
disabled.
--message-log-directory MESSAGE_LOG_DIRECTORY
If this flag is set, all stix2-slider messages will be
saved to 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:
stix2_slider <file> --message-log-directory "../logs"
--log-level {DEBUG,INFO,WARN,ERROR,CRITICAL}
The logging output level.
--use-namespace USE_NAMESPACE
Override the 'example' namespace with the provided one.
The format is the prefix, namespace uri and optionally
the schema location separated by a space. Example:
stix2_slider <file> --use-namespace="example
http://example.com"
Refer to slider_log_messages.rst for all stix2-slider messages. Use the associated code number
to --enable or --disable a message. By default, the stix2-slider displays all
messages. Note: disabling the message does not disable the functionality.
As A Library
~~~~~~~~~~~~
You can also use this library to integrate STIX 'sliding' into your
own
tools. You can slide a STIX 2.x file::
from stix2slider import slide_file
from stix2slider.options import initialize_options
initialize_options()
results = slide_file("stix_file.json")
print(results)
Additionally, a similar method exists to accept a string as an
argument::
from stix2slider import slide_string
from stix2slider.options import initialize_options
initialize_options()
results = slide_string("...")
print(results)
To set options, use set_option_value, found in options.py.
Governance
----------
This GitHub public repository (
**https://github.com/oasis-open/cti-stix-slider** ) was
was created at the request of the
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-
slider/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-
slider/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-
slider/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.
Statement of Purpose
~~~~~~~~~~~~~~~~~~~~
Statement of Purpose for this OASIS TC Open Repository (cti-stix-
slider) as `proposed <https://lists.oasis-
open.org/archives/cti/201711/msg00000.html>`_ and `approved
<https://lists.oasis-open.org/archives/cti/201711/msg00002.html>`_
`[bis] <https://issues.oasis-open.org/browse/TCADMIN-2807>`_ by the
TC:
This GitHub public repository is provided to support version-
controlled development of a Python "slider" application which will
convert `STIX 2.x <http://docs.oasis-open.org/cti/stix/v2.x/>`_
content to `STIX 1.x <http://docs.oasis-open.org/cti/stix/v1.2.1/>`_
content.
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-
slider/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@cyware.com>`__; GitHub ID:
https://github.com/JasonKeirstead; WWW: `Cyware Labs <http://www.cyware.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-slider/workflows/cti-stix-slider%20test%20harness/badge.svg
:target: https://github.com/oasis-open/cti-stix-slider/actions?query=workflow%3A%22cti-stix-slider+test+harness%22
.. |Coverage| image:: https://codecov.io/gh/oasis-open/cti-stix-slider/branch/master/graph/badge.svg
:target: https://codecov.io/gh/oasis-open/cti-stix-slider
.. |Version| image:: https://img.shields.io/pypi/v/stix2-slider.svg?maxAge=3600
:target: https://pypi.python.org/pypi/stix2-slider/
Raw data
{
"_id": null,
"home_page": "https://oasis-open.github.io/cti-documentation/",
"name": "stix2-slider",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"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": "",
"platform": null,
"description": "|Build_Status| |Coverage| |Version|\n\ncti-stix-slider\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 stix-slider is a software tool for 'sliding' STIX 2.x JSON to STIX\n1.x XML. Due to the differences between STIX 1.x and STIX 2.x, this\nconversion is best-effort only. During the conversion, stix-slider\nprovides information on the assumptions it needs to make to produce\nvalid STIX\n1.x XML, and what information was not able to be converted.\n\nThe stix-slider is a work-in-progress. It should be used to explore\nhow STIX 2.x content could potentially be represented in STIX 1.x.\nUsing the current version of the slider will provide insight to issues\nthat might need to be mitigated to convert your STIX 2.x content for\nuse in application that accept only STIX 1.x content.\n\n**It should not be used in a production environment, and should not be\nconsidered final.**\n\nPlease enter any comments on how to improve it into the issue tracker.\n\nFor more information, see `the\ndocumentation <https://cti-stix-slider.readthedocs.io/>`__ on\nReadTheDocs.\n\n\n\nRequirements\n------------\n\n- Python 3.8+\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\n 1.1.1.x or\n 1.2.0.x, depending on whether you want to support STIX 1.1.1 or\n STIX 1.2.\n\n- `python-stix2 <https://pypi.org/project/python-stix2>`_ >= 3.0.0\n- `stixmarx <https://pypi.org/project/stixmarx>`_ >= 1.0.8\n- `stix-validator <https://pypi.org/project/stix-validator>`_ >= 3.0.0\n\nInstallation\n------------\n\nInstall with pip::\n\n $ pip install stix2-slider\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\nfirst::\n\n $ pip install 'stix<1.2'\n $ pip install stix2-slider\n\nYou can also install the stix-slider from GitHub to get the latest\n(unstable) version::\n\n $ pip install git+https://github.com/oasis-open/cti-stix-slider.git\n\nUsage\n-----\n\nIt is recommended that you ensure that the input STIX 2.x file is\nvalid before submitting it to the slider.\nUse the `stix2-validator <https://pypi.org/project//stix2-validator>`_.\n\nAs A Script\n~~~~~~~~~~~\n\nThe slider comes with a bundled script which you can use to convert\nSTIX 2.x content to STIX 1.x content::\n\n usage: stix2_slider [-h] [--no-squirrel-gaps] [--validator-args VALIDATOR_ARGS]\n [-e ENABLE] [-d DISABLE] [-s]\n [--message-log-directory MESSAGE_LOG_DIRECTORY]\n [--log-level {DEBUG,INFO,WARN,ERROR,CRITICAL}]\n [--use-namespace USE_NAMESPACE]\n file\n\n stix2-slider v4.0.1\n\n The stix2-slider is a work-in-progress. It should be used to explore how\n existing STIX 2.x would potentially be represented in STIX 1.x. Using the\n current version of the stix2-slider will provide insight to issues that might need\n to be mitigated so you can use an application that supports only STIX 1.x content.\n\n positional arguments: The input STIX 2.x document to be 'slid' to STIX 1.x..\n\n optional arguments:\n -h, --help show this help message and exit\n\n --no-squirrel-gaps Do not include STIX 2.x content that cannot be\n represented directly in STIX 1.x using the description\n property.\n\n --validator-args VALIDATOR_ARGS\n Arguments to pass to stix-validator. Example:\n stix2_slider <file> --validator-args=\"--best-\n practices\"\n\n -e ENABLE, --enable ENABLE\n A comma-separated list of the stix2-slider messages to\n enable. If the --disable option is not used, no other\n messages will be shown. Example: stix2_slider <file>\n --enable 250\n\n -d DISABLE, --disable DISABLE\n A comma-separated list of the stix2-slider messages to\n disable. Example: stix2_slider <file> --disable\n 212,220\n\n -s, --silent If this flag is set. All stix2-slider messages will be\n disabled.\n\n --message-log-directory MESSAGE_LOG_DIRECTORY\n If this flag is set, all stix2-slider messages will be\n saved to file. The name of the file will be the input\n file with extension .log in the specified directory.\n Note, make sure the directory already exists. Example:\n stix2_slider <file> --message-log-directory \"../logs\"\n\n --log-level {DEBUG,INFO,WARN,ERROR,CRITICAL}\n The logging output level.\n\n --use-namespace USE_NAMESPACE\n Override the 'example' namespace with the provided one.\n The format is the prefix, namespace uri and optionally\n the schema location separated by a space. Example:\n stix2_slider <file> --use-namespace=\"example\n http://example.com\"\n\n Refer to slider_log_messages.rst for all stix2-slider messages. Use the associated code number\n to --enable or --disable a message. By default, the stix2-slider displays all\n messages. Note: disabling the message does not disable the functionality.\n\nAs A Library\n~~~~~~~~~~~~\n\nYou can also use this library to integrate STIX 'sliding' into your\nown\ntools. You can slide a STIX 2.x file::\n\n from stix2slider import slide_file\n from stix2slider.options import initialize_options\n\n initialize_options()\n results = slide_file(\"stix_file.json\")\n print(results)\n\nAdditionally, a similar method exists to accept a string as an\nargument::\n\n from stix2slider import slide_string\n from stix2slider.options import initialize_options\n\n initialize_options()\n results = slide_string(\"...\")\n print(results)\n\nTo set options, use set_option_value, found in options.py.\n\nGovernance\n----------\n\nThis GitHub public repository (\n**https://github.com/oasis-open/cti-stix-slider** ) was\nwas created at the request of the\nthe\n`OASIS Cyber Threat Intelligence (CTI)\nTC <https://www.oasis-open.org/committees/cti/>`__ as an `OASIS TC\nOpen\nRepository <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-\nslider/blob/master/CONTRIBUTING.md#governance-distinct-from-oasis-tc-\nprocess>`__\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-\nslider/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-\nslider/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\nStatement of Purpose\n~~~~~~~~~~~~~~~~~~~~\n\nStatement of Purpose for this OASIS TC Open Repository (cti-stix-\nslider) as `proposed <https://lists.oasis-\nopen.org/archives/cti/201711/msg00000.html>`_ and `approved\n<https://lists.oasis-open.org/archives/cti/201711/msg00002.html>`_\n`[bis] <https://issues.oasis-open.org/browse/TCADMIN-2807>`_ by the\nTC:\n\nThis GitHub public repository is provided to support version-\ncontrolled development of a Python \"slider\" application which will\nconvert `STIX 2.x <http://docs.oasis-open.org/cti/stix/v2.x/>`_\ncontent to `STIX 1.x <http://docs.oasis-open.org/cti/stix/v1.2.1/>`_\ncontent.\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-\nslider/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@cyware.com>`__; GitHub ID:\n https://github.com/JasonKeirstead; WWW: `Cyware Labs <http://www.cyware.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-slider/workflows/cti-stix-slider%20test%20harness/badge.svg\n :target: https://github.com/oasis-open/cti-stix-slider/actions?query=workflow%3A%22cti-stix-slider+test+harness%22\n.. |Coverage| image:: https://codecov.io/gh/oasis-open/cti-stix-slider/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/oasis-open/cti-stix-slider\n.. |Version| image:: https://img.shields.io/pypi/v/stix2-slider.svg?maxAge=3600\n :target: https://pypi.python.org/pypi/stix2-slider/\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Utilities to downgrade STIX 2.1 content to STIX 1.X and CyBOX 2.1",
"version": "4.0.1",
"project_urls": {
"Bug Tracker": "https://github.com/oasis-open/cti-stix-slider/issues/",
"Documentation": "https://cti-stix-slider.readthedocs.io/",
"Homepage": "https://oasis-open.github.io/cti-documentation/",
"Source Code": "https://github.com/oasis-open/cti-stix-slider/"
},
"split_keywords": [
"stix",
"stix2",
"json",
"xml",
"cti",
"cyber",
"threat",
"intelligence"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4ee5713cf8129c00419588545f81d1f7145c2802d4356a7916bbfee06509e149",
"md5": "3062c59337485b38342a6b812f714ea6",
"sha256": "6e449dcf15574ac22cf3ec7435ae8c8672313f7b8693e946d40468a4907297a3"
},
"downloads": -1,
"filename": "stix2_slider-4.0.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "3062c59337485b38342a6b812f714ea6",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 56871,
"upload_time": "2024-02-19T17:39:47",
"upload_time_iso_8601": "2024-02-19T17:39:47.192626Z",
"url": "https://files.pythonhosted.org/packages/4e/e5/713cf8129c00419588545f81d1f7145c2802d4356a7916bbfee06509e149/stix2_slider-4.0.1-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-19 17:39:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "oasis-open",
"github_project": "cti-stix-slider",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"tox": true,
"lcname": "stix2-slider"
}