Vulnerabilities

Table of Contents

Client

class Vulnerabilities.Client

A client object representing ‘Vulnerabilities’ Service:

import almdrlib

client = almdrlib.client('vulnerabilities')

Available methods:

add_remediation(**kwargs)

Returns the remediation id. If a remediation with the same id already exists in the database no object will be created. This functionality is only available for privileged users/services

Request Syntax

response = client.add_remediation(
    description='string'
    id='string'
    name='string'
    vulnerability_ids=[
        'None'
    ]
)
Parameters
  • description (string) –

  • id (string) –

  • name (string) –

  • vulnerability_ids (list) –

    • (dict) –

Return type

dict

Returns

Response Syntax

{
    'id': 'string'
}

Response Definitions

  • id (string) –

add_remediation_list(**kwargs)

Creates multiple remediation objects. If a remediation with the same description already exists in the database no object will be created.This functionality is only available for privileged users/services

Request Syntax

response = client.add_remediation_list(
    data=[
        {
            'description': 'string',
            'id': 'string',
            'name': 'string',
            'vulnerability_ids': [
                'None'
            ]
        }
    ]
)
Parameters

data (list) –

  • (dict) –

    Remediation definition

    • description (string) –

    • id (string) –

    • name (string) –

    • vulnerability_ids (list) –

      • (dict) –

Returns

None

add_vulnerability(**kwargs)

Returns the vulnerability id after creation. This functionality is only available for privileged users/services

Request Syntax

response = client.add_vulnerability(
    bid=[
        'None'
    ]
    cis_content='None'
    class='string'
    cve=[
        'None'
    ]
    cvss_vector='None'
    cwe='string'
    cwe_name='string'
    cwe_type='string'
    cwe_url='string'
    description='string'
    exposure_id='None'
    full_description='None'
    id='string'
    impact='string'
    nsin=[
        'None'
    ]
    osvdb=[
        'None'
    ]
    pci_severity='string'
    reference='string'
    remediation_id='string'
    resolution='string'
    severity='string'
)
Parameters
  • bid (list) –

    • (dict) –

  • cis_content (dict) –

  • class (string) –

  • cve (list) –

    • (dict) –

  • cvss_vector (dict) –

  • cwe (string) –

  • cwe_name (string) –

  • cwe_type (string) –

  • cwe_url (string) –

  • description (string) –

  • exposure_id (dict) –

  • full_description (dict) –

  • id (string) –

  • impact (string) –

  • nsin (list) –

    • (dict) –

  • osvdb (list) –

    • (dict) –

  • pci_severity (string) –

  • reference (string) –

  • remediation_id (string) –

  • resolution (string) –

  • severity (string) –

Return type

dict

Returns

Response Syntax

{
    'id': 'string'
}

Response Definitions

  • id (string) –

add_vulnerability_list(**kwargs)
Same as add_vulnerability but for a list.

This functionality is only available for privileged users/services

Request Syntax

response = client.add_vulnerability_list(
    data=[
        {
            'bid': [
                'None'
            ],
            'cis_content': 'None',
            'class': 'string',
            'cve': [
                'None'
            ],
            'cvss_vector': 'None',
            'cwe': 'string',
            'cwe_name': 'string',
            'cwe_type': 'string',
            'cwe_url': 'string',
            'description': 'string',
            'exposure_id': 'None',
            'full_description': 'None',
            'id': 'string',
            'impact': 'string',
            'nsin': [
                'None'
            ],
            'osvdb': [
                'None'
            ],
            'pci_severity': 'string',
            'reference': 'string',
            'remediation_id': 'string',
            'resolution': 'string',
            'severity': 'string'
        }
    ]
)
Parameters

data (list) –

  • (dict) –

    Vulnerability definition

    • bid (list) –

      • (dict) –

    • cis_content (dict) –

    • class (string) –

    • cve (list) –

      • (dict) –

    • cvss_vector (dict) –

    • cwe (string) –

    • cwe_name (string) –

    • cwe_type (string) –

    • cwe_url (string) –

    • description (string) –

    • exposure_id (dict) –

    • full_description (dict) –

    • id (string) –

    • impact (string) –

    • nsin (list) –

      • (dict) –

    • osvdb (list) –

      • (dict) –

    • pci_severity (string) –

    • reference (string) –

    • remediation_id (string) –

    • resolution (string) –

    • severity (string) –

Returns

None

get_remediation(**kwargs)

Returns a remediation by id.

Request Syntax

response = client.get_remediation(
    remediation_id='string'
)
Parameters

remediation_id (string) – [REQUIRED]

Return type

dict

Returns

Response Syntax

{
    'description': 'string',
    'id': 'string',
    'name': 'string',
    'vulnerability_ids': [
        'None'
    ]
}

Response Definitions

  • description (string) –

  • id (string) –

  • name (string) –

  • vulnerability_ids (list) –

    • (dict) –

get_remediation_list(**kwargs)

Returns a list of remediations. Optionally filtered by vulnerability_ids or remediation_ids.

Request Syntax

response = client.get_remediation_list(
    remediation_ids='string'
    vulnerability_ids='string'
)
Parameters
  • remediation_ids (string) –

  • vulnerability_ids (string) –

Return type

dict

Returns

Response Syntax

{
    'remediations': [
        {
            'description': 'string',
            'id': 'string',
            'name': 'string',
            'vulnerability_ids': [
                'None'
            ]
        }
    ]
}

Response Definitions

  • remediations (list) –

    • (dict) –

      Remediation definition

      • description (string) –

      • id (string) –

      • name (string) –

      • vulnerability_ids (list) –

        • (dict) –

get_vulnerability(**kwargs)

Returns a vulnerability by id.

Request Syntax

response = client.get_vulnerability(
    vulnerability_id='string'
)
Parameters

vulnerability_id (string) – [REQUIRED]

Return type

dict

Returns

Response Syntax

{
    'bid': [
        'None'
    ],
    'cis_content': 'None',
    'class': 'string',
    'cve': [
        'None'
    ],
    'cvss_vector': 'None',
    'cwe': 'string',
    'cwe_name': 'string',
    'cwe_type': 'string',
    'cwe_url': 'string',
    'description': 'string',
    'exposure_id': 'None',
    'full_description': 'None',
    'id': 'string',
    'impact': 'string',
    'nsin': [
        'None'
    ],
    'osvdb': [
        'None'
    ],
    'pci_severity': 'string',
    'reference': 'string',
    'remediation_id': 'string',
    'resolution': 'string',
    'severity': 'string'
}

Response Definitions

  • bid (list) –

    • (dict) –

  • cis_content (dict) –

  • class (string) –

  • cve (list) –

    • (dict) –

  • cvss_vector (dict) –

  • cwe (string) –

  • cwe_name (string) –

  • cwe_type (string) –

  • cwe_url (string) –

  • description (string) –

  • exposure_id (dict) –

  • full_description (dict) –

  • id (string) –

  • impact (string) –

  • nsin (list) –

    • (dict) –

  • osvdb (list) –

    • (dict) –

  • pci_severity (string) –

  • reference (string) –

  • remediation_id (string) –

  • resolution (string) –

  • severity (string) –

get_vulnerability_list(**kwargs)

Returns a list of remediations. Optionally filtered by vulnerability_ids or remediation_ids.

Request Syntax

response = client.get_vulnerability_list(
    remediation_ids='string'
    vulnerability_ids='string'
)
Parameters
  • remediation_ids (string) –

  • vulnerability_ids (string) –

Return type

dict

Returns

Response Syntax

{
    'vulnerabilities': [
        {
            'bid': [
                'None'
            ],
            'cis_content': 'None',
            'class': 'string',
            'cve': [
                'None'
            ],
            'cvss_vector': 'None',
            'cwe': 'string',
            'cwe_name': 'string',
            'cwe_type': 'string',
            'cwe_url': 'string',
            'description': 'string',
            'exposure_id': 'None',
            'full_description': 'None',
            'id': 'string',
            'impact': 'string',
            'nsin': [
                'None'
            ],
            'osvdb': [
                'None'
            ],
            'pci_severity': 'string',
            'reference': 'string',
            'remediation_id': 'string',
            'resolution': 'string',
            'severity': 'string'
        }
    ]
}

Response Definitions

  • vulnerabilities (list) –

    • (dict) –

      Vulnerability definition for request

      • bid (list) –

        • (dict) –

      • cis_content (dict) –

      • class (string) –

      • cve (list) –

        • (dict) –

      • cvss_vector (dict) –

      • cwe (string) –

      • cwe_name (string) –

      • cwe_type (string) –

      • cwe_url (string) –

      • description (string) –

      • exposure_id (dict) –

      • full_description (dict) –

      • id (string) –

      • impact (string) –

      • nsin (list) –

        • (dict) –

      • osvdb (list) –

        • (dict) –

      • pci_severity (string) –

      • reference (string) –

      • remediation_id (string) –

      • resolution (string) –

      • severity (string) –

update_remediation(**kwargs)

Remediations are updated by posting fields to merge. Returns the updated remediation. This functionality is only available for privileged users/services

Request Syntax

response = client.update_remediation(
    description='string'
    id='string'
    name='string'
    remediation_id='string'
    vulnerability_ids=[
        'None'
    ]
)
Parameters
  • description (string) –

  • id (string) –

  • name (string) –

  • remediation_id (string) – [REQUIRED]

  • vulnerability_ids (list) –

    • (dict) –

Return type

dict

Returns

Response Syntax

{
    'description': 'string',
    'id': 'string',
    'name': 'string',
    'vulnerability_ids': [
        'None'
    ]
}

Response Definitions

  • description (string) –

  • id (string) –

  • name (string) –

  • vulnerability_ids (list) –

    • (dict) –