vexipy


Namevexipy JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryPython OpenVEX Library
upload_time2025-07-15 12:27:30
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords openvex security vex vulnerability
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # vexipy

![py-vex logo](files/logo.png)

A Python implementation of the [OpenVEX specification][]

## Installing

TODO - Publish on PyPI

## Example Usage

```python
from vexipy import Component, Document, Statement, Vulnerability

vulnerability = Vulnerability(
    id="https://nvd.nist.gov/vuln/detail/CVE-2019-17571",
    name="CVE-2019-17571",
    description="The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.",
    aliases=[
        "GHSA-2qrg-x229-3v8q",
        "openSUSE-SU-2020:0051-1",
        "SNYK-RHEL7-LOG4J-1472071",
        "DSA-4686-1",
        "USN-4495",
        "DLA-2065-1",
    ],
)
print(vulnerability.to_json())

document = Document.from_json(
    """
    {
        "@context": "https://openvex.dev/ns/v0.2.0",
        "@id": "https://openvex.dev/docs/example/vex-9fb3463de1b57",
        "author": "Wolfi J Inkinson",
        "role": "Document Creator",
        "timestamp": "2023-01-08T18:02:03.647787998-06:00",
        "version": "1",
        "statements": [
            {
            "vulnerability": {
                "name": "CVE-2014-123456"
            },
            "products": [
                {"@id": "pkg:apk/distro/git@2.39.0-r1?arch=armv7"},
                {"@id": "pkg:apk/distro/git@2.39.0-r1?arch=x86_64"}
            ],
            "status": "fixed"
            }
        ]
    }
    """
)

statement = Statement(
    vulnerability=Vulnerability(name="CVE-2014-123456"),
    status="fixed",
)

component = Component(
    identifiers={"purl": "pkg:deb/debian/curl@7.50.3-1?arch=i386&distro=jessie"},
    hashes={"md5": "a2eec1a40a5315b1e2ff273aa747504b"},
)

statement = statement.update(products=[component])

document = document.append_statements(statement)
```

[OpenVEX specification]: https://github.com/openvex/spec/blob/main/OPENVEX-SPEC.md

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "vexipy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "openvex, security, vex, vulnerability",
    "author": null,
    "author_email": "Colin Pinnell McAllister <colinmca242@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/94/60/85437aec78e057530bb1acb119ae19e368368bfca200e3e4d2d260158c84/vexipy-0.1.0.tar.gz",
    "platform": null,
    "description": "# vexipy\n\n![py-vex logo](files/logo.png)\n\nA Python implementation of the [OpenVEX specification][]\n\n## Installing\n\nTODO - Publish on PyPI\n\n## Example Usage\n\n```python\nfrom vexipy import Component, Document, Statement, Vulnerability\n\nvulnerability = Vulnerability(\n    id=\"https://nvd.nist.gov/vuln/detail/CVE-2019-17571\",\n    name=\"CVE-2019-17571\",\n    description=\"The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.\",\n    aliases=[\n        \"GHSA-2qrg-x229-3v8q\",\n        \"openSUSE-SU-2020:0051-1\",\n        \"SNYK-RHEL7-LOG4J-1472071\",\n        \"DSA-4686-1\",\n        \"USN-4495\",\n        \"DLA-2065-1\",\n    ],\n)\nprint(vulnerability.to_json())\n\ndocument = Document.from_json(\n    \"\"\"\n    {\n        \"@context\": \"https://openvex.dev/ns/v0.2.0\",\n        \"@id\": \"https://openvex.dev/docs/example/vex-9fb3463de1b57\",\n        \"author\": \"Wolfi J Inkinson\",\n        \"role\": \"Document Creator\",\n        \"timestamp\": \"2023-01-08T18:02:03.647787998-06:00\",\n        \"version\": \"1\",\n        \"statements\": [\n            {\n            \"vulnerability\": {\n                \"name\": \"CVE-2014-123456\"\n            },\n            \"products\": [\n                {\"@id\": \"pkg:apk/distro/git@2.39.0-r1?arch=armv7\"},\n                {\"@id\": \"pkg:apk/distro/git@2.39.0-r1?arch=x86_64\"}\n            ],\n            \"status\": \"fixed\"\n            }\n        ]\n    }\n    \"\"\"\n)\n\nstatement = Statement(\n    vulnerability=Vulnerability(name=\"CVE-2014-123456\"),\n    status=\"fixed\",\n)\n\ncomponent = Component(\n    identifiers={\"purl\": \"pkg:deb/debian/curl@7.50.3-1?arch=i386&distro=jessie\"},\n    hashes={\"md5\": \"a2eec1a40a5315b1e2ff273aa747504b\"},\n)\n\nstatement = statement.update(products=[component])\n\ndocument = document.append_statements(statement)\n```\n\n[OpenVEX specification]: https://github.com/openvex/spec/blob/main/OPENVEX-SPEC.md\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python OpenVEX Library",
    "version": "0.1.0",
    "project_urls": null,
    "split_keywords": [
        "openvex",
        " security",
        " vex",
        " vulnerability"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9053256f486520f3cce95d3c4f98e75b083ce4468a8b63baff06f2ae359c76ef",
                "md5": "e1bfd745dd5ee7c12120c96df8f37e3e",
                "sha256": "6b88196b2fe412dffe5c6c8229c708533b9393e12097b0337dccbfd18f62bedf"
            },
            "downloads": -1,
            "filename": "vexipy-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e1bfd745dd5ee7c12120c96df8f37e3e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 9060,
            "upload_time": "2025-07-15T12:27:29",
            "upload_time_iso_8601": "2025-07-15T12:27:29.141886Z",
            "url": "https://files.pythonhosted.org/packages/90/53/256f486520f3cce95d3c4f98e75b083ce4468a8b63baff06f2ae359c76ef/vexipy-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "946085437aec78e057530bb1acb119ae19e368368bfca200e3e4d2d260158c84",
                "md5": "9c37c7b4e6ddea078147488b28b8ab63",
                "sha256": "67e3f2342932759d8ce70c6ddfbce1e44a46581f44c6469bee36d39a7d6830f5"
            },
            "downloads": -1,
            "filename": "vexipy-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9c37c7b4e6ddea078147488b28b8ab63",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 444857,
            "upload_time": "2025-07-15T12:27:30",
            "upload_time_iso_8601": "2025-07-15T12:27:30.114675Z",
            "url": "https://files.pythonhosted.org/packages/94/60/85437aec78e057530bb1acb119ae19e368368bfca200e3e4d2d260158c84/vexipy-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-15 12:27:30",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "vexipy"
}
        
Elapsed time: 0.61299s