Skip to main content

Red Hat Security Data API

Project description

rh-sec-data

Python wrapper Red Hat Security Data API

Python Versions PyPI version github actions License: GPLv3 Code style: black

It simply provides Python wrapper API for Red Hat Security Data API

Installation

pip install rh-sec-data

Usage

Wrapper API:

You can import methods from rh_sec_data

In [1]: from rh_sec_data import get_cve

In [2]: cves = get_cve() # Call without any filter. It will return list of dict for first 1000 CVEs.

In [3]: len(cves)
Out[3]: 1000

In [4]: cves = get_cve(advisory="RHSA-2016:0614") # Filter with specific advisory.

In [5]: len(cves)
Out[5]: 8

In [6]: get_cve(advisory="RHSA-2016:0614", bug="1317990") # Filter with specific advisory and bug.
Out[6]:
[{'CVE': 'CVE-2016-2118',
  'severity': 'important',
  'public_date': '2016-04-12T00:00:00Z',
  'advisories': ['RHSA-2016:0618',
   'RHSA-2016:0619',
   'RHSA-2016:0623',
   'RHSA-2016:0612',
   'RHSA-2016:0613',
   'RHSA-2016:0624',
   'RHSA-2016:0625',
   'RHSA-2016:0614',
   'RHSA-2016:0620',
   'RHSA-2016:0621',
   'RHSA-2016:0611'],
  'bugzilla': '1317990',
  'bugzilla_description': 'CVE-2016-2118 samba: SAMR and LSA man in the middle attacks',
  'cvss_score': 6.8,
  'cvss_scoring_vector': 'AV:N/AC:M/Au:N/C:P/I:P/A:P',
  'CWE': 'CWE-300',
  'affected_packages': ['samba4-0:4.2.10-6.el6_2',
   'samba4-0:4.2.10-6.el6_4',
   'samba4-0:4.2.10-6.el6_5',
   'samba3x-0:3.6.23-12.el5_9',
   'samba4-0:4.2.10-6.el6_6',
   'samba4-0:4.2.10-6.el6_7',
   'samba-0:3.6.23-30.el6_6',
   'samba3x-0:3.6.23-12.el5_11',
   'samba-0:3.6.23-30.el6_7',
   'samba-0:4.2.11-2.el6rhs',
   'samba-0:3.6.23-30.el6_2',
   'samba-0:4.2.10-6.el7_2',
   'samba-0:3.6.23-30.el6_4',
   'samba-0:3.6.23-30.el6_5',
   'samba-0:3.0.33-3.41.el5_11',
   'samba-0:4.2.11-2.el7rhgs',
   'samba-0:3.0.33-3.40.el5_9',
   'samba-0:4.2.10-5.ael7b_1',
   'samba-0:3.0.33-3.37.el4'],
  'resource_url': 'https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2016-2118.json'}]

CLI:

It's in WIP state.

❯❯❯ rh-sec-data
Usage: rh-sec-data [OPTIONS] COMMAND [ARGS]...

  Red Hat Security Data API.

Options:
  --help  Show this message and exit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rh-sec-data-0.0.2.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

rh_sec_data-0.0.2-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file rh-sec-data-0.0.2.tar.gz.

File metadata

  • Download URL: rh-sec-data-0.0.2.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for rh-sec-data-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8233eeae7c644d9ab83ffacf8d152f0df25ac90fc68e1a365f379726cd23c15f
MD5 f3f6e9ca231c9f32e1061abdde379832
BLAKE2b-256 d1a811e3771867407e99a0613d5cd60c857bd5e2d734489bf00d8fc9d3ef4b69

See more details on using hashes here.

File details

Details for the file rh_sec_data-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: rh_sec_data-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for rh_sec_data-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b11fe1cfc48b5321bf60e6772721ccaf88aa8d936778e697841599806365afd4
MD5 89198202e94eff608eed94cccea29188
BLAKE2b-256 94f008dc8fd945a17a3f940f7489c4fd8fa07b0e8e4bb40a2b683e51f11fd091

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page