Hierarchy

  • SecurityMonitoringApi

Constructors

Properties

Methods

Constructors

Properties

configuration: Configuration
requestFactory: SecurityMonitoringApiRequestFactory
responseProcessor: SecurityMonitoringApiResponseProcessor

Methods

  • Get a list of findings. These include both misconfigurations and identity risks.

    Note: To filter and return only identity risks, add the following query parameter: ?filter[tags]=dd_rule_type:ciem

    Filtering

    Filters can be applied by appending query parameters to the URL.

    • Using a single filter: ?filter[attribute_key]=attribute_value
    • Chaining filters: ?filter[attribute_key]=attribute_value&filter[attribute_key]=attribute_value...
    • Filtering on tags: ?filter[tags]=tag_key:tag_value&filter[tags]=tag_key_2:tag_value_2

    Here, attribute_key can be any of the filter keys described further below.

    Query parameters of type integer support comparison operators (>, >=, <, <=). This is particularly useful when filtering by evaluation_changed_at or resource_discovery_timestamp. For example: ?filter[evaluation_changed_at]=>20123123121.

    You can also use the negation operator on strings. For example, use filter[resource_type]=-aws* to filter for any non-AWS resources.

    The operator must come after the equal sign. For example, to filter with the >= operator, add the operator after the equal sign: filter[evaluation_changed_at]=>=1678809373257.

    Query parameters must be only among the documented ones and with values of correct types. Duplicated query parameters (e.g. filter[status]=low&filter[status]=info) are not allowed.

    Response

    The response includes an array of finding objects, pagination metadata, and a count of items that match the query.

    Each finding object contains the following:

    • The finding ID that can be used in a GetFinding request to retrieve the full finding details.
    • Core attributes, including status, evaluation, high-level resource details, muted state, and rule details.
    • evaluation_changed_at and resource_discovery_date time stamps.
    • An array of associated tags.

    Parameters

    Returns Promise<ListFindingsResponse>

  • Get a list of vulnerabilities.

    Pagination is enabled by default in both vulnerabilities and assets. The size of the page varies depending on the endpoint and cannot be modified. To automate the request of the next page, you can use the links section in the response.

    This endpoint will return paginated responses. The pages are stored in the links section of the response:

    {
    "data": [...],
    "meta": {...},
    "links": {
    "self": "https://.../api/v2/security/vulnerabilities",
    "first": "https://.../api/v2/security/vulnerabilities?page[number]=1&page[token]=abc",
    "last": "https://.../api/v2/security/vulnerabilities?page[number]=43&page[token]=abc",
    "next": "https://.../api/v2/security/vulnerabilities?page[number]=2&page[token]=abc"
    }
    }
    • links.previous is empty if the first page is requested.
    • links.next is empty if the last page is requested.

    Token

    Vulnerabilities can be created, updated or deleted at any point in time.

    Upon the first request, a token is created to ensure consistency across subsequent paginated requests.

    A token is valid only for 24 hours.

    First request

    We consider a request to be the first request when there is no page[token] parameter.

    The response of this first request contains the newly created token in the links section.

    This token can then be used in the subsequent paginated requests.

    Subsequent requests

    Any request containing valid page[token] and page[number] parameters will be considered a subsequent request.

    If the token is invalid, a 404 response will be returned.

    If the page number is invalid, a 400 response will be returned.

    Filtering

    The request can include some filter parameters to filter the data to be retrieved. The format of the filter parameters follows the JSON:API format: filter[$prop_name], where prop_name is the property name in the entity being filtered by.

    All filters can include multiple values, where data will be filtered with an OR clause: filter[title]=Title1,Title2 will filter all vulnerabilities where title is equal to Title1 OR Title2.

    String filters are case sensitive.

    Boolean filters accept true or false as values.

    Number filters must include an operator as a second filter input: filter[$prop_name][$operator]. For example, for the vulnerabilities endpoint: filter[cvss.base.score][lte]=8.

    Available operators are: eq (==), lt (<), lte (<=), gt (>) and gte (>=).

    Metadata

    Following JSON:API format, object including non-standard meta-information.

    This endpoint includes the meta member in the response. For more details on each of the properties included in this section, check the endpoints response tables.

    {
    "data": [...],
    "meta": {
    "total": 1500,
    "count": 18732,
    "token": "some_token"
    },
    "links": {...}
    }

    Parameters

    Returns Promise<ListVulnerabilitiesResponse>

Generated using TypeDoc