API reference

PyVulnerabilityLookup

class pyvulnerabilitylookup.PyVulnerabilityLookup(root_url: str = 'https://vulnerability.circl.lu', useragent: str | None = None, token: str | None = None, *, proxies: dict[str, str] | None = None)
check_process() dict[str, Any]

[Authentication Required] Checks the hearbeats of the various processes.

check_smtp() dict[str, Any]

[Authentication Required] Checks the SMTP connection.

create_bundle(*, bundle: dict[str, Any] | None = None, description: str | None = None, meta: dict[str, str] | None = None, name: str | None = None, related_vulnerabilities: list[str] | None = None, uuid: str | None = None) dict[str, Any]

Create a bundle.

Parameters:

bundle – The bundle

create_comment(*, comment: dict[str, Any] | None = None, description: str | None = None, description_format: str | None = None, meta: dict[str, str] | None = None, related_vulnerabilities: list[str] | None = None, title: str | None = None, uuid: str | None = None, vulnerability: str | None = None) dict[str, Any]

Create a comment.

Parameters:
  • comment – The comment

  • description – The description of the comment

  • description_format – Description format (markdown or text).

  • meta – Zero or more meta-fields.

  • related_vulnerabilities – Zero or more related vulnerabilities.

  • title – The title of the comment

  • uuid – The UUID of the comment

  • vulnerability – The vulnerability ID of the comment

create_sighting(*, sighting: dict[str, Any] | None = None, creation_timestamp: datetime | None = None, source: str | None = None, content: str | None = None, sighting_type: str | None = None, vulnerability: str | None = None) dict[str, Any]

Create a sighting.

Parameters:
  • sighting – The sighting, as an object.

  • creation_timestamp – The timestamp of the sighting - set to now if not provided

  • source – The source of the sighting

  • content – The content of the sighting

  • sighting_type – The type of sighting, can be one of: ‘seen’, ‘exploided’, ‘not-exploited’, ‘confirmed’, ‘not-confirmed’, ‘patched’, ‘not-patched’.

  • vulnerability – The vulnerability ID of the sighting

create_user(*, user: dict[str, Any] | None = None, login: str | None = None, name: str | None = None, organisation: str | None = None, email: str | None = None) dict[str, Any]

Create a user.

Parameters:
  • login – The login of the user

  • name – The name of the user

  • organisation – The organisation of the user

  • email – The email of the user

create_vulnerability(vulnerability: dict[str, Any]) dict[str, Any]

Create a vulnerability.

Parameters:

vulnerability – The vulnerability

delete_bundle(bundle_uuid: str) int

Delete a bundle.

Parameters:

bundle_uuid – The bundle UUID

delete_comment(comment_uuid: str) int

Delete a comment.

Parameters:

comment_uuid – The comment UUID

delete_user(user_id: str) int

Delete a user.

Parameters:

user_id – The user ID

delete_vulnerability(vulnerability_id: str) int

Delete a vulnerability.

Parameters:

vulnerability_id – The vulnerability ID

get_bundle(bundle_uuid: str) dict[str, Any]

Get a bundle

Parameters:

bundle_uuid – The UUID of the bundle

get_bundles(uuid: str | None = None, vuln_id: str | None = None, author: str | None = None, meta: list[dict[str, str]] | None = None, *, page: int | None = None, per_page: int | None = None) dict[str, Any]

Get bundle(s)

Parameters:
  • uuid – The UUID a specific bundle

  • vuln_id – The vulnerability ID to get bundles of

  • author – The author of the bundle(s)

  • per_page – The number of bundles to get per page

  • meta – Query for the meta JSON field. Example: meta=[{‘tags’: [‘tcp’]}]

get_bundles_iter(uuid: str | None = None, vuln_id: str | None = None, author: str | None = None) Generator[dict[str, Any], None, None]

Iterate over bundles

Parameters:
  • uuid – The UUID a specific bundle

  • vuln_id – The vulnerability ID to get bundles of

  • author – The author of the bundle(s)

get_capec(capec_id: str) dict[str, Any]

Get a CAPEC

Parameters:

capec_id – The CAPEC ID

get_capecs(*, page: int | None = None, per_page: int | None = None) dict[str, Any]

Get the list of CAPECs

Parameters:
  • page – The page to get (default: 1)

  • per_page – The number of results per page (default: 100)

get_capecs_iter() Generator[dict[str, Any], None, None]

Iterate over the CAPECs

get_cisa_kevs(*, page: int | None = None, per_page: int | None = None) dict[str, Any]

Get the list of all CISA KEV

Parameters:
  • page – The page to get (default: 1)

  • per_page – The number of results per page (default: 100)

get_cisa_kevs_iter() Generator[dict[str, Any], None, None]

Iterate over the CISA KEV list.

get_comment(comment_uuid: str) dict[str, Any]

Get a comment

Parameters:

comment_uuid – The UUID of the comment

get_comments(uuid: str | None = None, vuln_id: str | None = None, author: str | None = None, *, page: int | None = None, per_page: int | None = None) dict[str, Any]

Get comment(s)

Parameters:
  • uuid – The UUID of a specific comment

  • vuln_id – The vulnerability ID to get comments of

  • author – The author of the comment(s)

get_comments_iter(uuid: str | None = None, vuln_id: str | None = None, author: str | None = None) Generator[dict[str, Any], None, None]

Iterate over comments

Parameters:
  • uuid – The UUID of a specific comment

  • vuln_id – The vulnerability ID to get comments of

  • author – The author of the comment(s)

get_config_info() dict[str, Any]

Returns non-sensitive information about the configuration of the system.

get_cwe(cwe_id: str) dict[str, Any]

Get a CWE

Parameters:

cwe_id – The CWE ID

get_cwes(*, page: int | None = None, per_page: int | None = None) dict[str, Any]

Get the list of CWEs

Parameters:
  • page – The page to get (default: 1)

  • per_page – The number of results per page (default: 100)

get_cwes_iter() Generator[dict[str, Any], None, None]

Iterate over the CWEs

get_emb3d(emb3d_id: str) dict[str, Any]

Get an emb3d vulnerability

Parameters:

emb3d_id – The emb3d ID

get_emb3ds(vuln_id: str | None = None, *, page: int | None = None, per_page: int | None = None) dict[str, Any]

Get the list of all emb3d vulnerabilities

Parameters:
  • page – The page to get (default: 1)

  • per_page – The number of results per page (default: 100)

  • vuln_id – The vulnerability ID to filter by (default: None)

get_emb3ds_iter(vuln_id: str | None = None) Generator[dict[str, Any], None, None]

Iterate over the emb3d vulnerabilities.

Parameters:

vuln_id – The vulnerability ID to filter by (default: None)

get_epss(vulnerability: str) dict[str, Any]

Get the EPSS for a vulnerability

Parameters:

vulnerability – The vulnerability ID

get_gcve_registry_integrity() bool

Check the integrity of the GCVE registry

get_gcves(short_name: str | None = None, *, page: int | None = None, per_page: int | None = None) dict[str, Any]

List the GNAs from the GCVE registry of the Vulnerability-Lookup instance. The response is paginated.

Parameters:
  • page – The page to get (default: 1)

  • per_page – The number of results per page (default: 100)

  • short_name – The short name of the GNA to filter by (default: None)

get_gcves_iter(short_name: str | None = None) Generator[dict[str, Any], None, None]

Iterate over the GNAs from the GCVE registry of the Vulnerability-Lookup instance.

Parameters:

short_name – The short name of the GNA to filter by (default: None)

get_info() dict[str, Any]

Returns information about the current sources in the Kvrocks database in use and when it was updated.

get_last(number: int | None = None, source: str | None = None) list[dict[str, Any]]

Get the last vulnerabilities

Parameters:
  • number – The number of vulnerabilities to get

  • source – The source of the vulnerabilities

get_organizations(organization_id: int | None = None, uuid: str | None = None, name: str | None = None, gna_id: int | None = None, *, page: int | None = None, per_page: int | None = None) dict[str, Any]

Get the list of organizations

Parameters:
  • page – The page to get (default: 1)

  • per_page – The number of results per page (default: 1000)

  • organization_id – The ID of the organization to get (default: None)

  • uuid – The UUID of the organization to get (default: None)

  • name – The name of the organization to get (default: None)

  • gna_id – The GNA ID of the organization to get (default: None)

get_organizations_iter(organization_id: int | None = None, uuid: str | None = None, name: str | None = None, gna_id: int | None = None) Generator[dict[str, Any], None, None]

Iterate over the organizations

Parameters:
  • organization_id – The ID of the organization to get (default: None)

  • uuid – The UUID of the organization to get (default: None)

  • name – The name of the organization to get (default: None)

  • gna_id – The GNA ID of the organization to get (default: None)

get_pg_info() dict[str, Any]

[Authentication Required] Returns information about the PostgreSQL database.

get_products(name: str | None = None, organization_name: str | None = None, organization_id: str | None = None, organization_uuid: str | None = None, *, page: int | None = None, per_page: int | None = None, uuid: str | None = None) dict[str, Any]

Get the list of products

Parameters:
  • page – The page to get (default: 1)

  • per_page – The number of results per page (default: 1000)

  • uuid – The UUID of the product to get (default: None)

  • name – The name of the product to get (default: None)

  • organization_name – The name of the organization related to the product (default: None)

  • organization_id – The ID of the organization related to the product (default: None)

  • organization_uuid – The UUID of the organization related to the product (default: None)

get_products_iter(uuid: str | None = None, name: str | None = None, organization_name: str | None = None, organization_id: str | None = None, organization_uuid: str | None = None) Generator[dict[str, Any], None, None]

Iterate over the products

Parameters:
  • uuid – The UUID of the product to get (default: None)

  • name – The name of the product to get (default: None)

  • organization_name – The name of the organization related to the product (default: None)

  • organization_id – The ID of the organization related to the product (default: None)

  • organization_uuid – The UUID of the organization related to the product (default: None)

get_recent(date_from: date | datetime | None = None, source: str | None = None, number: int | None = None) list[dict[str, Any]]

Get the recent vulnerabilities

Parameters:
  • date_from – The date from which to get the vulnerabilities

  • source – The source of the vulnerabilities

  • number – The number of vulnerabilities to get

get_sighting(sighting_uuid: str) dict[str, Any]

Get a sighting

Parameters:

sighting_uuid – The UUID of the sighting

get_sightings(*, page: int | None = None, per_page: int | None = None, sighting_uuid: str | None = None, sighting_type: str | None = None, vuln_id: str | None = None, author: str | None = None, date_from: date | datetime | None = None, date_to: date | datetime | None = None, source: str | None = None) dict[str, Any]

Get sightings

Parameters:
  • page – The page to get (default: 1)

  • per_page – The number of sightings to get per page (default: 100)

  • sighting_uuid – The UUID of a specific sighting

  • sighting_type – The type of sighting, can be one of: ‘seen’, ‘exploided’, ‘not-exploited’, ‘confirmed’, ‘not-confirmed’, ‘patched’, ‘not-patched’.

  • vuln_id – The vulnerability ID to get sightings of

  • author – The author of the sighting(s)

  • date_from – The date from which to get sightings

  • date_to – The date to which to get sightings

  • source – The source of the sighting

get_sightings_iter(*, sighting_uuid: str | None = None, sighting_type: str | None = None, vuln_id: str | None = None, author: str | None = None, date_from: date | datetime | None = None, date_to: date | datetime | None = None, source: str | None = None) Generator[dict[str, Any], None, None]

Iterate over sightings

Parameters:
  • sighting_uuid – The UUID of a specific sighting

  • sighting_type – The type of sighting, can be one of: ‘seen’, ‘exploided’, ‘not-exploited’, ‘confirmed’, ‘not-confirmed’, ‘patched’, ‘not-patched’.

  • vuln_id – The vulnerability ID to get sightings of

  • author – The author of the sighting(s)

  • date_from – The date from which to get sightings

  • date_to – The date to which to get sightings

  • source – The source of the sighting

get_user_information() dict[str, Any]

Get user information

get_users(*, page: int | None = None, per_page: int | None = None) dict[str, Any]

List users

Parameters:
  • page – The page to get (default: 1)

  • per_page – The number of users to get per page (default: 100)

get_users_iter() Generator[dict[str, Any], None, None]

Iterate over users

get_vendor_product_vulnerabilities(vendor: str, product: str, *, since: date | datetime | None = None, page: int | None = None, per_page: int | None = None) dict[str, Any]

Get the the vulnerabilities per vendor and a specific product

Parameters:
  • vendor – A vendor owning products (must be in the known vendor list)

  • product – A product owned by that vendor

  • since – The date from which to get vulnerabilities

  • page – The page to get (default: 1)

  • per_page – The number of vulnerabilities to get per page (default: 10)

get_vendor_product_vulnerabilities_iter(vendor: str, product: str, *, since: date | datetime | None = None, with_source: bool = False) Generator[dict[str, list[Any]], None, None]

Iterate over the vulnerabilities per vendor and a specific product

Parameters:
  • vendor – A vendor owning products (must be in the known vendor list)

  • product – A product owned by that vendor

  • since – The date from which to get vulnerabilities

  • with_source – if true, the source is appended at the end of the list

get_vendor_products(vendor: str) list[str]

Get the known products for a vendor

Params vendor:

A vendor owning products (must be in the known vendor list)

get_vendors() list[str]

Get the known vendors

get_vlai_severity_classification(description: str) dict[str, Any]

Involves a classification model aimed to assist in classifying vulnerabilities by severity based on their descriptions.

Parameters:

description – The description of the vulnerability to classify

get_vulnerabilities_by_cpe(cpe: str) dict[str, Any]

Get the vulnerabilities by their CPE

Parameters:

cpe – The CPE of the vulnerabilities

get_vulnerability(vulnerability_id: str) dict[str, Any]

Get a vulnerability

Parameters:

vulnerability_id – The ID of the vulnerability to get (can be from any source, as long as it is a valid ID)

property is_up: bool

Test if the given instance is accessible

most_commented_vulnerabilities(date_from: date | datetime | None = None, date_to: date | datetime | None = None, limit: int | None = None, output: Literal['json'] = 'json') dict[str, Any]
most_commented_vulnerabilities(date_from: date | datetime | None = None, date_to: date | datetime | None = None, limit: int | None = None, output: Literal['markdown'] = 'markdown') str

Get the most commented vulnerabilities

Parameters:
  • date_from – The date from which to get the most commented vulnerabilities

  • date_to – The date to which to get the most commented vulnerabilities

  • limit – The number of vulnerabilities to get (default: 10)

  • output – The output format, either ‘json’ or ‘markdown’

most_sighted_vulnerabilities(date_from: date | datetime | None = None, date_to: date | datetime | None = None, sighting_type: str | None = None, limit: int | None = None, output: Literal['json'] = 'json') dict[str, Any]
most_sighted_vulnerabilities(date_from: date | datetime | None = None, date_to: date | datetime | None = None, sighting_type: str | None = None, limit: int | None = None, output: Literal['markdown'] = 'markdown') str

Get the most sighted vulnerabilities

Parameters:
  • date_from – The date from which to get the most sighted vulnerabilities

  • date_to – The date to which to get the most sighted vulnerabilities

  • sighting_type – The type of sighting to filter by (can be one of: ‘seen’, ‘exploided’, ‘not-exploited’, ‘confirmed’, ‘not-confirmed’, ‘patched’, ‘not-patched’)

  • limit – The number of vulnerabilities to get (default: 10)

  • output – The output format, either ‘json’ or ‘markdown’

redis_up() bool

[Deprecated] Check if redis/valkey is up and running

reset_api_key() dict[str, Any]

Reset the API key

set_apikey(apikey: str) None

Set the API key to use for the requests

valkey_up() bool

Check if valkey is up and running