cti-pattern-validator
=====================
This is an `OASIS TC Open Repository
<https://www.oasis-open.org/resources/open-repositories/>`__. See the
`Governance <#governance>`__ section for more information.
The STIX 2 Pattern Validator is a software tool for checking the syntax of the
Cyber Threat Intelligence (CTI) STIX Pattern expressions, which are used within
STIX to express conditions (prepresented with the Cyber Observable data model)
that indicate particular cyber threat activity. The repository contains source
code, an ANTLR grammar, automated tests and associated documentation for the
tool. The validator can be used as a command-line tool or as a Python library
which can be included in other applications.
|Build_Status| |Coverage| |Version|
Quickstart
----------
1. Install with pip:
.. code-block:: bash
$ pip install stix2-patterns
2. Validate a pattern from the command line:
.. code-block:: bash
$ validate-patterns
Enter a pattern to validate: [file-object:hashes.md5 = '79054025255fb1a26e4bc422aef54eb4']
PASS: [file-object:hashes.md5 = '79054025255fb1a26e4bc422aef54eb4']
3. Validate a pattern from Python code:
.. code:: python
from stix2patterns.validator import run_validator
pattern = "[file-object:hashes.md5 = '79054025255fb1a26e4bc422aef54eb4']"
errors = run_validator(pattern)
For more information, see the `stix2-patterns documentation <https://stix2-patterns.readthedocs.io/>`_
Governance
----------
This GitHub public repository
(**https://github.com/oasis-open/cti-pattern-validator** ) was `proposed
<https://lists.oasis- open.org/archives/cti/201609/msg00001.html>`__ and
`approved <https://www.oasis-open.org/committees/ballot.php?id=2971>`__ [`bis
<https://issues.oasis-open.org/browse/TCADMIN-2431>`__\ ] 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-pattern-validator/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-pattern-validator/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-pattern-validator/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-pattern-validator/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>`__.
.. _currentMaintainers:
Current Maintainers of this TC Open Repository
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- `Chris Lenk <mailto:clenk@mitre.org>`__; GitHub ID:
https://github.com/clenk; WWW: `MITRE <https://www.mitre.org>`__
- `Jason Keirstead <mailto:Jason.Keirstead@ca.ibm.com>`__; GitHub ID:
https://github.com/JasonKeirstead; WWW: `IBM <http://www.ibm.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-pattern-validator/workflows/cti-pattern-validator%20test%20harness/badge.svg
:target: https://github.com/oasis-open/cti-pattern-validator/actions?query=workflow%3A%22cti-pattern-validator+test+harness%22
.. |Coverage| image:: https://codecov.io/gh/oasis-open/cti-pattern-validator/branch/master/graph/badge.svg
:target: https://codecov.io/gh/oasis-open/cti-pattern-validator
.. |Version| image:: https://img.shields.io/pypi/v/stix2-patterns.svg?maxAge=3600
:target: https://pypi.org/project/stix2-patterns/
Raw data
{
"_id": null,
"home_page": "https://github.com/oasis-open/cti-pattern-validator",
"name": "stix2-patterns",
"maintainer": "Chris Lenk",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "clenk@mitre.org",
"keywords": "",
"author": "OASIS Cyber Threat Intelligence Technical Committee",
"author_email": "cti-users@lists.oasis-open.org",
"download_url": "https://files.pythonhosted.org/packages/55/38/13c114116f6b9028b91fe4dac486446abc2ecdaffd55deda70489ba88519/stix2-patterns-2.0.0.tar.gz",
"platform": null,
"description": "cti-pattern-validator\n=====================\n\nThis is an `OASIS TC Open Repository\n<https://www.oasis-open.org/resources/open-repositories/>`__. See the\n`Governance <#governance>`__ section for more information.\n\nThe STIX 2 Pattern Validator is a software tool for checking the syntax of the\nCyber Threat Intelligence (CTI) STIX Pattern expressions, which are used within\nSTIX to express conditions (prepresented with the Cyber Observable data model)\nthat indicate particular cyber threat activity. The repository contains source\ncode, an ANTLR grammar, automated tests and associated documentation for the\ntool. The validator can be used as a command-line tool or as a Python library\nwhich can be included in other applications.\n\n|Build_Status| |Coverage| |Version|\n\nQuickstart\n----------\n\n1. Install with pip:\n\n .. code-block:: bash\n\n $ pip install stix2-patterns\n\n2. Validate a pattern from the command line:\n\n .. code-block:: bash\n\n $ validate-patterns\n Enter a pattern to validate: [file-object:hashes.md5 = '79054025255fb1a26e4bc422aef54eb4']\n PASS: [file-object:hashes.md5 = '79054025255fb1a26e4bc422aef54eb4']\n\n3. Validate a pattern from Python code:\n\n .. code:: python\n\n from stix2patterns.validator import run_validator\n\n pattern = \"[file-object:hashes.md5 = '79054025255fb1a26e4bc422aef54eb4']\"\n errors = run_validator(pattern)\n\nFor more information, see the `stix2-patterns documentation <https://stix2-patterns.readthedocs.io/>`_\n\nGovernance\n----------\n\nThis GitHub public repository\n(**https://github.com/oasis-open/cti-pattern-validator** ) was `proposed\n<https://lists.oasis- open.org/archives/cti/201609/msg00001.html>`__ and\n`approved <https://www.oasis-open.org/committees/ballot.php?id=2971>`__ [`bis\n<https://issues.oasis-open.org/browse/TCADMIN-2431>`__\\ ] by the `OASIS Cyber\nThreat Intelligence (CTI) TC <https://www.oasis-open.org/committees/cti/>`__ as\nan `OASIS TC Open Repository\n<https://www.oasis-open.org/resources/open-repositories/>`__ to support\ndevelopment of open source resources related to Technical Committee work.\n\nWhile this TC Open Repository remains associated with the sponsor TC, its\ndevelopment priorities, leadership, intellectual property terms, participation\nrules, and other matters of governance are `separate and distinct\n<https://github.com/oasis-open/cti-pattern-validator/blob/master/CONTRIBUTING.md#governance-distinct-from-oasis-tc-process>`__\nfrom the OASIS TC Process and related policies.\n\nAll contributions made to this TC Open Repository are subject to open source\nlicense terms expressed in the `BSD-3-Clause License\n<https://www.oasis-open.org/sites/www.oasis-open.org/files/BSD-3-Clause.txt>`__.\nThat license was selected as the declared `\"Applicable License\"\n<https://www.oasis-open.org/resources/open-repositories/licenses>`__ when the TC\nOpen Repository was created.\n\nAs documented in `\"Public Participation Invited\n<https://github.com/oasis-open/cti-pattern-validator/blob/master/CONTRIBUTING.md#public-participation-invited>`__\",\ncontributions to this OASIS TC Open Repository are invited from all parties,\nwhether affiliated with OASIS or not. Participants must have a GitHub account,\nbut no fees or OASIS membership obligations are required. Participation is\nexpected to be consistent with the `OASIS TC Open Repository Guidelines and\nProcedures\n<https://www.oasis-open.org/policies-guidelines/open-repositories>`__,\nthe open source `LICENSE\n<https://github.com/oasis-open/cti-pattern-validator/blob/master/LICENSE>`__\ndesignated for this particular repository, and the requirement for an\n`Individual Contributor License Agreement\n<https://www.oasis-open.org/resources/open-repositories/cla/individual-cla>`__\nthat governs intellectual property.\n\nMaintainers\n~~~~~~~~~~~\n\nTC Open Repository `Maintainers\n<https://www.oasis-open.org/resources/open-repositories/maintainers-guide>`__\nare responsible for oversight of this project's community development\nactivities, including evaluation of GitHub `pull requests\n<https://github.com/oasis-open/cti-pattern-validator/blob/master/CONTRIBUTING.md#fork-and-pull-collaboration-model>`__\nand `preserving\n<https://www.oasis-open.org/policies-guidelines/open-repositories#repositoryManagement>`__\nopen source principles of openness and fairness. Maintainers are recognized and\ntrusted experts who serve to implement community goals and consensus design\npreferences.\n\nInitially, the associated TC members have designated one or more persons to\nserve as Maintainer(s); subsequently, participating community members may select\nadditional or substitute Maintainers, per `consensus agreements\n<https://www.oasis-open.org/resources/open-repositories/maintainers-guide#additionalMaintainers>`__.\n\n.. _currentMaintainers:\n\nCurrent Maintainers of this TC Open Repository\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n- `Chris Lenk <mailto:clenk@mitre.org>`__; GitHub ID:\n https://github.com/clenk; WWW: `MITRE <https://www.mitre.org>`__\n- `Jason Keirstead <mailto:Jason.Keirstead@ca.ibm.com>`__; GitHub ID:\n https://github.com/JasonKeirstead; WWW: `IBM <http://www.ibm.com/>`__\n\nAbout OASIS TC Open Repositories\n--------------------------------\n\n- `TC Open Repositories: Overview and Resources\n <https://www.oasis-open.org/resources/open-repositories/>`_\n- `Frequently Asked Questions\n <https://www.oasis-open.org/resources/open-repositories/faq>`_\n- `Open Source Licenses\n <https://www.oasis-open.org/resources/open-repositories/licenses>`_\n- `Contributor License Agreements (CLAs)\n <https://www.oasis-open.org/resources/open-repositories/cla>`_\n- `Maintainers' Guidelines and Agreement\n <https://www.oasis-open.org/resources/open-repositories/maintainers-guide>`_\n\nFeedback\n--------\n\nQuestions or comments about this TC Open Repository's activities should be\ncomposed as GitHub issues or comments. If use of an issue/comment is not\npossible or appropriate, questions may be directed by email to the Maintainer(s)\n`listed above <#currentmaintainers>`__. Please send general questions about TC\nOpen Repository participation to OASIS Staff at repository-admin@oasis-open.org\nand any specific CLA-related questions to repository-cla@oasis-open.org.\n\n.. |Build_Status| image:: https://github.com/oasis-open/cti-pattern-validator/workflows/cti-pattern-validator%20test%20harness/badge.svg\n :target: https://github.com/oasis-open/cti-pattern-validator/actions?query=workflow%3A%22cti-pattern-validator+test+harness%22\n.. |Coverage| image:: https://codecov.io/gh/oasis-open/cti-pattern-validator/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/oasis-open/cti-pattern-validator\n.. |Version| image:: https://img.shields.io/pypi/v/stix2-patterns.svg?maxAge=3600\n :target: https://pypi.org/project/stix2-patterns/\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Validate STIX 2 Patterns.",
"version": "2.0.0",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "68443e2ed5dbd4aeabf5f61380e6554a",
"sha256": "ca4d68b2db42ed99794a418388769d2676ca828e9cac0b8629e73cd3f68f6458"
},
"downloads": -1,
"filename": "stix2_patterns-2.0.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "68443e2ed5dbd4aeabf5f61380e6554a",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.6",
"size": 65867,
"upload_time": "2022-03-31T21:24:48",
"upload_time_iso_8601": "2022-03-31T21:24:48.576620Z",
"url": "https://files.pythonhosted.org/packages/89/22/0255d7aca7b920a27fbcbab72754133615a731a92838a6dde2ed436ce051/stix2_patterns-2.0.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "e17e8a750646eb39eba0166f6cf5f017",
"sha256": "07750c5a5af2c758e9d2aa4dde9d8e04bcd162ac2a9b0b4c4de4481d443efa08"
},
"downloads": -1,
"filename": "stix2-patterns-2.0.0.tar.gz",
"has_sig": false,
"md5_digest": "e17e8a750646eb39eba0166f6cf5f017",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 61800,
"upload_time": "2022-03-31T21:24:50",
"upload_time_iso_8601": "2022-03-31T21:24:50.157104Z",
"url": "https://files.pythonhosted.org/packages/55/38/13c114116f6b9028b91fe4dac486446abc2ecdaffd55deda70489ba88519/stix2-patterns-2.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-03-31 21:24:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "oasis-open",
"github_project": "cti-pattern-validator",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "stix2-patterns"
}