"""Interact with the Censys Risks API."""
from typing import Iterator, Optional
from .api import CensysAsmAPI
"""Risks API class."""
base_path = "risks"
[docs] def get_risks(
cloud: Optional[str] = None,
environment: Optional[str] = None,
include_accepted_risks: Optional[bool] = None,
page_number: int = 1,
page_size: int = 100,
) -> Iterator[dict]:
Returns a full list of all risks that affect any assets in the system,
along with a count of assets affected by each risk.
cloud (str): The cloud to filter by.
environment (str): The environment to filter by.
include_accepted_risks (bool): Whether to include accepted risks.
page_number (int): The page number to return.
page_size (int): The number of items to return per page.
dict: Host count result.
yield from self._get_page(