diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index b359a63d90..49bda3583b 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -120395,18 +120395,28 @@ components:
type: object
RemediationGroupAttributes:
description: |-
- Attributes of a remediation group. Each group includes one kind object, depending on its grouping definition.
+ Attributes of a remediation group. Each group includes one kind object, `package_update` or `image_update`,
+ depending on its grouping definition.
properties:
+ assignee_id:
+ description: UUID of the user assigned to the group's case. Omitted when the group has no case or no assignee.
+ example: 6a1f0c3e-8b2d-4e5f-9a7c-1d2e3f4a5b6c
+ type: string
findings:
$ref: "#/components/schemas/RemediationGroupFindings"
grouping_definition_id:
- description: Grouping definition that formed the group, such as `sca.package_update`.
+ description: |-
+ Grouping definition that formed the group: `sca.package_update` or `cloudvm.image_update`.
example: sca.package_update
type: string
+ image_update:
+ $ref: "#/components/schemas/RemediationGroupImageUpdate"
owners:
$ref: "#/components/schemas/RemediationGroupOwners"
package_update:
$ref: "#/components/schemas/RemediationGroupPackageUpdate"
+ status:
+ $ref: "#/components/schemas/RemediationGroupStatus"
title:
description: Title of the group, which describes the change to make.
example: Update lodash to 4.17.21 in github.com/acme/api
@@ -120414,6 +120424,7 @@ components:
required:
- grouping_definition_id
- title
+ - status
- findings
- owners
type: object
@@ -120464,25 +120475,42 @@ components:
description: Value of the findings' `@finding_type` attribute that a grouping definition covers.
enum:
- library_vulnerability
+ - host_and_container_vulnerability
example: library_vulnerability
type: string
x-enum-varnames:
- LIBRARY_VULNERABILITY
+ - HOST_AND_CONTAINER_VULNERABILITY
RemediationGroupFindings:
description: |-
- Counts of the group's open findings. The counts include every finding in the group, including findings that
- don't match `filter[query]`.
+ The group's findings: their counts and the query that selects them. The counts are of the group's open
+ findings or, for a closed group with no open findings, of its auto-closed findings. The counts include every
+ finding in the group, including findings that don't match `filter[query]`.
properties:
by_severity:
$ref: "#/components/schemas/RemediationGroupFindingsBySeverity"
+ query:
+ description: |-
+ Query that selects exactly the findings that the counts cover, to use with the
+ [search security findings endpoint](https://docs.datadoghq.com/api/latest/security-monitoring/#search-security-findings).
+ It contains the grouping definition's search, the `@finding_type` it covers, and one exact term for each
+ field that identifies the group, such as `repository_id`, `ecosystem`, and `package_name` for
+ `package_update`. It searches for `@status:auto_closed` findings when the counts are of auto-closed
+ findings. For `cloudvm.image_update`, it matches findings with no `@git.repository_id` when
+ `repository_id` is `unknown`, and matches `grouping_location` against `@code_location.filename`, or
+ against `@container_image.repository` for findings with no file.
+ example: >-
+ @package.dependency_type:direct @remediation.is_available:true @advisory.type:component_with_known_vulnerability -@git.is_default_branch:false @status:open @git.repository_id:* @remediation.recommended.name:* @package.declaration.block.filename:* @finding_type:(library_vulnerability) @git.repository_id:"github.com/acme/api" @vulnerability.stack.ecosystem:"npm" @remediation.recommended.name:"lodash"
+ type: string
total:
- description: Number of open findings in the group.
+ description: Number of findings in the group that the counts cover.
example: 12
format: int64
type: integer
required:
- total
- by_severity
+ - query
type: object
RemediationGroupFindingsBySeverity:
description: |-
@@ -120533,6 +120561,83 @@ components:
- none
- unknown
type: object
+ RemediationGroupImageUpdate:
+ description: |-
+ A container image, base image, or package to upgrade, for a group of host and container vulnerabilities
+ (`cloudvm.image_update`). The group gathers the open vulnerabilities of running production images that have
+ a fix available, and groups them by `repository_id`, `grouping_location`, `remediation_kind`, and `action`.
+ properties:
+ action:
+ description: |-
+ Name of the container image, base image, or package to upgrade. The value comes from the first of these
+ attributes that the findings have: `@remediation.container_image.latest_major.name`,
+ `@remediation.base_image.latest_major.name`, or `@remediation.recommended.name`.
+ example: alpine
+ type: string
+ advisory_count:
+ description: Number of distinct values of `@advisory.id` across the group's findings.
+ example: 25
+ format: int64
+ type: integer
+ exploitable_cve_count:
+ description: |-
+ Number of distinct values of `@advisory.id` across the group's findings that have
+ `@risk.has_exploit_available` set to `true`.
+ example: 2
+ format: int64
+ type: integer
+ file_count:
+ description: |-
+ Number of distinct values of `@code_location.filename` across the group's findings. The count is 0 when
+ `grouping_location` is an image repository.
+ example: 1
+ format: int64
+ type: integer
+ grouping_location:
+ description: |-
+ File that contains the findings, from their `@code_location.filename` attribute. When no file is known,
+ the value is the findings' `@container_image.repository`, which is the image reference without its
+ registry and digest. The same image pulled from different registries or at different digests is in one
+ group. Findings that have neither attribute are not in any group.
+ example: Dockerfile
+ type: string
+ location_is_filename:
+ description: |-
+ Whether `grouping_location` is a `@code_location.filename` rather than a `@container_image.repository`.
+ example: true
+ type: boolean
+ remediation_kind:
+ description: |-
+ Kind of upgrade: `image_update` when the findings have a `@remediation.container_image.latest_major.name`,
+ `base_image_bump` when they have `@vulnerability.is_inherited_from_base_image` set to `true`, and
+ `package_update` otherwise.
+ example: image_update
+ type: string
+ repository_id:
+ description: |-
+ Repository of the findings, from their `@git.repository_id` attribute. The value is `unknown` when the
+ findings have no repository, so findings without a repository share a group when their
+ `grouping_location`, `remediation_kind`, and `action` match.
+ example: github.com/acme/api
+ type: string
+ target_version:
+ description: |-
+ Version to upgrade to: the `@remediation.container_image.latest_major.tag` or
+ `@remediation.base_image.latest_major.tag` of the image in `action`, or else the highest
+ `@remediation.recommended.version` across the group's findings. Omitted when no version is recommended
+ or when the recommended versions can't be ordered.
+ example: 3.20.3
+ type: string
+ required:
+ - repository_id
+ - grouping_location
+ - location_is_filename
+ - remediation_kind
+ - action
+ - advisory_count
+ - exploitable_cve_count
+ - file_count
+ type: object
RemediationGroupInclude:
description: Related resource to add to `included`.
enum:
@@ -120635,6 +120740,23 @@ components:
required:
- case
type: object
+ RemediationGroupStatus:
+ description: |-
+ Where the group's remediation stands, from its case: `triage` when the group has no case, then `open`,
+ `in_progress`, or `closed`, following the status of the case. The status follows the group's findings within
+ an hour.
+ enum:
+ - triage
+ - open
+ - in_progress
+ - closed
+ example: in_progress
+ type: string
+ x-enum-varnames:
+ - TRIAGE
+ - OPEN
+ - IN_PROGRESS
+ - CLOSED
RemediationGroupType:
default: remediation_groups
description: Remediation groups resource type.
@@ -258807,20 +258929,22 @@ paths:
get:
description: |-
Search the remediation groups of your organization. A remediation group gathers the open security findings
- that one change fixes, such as updating a package in a repository.
+ that one change fixes, such as updating a package in a repository or upgrading an image.
Each group comes from a grouping definition, which sets the finding type it covers and the kind object the
group returns:
- | Grouping definition | Finding type | Kind object |
- | -------------------- | ----------------------- | ---------------- |
- | `sca.package_update` | `library_vulnerability` | `package_update` |
+ | Grouping definition | Finding type | Kind object |
+ | ---------------------- | ---------------------------------- | ---------------- |
+ | `sca.package_update` | `library_vulnerability` | `package_update` |
+ | `cloudvm.image_update` | `host_and_container_vulnerability` | `image_update` |
Groups are computed from the attributes of security findings, described in the
[security findings schema](https://docs.datadoghq.com/security/guide/findings-schema/). The description of
each kind object lists the findings its grouping definition reads and the attribute each field comes from.
- The search includes all open findings, regardless of when they were first detected.
+ The search includes all open findings, regardless of when they were first detected. A closed group with no
+ open findings is listed from its auto-closed findings.
This endpoint requires the `cases_read` permission and either the `security_monitoring_findings_read` or
`appsec_vm_read` permission.
@@ -258850,11 +258974,37 @@ paths:
required: false
schema:
type: string
+ - description: |-
+ Returns only groups with this status. To match more than one status, repeat the parameter. Without it,
+ groups of every status are returned. A closed group with neither open nor auto-closed findings is
+ returned with zero counts, unless the request has `filter[query]`.
+ example: ["triage", "open"]
+ in: query
+ name: filter[status]
+ required: false
+ schema:
+ items:
+ $ref: "#/components/schemas/RemediationGroupStatus"
+ type: array
+ - description: |-
+ Returns only groups whose case is assigned to this user, given as a user UUID. `unassigned` returns the
+ groups whose case has no assignee and the groups with no case. To match more than one assignee, repeat
+ the parameter, with at most 50 distinct values.
+ example: ["6a1f0c3e-8b2d-4e5f-9a7c-1d2e3f4a5b6c", "unassigned"]
+ in: query
+ name: filter[assignee_id]
+ required: false
+ schema:
+ items:
+ type: string
+ maxItems: 50
+ type: array
- description: |-
Comma-separated list of sort fields. Prefix a field with `-` to sort in descending order.
`findings.by_severity` sorts by the critical count, then high, medium, low, info, none, and unknown.
`findings.total` sorts by the total finding count. By default, groups are sorted by critical count,
- then high count, then total finding count, all in descending order.
+ then high count, then total finding count, all in descending order. Closed groups with no open findings
+ come after the other groups, the group whose case changed most recently first.
example: "-findings.by_severity,-findings.total"
in: query
name: sort
@@ -258894,11 +259044,61 @@ paths:
content:
application/json:
examples:
+ cloud_vm_group_without_case:
+ summary: A host and container vulnerability group without a case
+ value:
+ data:
+ - attributes:
+ findings:
+ by_severity:
+ critical: 1
+ high: 9
+ info: 0
+ low: 10
+ medium: 20
+ none: 0
+ unknown: 0
+ query: >-
+ @status:open @remediation.is_available:true @risk.is_production:true @risk.is_image_running:true @resource_type:image @finding_type:(host_and_container_vulnerability) @git.repository_id:"github.com/acme/api" (@code_location.filename:"Dockerfile" OR (-@code_location.filename:* @container_image.repository:"Dockerfile")) @remediation.container_image.latest_major.name:"alpine"
+ total: 40
+ grouping_definition_id: cloudvm.image_update
+ image_update:
+ action: alpine
+ advisory_count: 25
+ exploitable_cve_count: 2
+ file_count: 1
+ grouping_location: Dockerfile
+ location_is_filename: true
+ remediation_kind: image_update
+ repository_id: github.com/acme/api
+ target_version: 3.20.3
+ owners:
+ codeowners:
+ items:
+ - "@acme/platform"
+ total: 1
+ teams:
+ items:
+ - platform
+ total: 1
+ status: triage
+ title: Upgrade alpine to 3.20.3
+ id: cloudvm.image_update:eyJhY3Rpb24iOiJhbHBpbmUiLCJncm91cGluZ19sb2NhdGlvbiI6IkRvY2tlcmZpbGUiLCJyZW1lZGlhdGlvbl9raW5kIjoiaW1hZ2VfdXBkYXRlIiwicmVwb3NpdG9yeV9pZCI6ImdpdGh1Yi5jb20vYWNtZS9hcGkifQ
+ relationships:
+ case:
+ data:
+ type: remediation_groups
+ meta:
+ page:
+ number: 1
+ size: 50
+ total_filtered_count: 134
default:
summary: A library vulnerability group with a case, with include=case
value:
data:
- attributes:
+ assignee_id: 6a1f0c3e-8b2d-4e5f-9a7c-1d2e3f4a5b6c
findings:
by_severity:
critical: 2
@@ -258908,6 +259108,8 @@ paths:
medium: 4
none: 0
unknown: 0
+ query: >-
+ @package.dependency_type:direct @remediation.is_available:true @advisory.type:component_with_known_vulnerability -@git.is_default_branch:false @status:open @git.repository_id:* @remediation.recommended.name:* @package.declaration.block.filename:* @finding_type:(library_vulnerability) @git.repository_id:"github.com/acme/api" @vulnerability.stack.ecosystem:"npm" @remediation.recommended.name:"lodash"
total: 12
grouping_definition_id: sca.package_update
owners:
@@ -258928,6 +259130,7 @@ paths:
package_name: lodash
repository_id: github.com/acme/api
target_version: 4.17.21
+ status: in_progress
title: Update lodash to 4.17.21 in github.com/acme/api
id: sca.package_update:eyJlY29zeXN0ZW0iOiJucG0iLCJyZWNvbW1lbmRlZF9uYW1lIjoibG9kYXNoIiwicmVwb3NpdG9yeV9pZCI6ImdpdGh1Yi5jb20vYWNtZS9hcGkifQ
relationships:
diff --git a/examples/v2/security-monitoring/SearchRemediationGroups_2685870968.py b/examples/v2/security-monitoring/SearchRemediationGroups_2685870968.py
new file mode 100644
index 0000000000..3592650962
--- /dev/null
+++ b/examples/v2/security-monitoring/SearchRemediationGroups_2685870968.py
@@ -0,0 +1,21 @@
+"""
+Search remediation groups filtered by host and container vulnerabilities returns "OK" response
+"""
+
+from os import environ
+from datadog_api_client import ApiClient, Configuration
+from datadog_api_client.v2.api.security_monitoring_api import SecurityMonitoringApi
+from datadog_api_client.v2.model.remediation_group_finding_type import RemediationGroupFindingType
+
+configuration = Configuration()
+configuration.access_token = environ["DD_BEARER_TOKEN"]
+configuration.unstable_operations["search_remediation_groups"] = True
+with ApiClient(configuration) as api_client:
+ api_instance = SecurityMonitoringApi(api_client)
+ response = api_instance.search_remediation_groups(
+ filter_finding_type=[
+ RemediationGroupFindingType.HOST_AND_CONTAINER_VULNERABILITY,
+ ],
+ )
+
+ print(response)
diff --git a/examples/v2/security-monitoring/SearchRemediationGroups_2862947704.py b/examples/v2/security-monitoring/SearchRemediationGroups_2862947704.py
new file mode 100644
index 0000000000..9b2f883ef9
--- /dev/null
+++ b/examples/v2/security-monitoring/SearchRemediationGroups_2862947704.py
@@ -0,0 +1,25 @@
+"""
+Search remediation groups filtered by status and assignee returns "OK" response
+"""
+
+from os import environ
+from datadog_api_client import ApiClient, Configuration
+from datadog_api_client.v2.api.security_monitoring_api import SecurityMonitoringApi
+from datadog_api_client.v2.model.remediation_group_status import RemediationGroupStatus
+
+configuration = Configuration()
+configuration.access_token = environ["DD_BEARER_TOKEN"]
+configuration.unstable_operations["search_remediation_groups"] = True
+with ApiClient(configuration) as api_client:
+ api_instance = SecurityMonitoringApi(api_client)
+ response = api_instance.search_remediation_groups(
+ filter_status=[
+ RemediationGroupStatus.TRIAGE,
+ RemediationGroupStatus.OPEN,
+ ],
+ filter_assignee_id=[
+ "unassigned",
+ ],
+ )
+
+ print(response)
diff --git a/src/datadog_api_client/v2/api/security_monitoring_api.py b/src/datadog_api_client/v2/api/security_monitoring_api.py
index 7d2867cce9..9e555e231e 100644
--- a/src/datadog_api_client/v2/api/security_monitoring_api.py
+++ b/src/datadog_api_client/v2/api/security_monitoring_api.py
@@ -92,6 +92,7 @@
from datadog_api_client.v2.model.severity_override_request import SeverityOverrideRequest
from datadog_api_client.v2.model.search_remediation_groups_response import SearchRemediationGroupsResponse
from datadog_api_client.v2.model.remediation_group_finding_type import RemediationGroupFindingType
+from datadog_api_client.v2.model.remediation_group_status import RemediationGroupStatus
from datadog_api_client.v2.model.remediation_group_include import RemediationGroupInclude
from datadog_api_client.v2.model.remediation_group_data import RemediationGroupData
from datadog_api_client.v2.model.list_assets_sbo_ms_response import ListAssetsSBOMsResponse
@@ -4889,6 +4890,21 @@ def __init__(self, api_client=None):
"attribute": "filter[query]",
"location": "query",
},
+ "filter_status": {
+ "openapi_types": ([RemediationGroupStatus],),
+ "attribute": "filter[status]",
+ "location": "query",
+ "collection_format": "multi",
+ },
+ "filter_assignee_id": {
+ "validation": {
+ "max_items": 50,
+ },
+ "openapi_types": ([str],),
+ "attribute": "filter[assignee_id]",
+ "location": "query",
+ "collection_format": "multi",
+ },
"sort": {
"openapi_types": (str,),
"attribute": "sort",
@@ -10355,6 +10371,8 @@ def search_remediation_groups(
*,
filter_finding_type: Union[List[RemediationGroupFindingType], UnsetType] = unset,
filter_query: Union[str, UnsetType] = unset,
+ filter_status: Union[List[RemediationGroupStatus], UnsetType] = unset,
+ filter_assignee_id: Union[List[str], UnsetType] = unset,
sort: Union[str, UnsetType] = unset,
page_size: Union[int, UnsetType] = unset,
page_number: Union[int, UnsetType] = unset,
@@ -10363,7 +10381,7 @@ def search_remediation_groups(
"""Search remediation groups.
Search the remediation groups of your organization. A remediation group gathers the open security findings
- that one change fixes, such as updating a package in a repository.
+ that one change fixes, such as updating a package in a repository or upgrading an image.
Each group comes from a grouping definition, which sets the finding type it covers and the kind object the
group returns:
@@ -10377,12 +10395,16 @@ def search_remediation_groups(
* - ``sca.package_update``
- ``library_vulnerability``
- ``package_update``
+ * - ``cloudvm.image_update``
+ - ``host_and_container_vulnerability``
+ - ``image_update``
Groups are computed from the attributes of security findings, described in the
`security findings schema `_. The description of
each kind object lists the findings its grouping definition reads and the attribute each field comes from.
- The search includes all open findings, regardless of when they were first detected.
+ The search includes all open findings, regardless of when they were first detected. A closed group with no
+ open findings is listed from its auto-closed findings.
This endpoint requires the ``cases_read`` permission and either the ``security_monitoring_findings_read`` or
``appsec_vm_read`` permission.
@@ -10397,10 +10419,19 @@ def search_remediation_groups(
The group's counts still include every finding in the group. The query can be at most 2048 bytes after
JSON encoding, and the parameter can appear only once.
:type filter_query: str, optional
+ :param filter_status: Returns only groups with this status. To match more than one status, repeat the parameter. Without it,
+ groups of every status are returned. A closed group with neither open nor auto-closed findings is
+ returned with zero counts, unless the request has ``filter[query]``.
+ :type filter_status: [RemediationGroupStatus], optional
+ :param filter_assignee_id: Returns only groups whose case is assigned to this user, given as a user UUID. ``unassigned`` returns the
+ groups whose case has no assignee and the groups with no case. To match more than one assignee, repeat
+ the parameter, with at most 50 distinct values.
+ :type filter_assignee_id: [str], optional
:param sort: Comma-separated list of sort fields. Prefix a field with ``-`` to sort in descending order.
``findings.by_severity`` sorts by the critical count, then high, medium, low, info, none, and unknown.
``findings.total`` sorts by the total finding count. By default, groups are sorted by critical count,
- then high count, then total finding count, all in descending order.
+ then high count, then total finding count, all in descending order. Closed groups with no open findings
+ come after the other groups, the group whose case changed most recently first.
:type sort: str, optional
:param page_size: Number of groups in a page.
:type page_size: int, optional
@@ -10417,6 +10448,12 @@ def search_remediation_groups(
if filter_query is not unset:
kwargs["filter_query"] = filter_query
+ if filter_status is not unset:
+ kwargs["filter_status"] = filter_status
+
+ if filter_assignee_id is not unset:
+ kwargs["filter_assignee_id"] = filter_assignee_id
+
if sort is not unset:
kwargs["sort"] = sort
@@ -10436,6 +10473,8 @@ def search_remediation_groups_with_pagination(
*,
filter_finding_type: Union[List[RemediationGroupFindingType], UnsetType] = unset,
filter_query: Union[str, UnsetType] = unset,
+ filter_status: Union[List[RemediationGroupStatus], UnsetType] = unset,
+ filter_assignee_id: Union[List[str], UnsetType] = unset,
sort: Union[str, UnsetType] = unset,
page_size: Union[int, UnsetType] = unset,
page_number: Union[int, UnsetType] = unset,
@@ -10455,10 +10494,19 @@ def search_remediation_groups_with_pagination(
The group's counts still include every finding in the group. The query can be at most 2048 bytes after
JSON encoding, and the parameter can appear only once.
:type filter_query: str, optional
+ :param filter_status: Returns only groups with this status. To match more than one status, repeat the parameter. Without it,
+ groups of every status are returned. A closed group with neither open nor auto-closed findings is
+ returned with zero counts, unless the request has ``filter[query]``.
+ :type filter_status: [RemediationGroupStatus], optional
+ :param filter_assignee_id: Returns only groups whose case is assigned to this user, given as a user UUID. ``unassigned`` returns the
+ groups whose case has no assignee and the groups with no case. To match more than one assignee, repeat
+ the parameter, with at most 50 distinct values.
+ :type filter_assignee_id: [str], optional
:param sort: Comma-separated list of sort fields. Prefix a field with ``-`` to sort in descending order.
``findings.by_severity`` sorts by the critical count, then high, medium, low, info, none, and unknown.
``findings.total`` sorts by the total finding count. By default, groups are sorted by critical count,
- then high count, then total finding count, all in descending order.
+ then high count, then total finding count, all in descending order. Closed groups with no open findings
+ come after the other groups, the group whose case changed most recently first.
:type sort: str, optional
:param page_size: Number of groups in a page.
:type page_size: int, optional
@@ -10477,6 +10525,12 @@ def search_remediation_groups_with_pagination(
if filter_query is not unset:
kwargs["filter_query"] = filter_query
+ if filter_status is not unset:
+ kwargs["filter_status"] = filter_status
+
+ if filter_assignee_id is not unset:
+ kwargs["filter_assignee_id"] = filter_assignee_id
+
if sort is not unset:
kwargs["sort"] = sort
diff --git a/src/datadog_api_client/v2/model/remediation_group_attributes.py b/src/datadog_api_client/v2/model/remediation_group_attributes.py
index f920f1cc21..d9ea75ae49 100644
--- a/src/datadog_api_client/v2/model/remediation_group_attributes.py
+++ b/src/datadog_api_client/v2/model/remediation_group_attributes.py
@@ -15,30 +15,40 @@
if TYPE_CHECKING:
from datadog_api_client.v2.model.remediation_group_findings import RemediationGroupFindings
+ from datadog_api_client.v2.model.remediation_group_image_update import RemediationGroupImageUpdate
from datadog_api_client.v2.model.remediation_group_owners import RemediationGroupOwners
from datadog_api_client.v2.model.remediation_group_package_update import RemediationGroupPackageUpdate
+ from datadog_api_client.v2.model.remediation_group_status import RemediationGroupStatus
class RemediationGroupAttributes(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.remediation_group_findings import RemediationGroupFindings
+ from datadog_api_client.v2.model.remediation_group_image_update import RemediationGroupImageUpdate
from datadog_api_client.v2.model.remediation_group_owners import RemediationGroupOwners
from datadog_api_client.v2.model.remediation_group_package_update import RemediationGroupPackageUpdate
+ from datadog_api_client.v2.model.remediation_group_status import RemediationGroupStatus
return {
+ "assignee_id": (str,),
"findings": (RemediationGroupFindings,),
"grouping_definition_id": (str,),
+ "image_update": (RemediationGroupImageUpdate,),
"owners": (RemediationGroupOwners,),
"package_update": (RemediationGroupPackageUpdate,),
+ "status": (RemediationGroupStatus,),
"title": (str,),
}
attribute_map = {
+ "assignee_id": "assignee_id",
"findings": "findings",
"grouping_definition_id": "grouping_definition_id",
+ "image_update": "image_update",
"owners": "owners",
"package_update": "package_update",
+ "status": "status",
"title": "title",
}
@@ -47,20 +57,33 @@ def __init__(
findings: RemediationGroupFindings,
grouping_definition_id: str,
owners: RemediationGroupOwners,
+ status: RemediationGroupStatus,
title: str,
+ assignee_id: Union[str, UnsetType] = unset,
+ image_update: Union[RemediationGroupImageUpdate, UnsetType] = unset,
package_update: Union[RemediationGroupPackageUpdate, UnsetType] = unset,
**kwargs,
):
"""
- Attributes of a remediation group. Each group includes one kind object, depending on its grouping definition.
+ Attributes of a remediation group. Each group includes one kind object, ``package_update`` or ``image_update`` ,
+ depending on its grouping definition.
- :param findings: Counts of the group's open findings. The counts include every finding in the group, including findings that
- don't match ``filter[query]``.
+ :param assignee_id: UUID of the user assigned to the group's case. Omitted when the group has no case or no assignee.
+ :type assignee_id: str, optional
+
+ :param findings: The group's findings: their counts and the query that selects them. The counts are of the group's open
+ findings or, for a closed group with no open findings, of its auto-closed findings. The counts include every
+ finding in the group, including findings that don't match ``filter[query]``.
:type findings: RemediationGroupFindings
- :param grouping_definition_id: Grouping definition that formed the group, such as ``sca.package_update``.
+ :param grouping_definition_id: Grouping definition that formed the group: ``sca.package_update`` or ``cloudvm.image_update``.
:type grouping_definition_id: str
+ :param image_update: A container image, base image, or package to upgrade, for a group of host and container vulnerabilities
+ ( ``cloudvm.image_update`` ). The group gathers the open vulnerabilities of running production images that have
+ a fix available, and groups them by ``repository_id`` , ``grouping_location`` , ``remediation_kind`` , and ``action``.
+ :type image_update: RemediationGroupImageUpdate, optional
+
:param owners: Who should fix the group: the code owners of the group's findings, from their ``@git.codeowners`` attribute,
and their Datadog teams, from their ``team`` tag. A group with no owners has empty ``items`` and a ``total`` of 0.
:type owners: RemediationGroupOwners
@@ -70,9 +93,18 @@ def __init__(
``@git.repository_id`` , ``@vulnerability.stack.ecosystem`` , and ``@remediation.recommended.name``.
:type package_update: RemediationGroupPackageUpdate, optional
+ :param status: Where the group's remediation stands, from its case: ``triage`` when the group has no case, then ``open`` ,
+ ``in_progress`` , or ``closed`` , following the status of the case. The status follows the group's findings within
+ an hour.
+ :type status: RemediationGroupStatus
+
:param title: Title of the group, which describes the change to make.
:type title: str
"""
+ if assignee_id is not unset:
+ kwargs["assignee_id"] = assignee_id
+ if image_update is not unset:
+ kwargs["image_update"] = image_update
if package_update is not unset:
kwargs["package_update"] = package_update
super().__init__(kwargs)
@@ -80,4 +112,5 @@ def __init__(
self_.findings = findings
self_.grouping_definition_id = grouping_definition_id
self_.owners = owners
+ self_.status = status
self_.title = title
diff --git a/src/datadog_api_client/v2/model/remediation_group_data.py b/src/datadog_api_client/v2/model/remediation_group_data.py
index 74897fafda..7521a77b72 100644
--- a/src/datadog_api_client/v2/model/remediation_group_data.py
+++ b/src/datadog_api_client/v2/model/remediation_group_data.py
@@ -49,7 +49,8 @@ def __init__(
"""
A remediation group.
- :param attributes: Attributes of a remediation group. Each group includes one kind object, depending on its grouping definition.
+ :param attributes: Attributes of a remediation group. Each group includes one kind object, ``package_update`` or ``image_update`` ,
+ depending on its grouping definition.
:type attributes: RemediationGroupAttributes
:param id: Remediation key of the group: the grouping definition ID, a colon, and the group's dimensions
diff --git a/src/datadog_api_client/v2/model/remediation_group_finding_type.py b/src/datadog_api_client/v2/model/remediation_group_finding_type.py
index 5fbc5ec3d7..736dd5912c 100644
--- a/src/datadog_api_client/v2/model/remediation_group_finding_type.py
+++ b/src/datadog_api_client/v2/model/remediation_group_finding_type.py
@@ -16,14 +16,16 @@ class RemediationGroupFindingType(ModelSimple):
"""
Value of the findings' `@finding_type` attribute that a grouping definition covers.
- :param value: If omitted defaults to "library_vulnerability". Must be one of ["library_vulnerability"].
+ :param value: Must be one of ["library_vulnerability", "host_and_container_vulnerability"].
:type value: str
"""
allowed_values = {
"library_vulnerability",
+ "host_and_container_vulnerability",
}
LIBRARY_VULNERABILITY: ClassVar["RemediationGroupFindingType"]
+ HOST_AND_CONTAINER_VULNERABILITY: ClassVar["RemediationGroupFindingType"]
@cached_property
def openapi_types(_):
@@ -33,3 +35,6 @@ def openapi_types(_):
RemediationGroupFindingType.LIBRARY_VULNERABILITY = RemediationGroupFindingType("library_vulnerability")
+RemediationGroupFindingType.HOST_AND_CONTAINER_VULNERABILITY = RemediationGroupFindingType(
+ "host_and_container_vulnerability"
+)
diff --git a/src/datadog_api_client/v2/model/remediation_group_findings.py b/src/datadog_api_client/v2/model/remediation_group_findings.py
index d436854f76..7ad1db43b2 100644
--- a/src/datadog_api_client/v2/model/remediation_group_findings.py
+++ b/src/datadog_api_client/v2/model/remediation_group_findings.py
@@ -24,27 +24,41 @@ def openapi_types(_):
return {
"by_severity": (RemediationGroupFindingsBySeverity,),
+ "query": (str,),
"total": (int,),
}
attribute_map = {
"by_severity": "by_severity",
+ "query": "query",
"total": "total",
}
- def __init__(self_, by_severity: RemediationGroupFindingsBySeverity, total: int, **kwargs):
+ def __init__(self_, by_severity: RemediationGroupFindingsBySeverity, query: str, total: int, **kwargs):
"""
- Counts of the group's open findings. The counts include every finding in the group, including findings that
- don't match ``filter[query]``.
+ The group's findings: their counts and the query that selects them. The counts are of the group's open
+ findings or, for a closed group with no open findings, of its auto-closed findings. The counts include every
+ finding in the group, including findings that don't match ``filter[query]``.
:param by_severity: Number of the group's findings for each value of their ``@severity`` attribute. The response includes every
level, including levels with a count of zero.
:type by_severity: RemediationGroupFindingsBySeverity
- :param total: Number of open findings in the group.
+ :param query: Query that selects exactly the findings that the counts cover, to use with the
+ `search security findings endpoint `_.
+ It contains the grouping definition's search, the ``@finding_type`` it covers, and one exact term for each
+ field that identifies the group, such as ``repository_id`` , ``ecosystem`` , and ``package_name`` for
+ ``package_update``. It searches for ``@status:auto_closed`` findings when the counts are of auto-closed
+ findings. For ``cloudvm.image_update`` , it matches findings with no ``@git.repository_id`` when
+ ``repository_id`` is ``unknown`` , and matches ``grouping_location`` against ``@code_location.filename`` , or
+ against ``@container_image.repository`` for findings with no file.
+ :type query: str
+
+ :param total: Number of findings in the group that the counts cover.
:type total: int
"""
super().__init__(kwargs)
self_.by_severity = by_severity
+ self_.query = query
self_.total = total
diff --git a/src/datadog_api_client/v2/model/remediation_group_image_update.py b/src/datadog_api_client/v2/model/remediation_group_image_update.py
new file mode 100644
index 0000000000..2cf49b70d7
--- /dev/null
+++ b/src/datadog_api_client/v2/model/remediation_group_image_update.py
@@ -0,0 +1,113 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+ unset,
+ UnsetType,
+)
+
+
+class RemediationGroupImageUpdate(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ return {
+ "action": (str,),
+ "advisory_count": (int,),
+ "exploitable_cve_count": (int,),
+ "file_count": (int,),
+ "grouping_location": (str,),
+ "location_is_filename": (bool,),
+ "remediation_kind": (str,),
+ "repository_id": (str,),
+ "target_version": (str,),
+ }
+
+ attribute_map = {
+ "action": "action",
+ "advisory_count": "advisory_count",
+ "exploitable_cve_count": "exploitable_cve_count",
+ "file_count": "file_count",
+ "grouping_location": "grouping_location",
+ "location_is_filename": "location_is_filename",
+ "remediation_kind": "remediation_kind",
+ "repository_id": "repository_id",
+ "target_version": "target_version",
+ }
+
+ def __init__(
+ self_,
+ action: str,
+ advisory_count: int,
+ exploitable_cve_count: int,
+ file_count: int,
+ grouping_location: str,
+ location_is_filename: bool,
+ remediation_kind: str,
+ repository_id: str,
+ target_version: Union[str, UnsetType] = unset,
+ **kwargs,
+ ):
+ """
+ A container image, base image, or package to upgrade, for a group of host and container vulnerabilities
+ ( ``cloudvm.image_update`` ). The group gathers the open vulnerabilities of running production images that have
+ a fix available, and groups them by ``repository_id`` , ``grouping_location`` , ``remediation_kind`` , and ``action``.
+
+ :param action: Name of the container image, base image, or package to upgrade. The value comes from the first of these
+ attributes that the findings have: ``@remediation.container_image.latest_major.name`` ,
+ ``@remediation.base_image.latest_major.name`` , or ``@remediation.recommended.name``.
+ :type action: str
+
+ :param advisory_count: Number of distinct values of ``@advisory.id`` across the group's findings.
+ :type advisory_count: int
+
+ :param exploitable_cve_count: Number of distinct values of ``@advisory.id`` across the group's findings that have
+ ``@risk.has_exploit_available`` set to ``true``.
+ :type exploitable_cve_count: int
+
+ :param file_count: Number of distinct values of ``@code_location.filename`` across the group's findings. The count is 0 when
+ ``grouping_location`` is an image repository.
+ :type file_count: int
+
+ :param grouping_location: File that contains the findings, from their ``@code_location.filename`` attribute. When no file is known,
+ the value is the findings' ``@container_image.repository`` , which is the image reference without its
+ registry and digest. The same image pulled from different registries or at different digests is in one
+ group. Findings that have neither attribute are not in any group.
+ :type grouping_location: str
+
+ :param location_is_filename: Whether ``grouping_location`` is a ``@code_location.filename`` rather than a ``@container_image.repository``.
+ :type location_is_filename: bool
+
+ :param remediation_kind: Kind of upgrade: ``image_update`` when the findings have a ``@remediation.container_image.latest_major.name`` ,
+ ``base_image_bump`` when they have ``@vulnerability.is_inherited_from_base_image`` set to ``true`` , and
+ ``package_update`` otherwise.
+ :type remediation_kind: str
+
+ :param repository_id: Repository of the findings, from their ``@git.repository_id`` attribute. The value is ``unknown`` when the
+ findings have no repository, so findings without a repository share a group when their
+ ``grouping_location`` , ``remediation_kind`` , and ``action`` match.
+ :type repository_id: str
+
+ :param target_version: Version to upgrade to: the ``@remediation.container_image.latest_major.tag`` or
+ ``@remediation.base_image.latest_major.tag`` of the image in ``action`` , or else the highest
+ ``@remediation.recommended.version`` across the group's findings. Omitted when no version is recommended
+ or when the recommended versions can't be ordered.
+ :type target_version: str, optional
+ """
+ if target_version is not unset:
+ kwargs["target_version"] = target_version
+ super().__init__(kwargs)
+
+ self_.action = action
+ self_.advisory_count = advisory_count
+ self_.exploitable_cve_count = exploitable_cve_count
+ self_.file_count = file_count
+ self_.grouping_location = grouping_location
+ self_.location_is_filename = location_is_filename
+ self_.remediation_kind = remediation_kind
+ self_.repository_id = repository_id
diff --git a/src/datadog_api_client/v2/model/remediation_group_status.py b/src/datadog_api_client/v2/model/remediation_group_status.py
new file mode 100644
index 0000000000..71f4982de4
--- /dev/null
+++ b/src/datadog_api_client/v2/model/remediation_group_status.py
@@ -0,0 +1,46 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+
+from datadog_api_client.model_utils import (
+ ModelSimple,
+ cached_property,
+)
+
+from typing import ClassVar
+
+
+class RemediationGroupStatus(ModelSimple):
+ """
+ Where the group's remediation stands, from its case: `triage` when the group has no case, then `open`,
+ `in_progress`, or `closed`, following the status of the case. The status follows the group's findings within
+ an hour.
+
+ :param value: Must be one of ["triage", "open", "in_progress", "closed"].
+ :type value: str
+ """
+
+ allowed_values = {
+ "triage",
+ "open",
+ "in_progress",
+ "closed",
+ }
+ TRIAGE: ClassVar["RemediationGroupStatus"]
+ OPEN: ClassVar["RemediationGroupStatus"]
+ IN_PROGRESS: ClassVar["RemediationGroupStatus"]
+ CLOSED: ClassVar["RemediationGroupStatus"]
+
+ @cached_property
+ def openapi_types(_):
+ return {
+ "value": (str,),
+ }
+
+
+RemediationGroupStatus.TRIAGE = RemediationGroupStatus("triage")
+RemediationGroupStatus.OPEN = RemediationGroupStatus("open")
+RemediationGroupStatus.IN_PROGRESS = RemediationGroupStatus("in_progress")
+RemediationGroupStatus.CLOSED = RemediationGroupStatus("closed")
diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py
index 53d829ca84..145eb464d0 100644
--- a/src/datadog_api_client/v2/models/__init__.py
+++ b/src/datadog_api_client/v2/models/__init__.py
@@ -10697,11 +10697,13 @@
from datadog_api_client.v2.model.remediation_group_finding_type import RemediationGroupFindingType
from datadog_api_client.v2.model.remediation_group_findings import RemediationGroupFindings
from datadog_api_client.v2.model.remediation_group_findings_by_severity import RemediationGroupFindingsBySeverity
+from datadog_api_client.v2.model.remediation_group_image_update import RemediationGroupImageUpdate
from datadog_api_client.v2.model.remediation_group_include import RemediationGroupInclude
from datadog_api_client.v2.model.remediation_group_owner_list import RemediationGroupOwnerList
from datadog_api_client.v2.model.remediation_group_owners import RemediationGroupOwners
from datadog_api_client.v2.model.remediation_group_package_update import RemediationGroupPackageUpdate
from datadog_api_client.v2.model.remediation_group_relationships import RemediationGroupRelationships
+from datadog_api_client.v2.model.remediation_group_status import RemediationGroupStatus
from datadog_api_client.v2.model.remediation_group_type import RemediationGroupType
from datadog_api_client.v2.model.remediation_groups_meta import RemediationGroupsMeta
from datadog_api_client.v2.model.remediation_groups_page_meta import RemediationGroupsPageMeta
@@ -21928,11 +21930,13 @@
"RemediationGroupFindingType",
"RemediationGroupFindings",
"RemediationGroupFindingsBySeverity",
+ "RemediationGroupImageUpdate",
"RemediationGroupInclude",
"RemediationGroupOwnerList",
"RemediationGroupOwners",
"RemediationGroupPackageUpdate",
"RemediationGroupRelationships",
+ "RemediationGroupStatus",
"RemediationGroupType",
"RemediationGroupsMeta",
"RemediationGroupsPageMeta",
diff --git a/tests/generated-test/test-runner-data/manifest.json b/tests/generated-test/test-runner-data/manifest.json
index b29bb33b0c..dff0a9ce3d 100644
--- a/tests/generated-test/test-runner-data/manifest.json
+++ b/tests/generated-test/test-runner-data/manifest.json
@@ -12341,6 +12341,20 @@
"scenario": "Run a historical job returns \"Status created\" response",
"version": "v2"
},
+ {
+ "feature": "Security Monitoring",
+ "feature_file": "../../v2/features/security_monitoring.feature",
+ "file": "v2/security-monitoring/search-remediation-groups-filtered-by-host-and-container-vulnerabilities-returns-ok-response.json",
+ "scenario": "Search remediation groups filtered by host and container vulnerabilities returns \"OK\" response",
+ "version": "v2"
+ },
+ {
+ "feature": "Security Monitoring",
+ "feature_file": "../../v2/features/security_monitoring.feature",
+ "file": "v2/security-monitoring/search-remediation-groups-filtered-by-status-and-assignee-returns-ok-response.json",
+ "scenario": "Search remediation groups filtered by status and assignee returns \"OK\" response",
+ "version": "v2"
+ },
{
"feature": "Security Monitoring",
"feature_file": "../../v2/features/security_monitoring.feature",
diff --git a/tests/generated-test/test-runner-data/v2/security-monitoring/search-remediation-groups-filtered-by-host-and-container-vulnerabilities-returns-ok-response.json b/tests/generated-test/test-runner-data/v2/security-monitoring/search-remediation-groups-filtered-by-host-and-container-vulnerabilities-returns-ok-response.json
new file mode 100644
index 0000000000..247a7e585e
--- /dev/null
+++ b/tests/generated-test/test-runner-data/v2/security-monitoring/search-remediation-groups-filtered-by-host-and-container-vulnerabilities-returns-ok-response.json
@@ -0,0 +1,42 @@
+{
+ "api": "SecurityMonitoring",
+ "expected_status": 200,
+ "feature": "Security Monitoring",
+ "id": "v2/Security Monitoring/Search remediation groups filtered by host and container vulnerabilities returns \"OK\" response",
+ "operation_id": "SearchRemediationGroups",
+ "request": {
+ "body": null,
+ "content_type": null,
+ "method": "GET",
+ "pagination": false,
+ "parameters": [
+ {
+ "explode": null,
+ "in": "query",
+ "name": "filter[finding_type]",
+ "required": false,
+ "schema": {
+ "format": null,
+ "items": {
+ "format": null,
+ "ref": "RemediationGroupFindingType",
+ "type": "string"
+ },
+ "ref": null,
+ "type": "array"
+ },
+ "source": {
+ "type": "literal",
+ "value": [
+ "host_and_container_vulnerability"
+ ]
+ },
+ "style": null
+ }
+ ],
+ "path": "/api/v2/security/remediation_groups"
+ },
+ "scenario": "Search remediation groups filtered by host and container vulnerabilities returns \"OK\" response",
+ "schema_version": 1,
+ "version": "v2"
+}
diff --git a/tests/generated-test/test-runner-data/v2/security-monitoring/search-remediation-groups-filtered-by-status-and-assignee-returns-ok-response.json b/tests/generated-test/test-runner-data/v2/security-monitoring/search-remediation-groups-filtered-by-status-and-assignee-returns-ok-response.json
new file mode 100644
index 0000000000..1bb8c2056d
--- /dev/null
+++ b/tests/generated-test/test-runner-data/v2/security-monitoring/search-remediation-groups-filtered-by-status-and-assignee-returns-ok-response.json
@@ -0,0 +1,66 @@
+{
+ "api": "SecurityMonitoring",
+ "expected_status": 200,
+ "feature": "Security Monitoring",
+ "id": "v2/Security Monitoring/Search remediation groups filtered by status and assignee returns \"OK\" response",
+ "operation_id": "SearchRemediationGroups",
+ "request": {
+ "body": null,
+ "content_type": null,
+ "method": "GET",
+ "pagination": false,
+ "parameters": [
+ {
+ "explode": null,
+ "in": "query",
+ "name": "filter[status]",
+ "required": false,
+ "schema": {
+ "format": null,
+ "items": {
+ "format": null,
+ "ref": "RemediationGroupStatus",
+ "type": "string"
+ },
+ "ref": null,
+ "type": "array"
+ },
+ "source": {
+ "type": "literal",
+ "value": [
+ "triage",
+ "open"
+ ]
+ },
+ "style": null
+ },
+ {
+ "explode": null,
+ "in": "query",
+ "name": "filter[assignee_id]",
+ "required": false,
+ "schema": {
+ "format": null,
+ "items": {
+ "format": null,
+ "ref": null,
+ "type": "string"
+ },
+ "ref": null,
+ "type": "array"
+ },
+ "source": {
+ "type": "literal",
+ "value": [
+ "unassigned"
+ ]
+ },
+ "style": null
+ }
+ ],
+ "path": "/api/v2/security/remediation_groups"
+ },
+ "scenario": "Search remediation groups filtered by status and assignee returns \"OK\" response",
+ "schema_version": 1,
+ "version": "v2"
+}
diff --git a/tests/generated-test/test-server-data/v2/security-monitoring.json b/tests/generated-test/test-server-data/v2/security-monitoring.json
index 4a4ef4c4d0..3d1b774405 100644
--- a/tests/generated-test/test-server-data/v2/security-monitoring.json
+++ b/tests/generated-test/test-server-data/v2/security-monitoring.json
@@ -13322,6 +13322,86 @@
"scenario": "Run a historical job returns \"Status created\" response",
"version": "v2"
},
+ {
+ "feature": "Security Monitoring",
+ "frozen_at": "2026-12-04T10:00:00.000Z",
+ "interactions": [
+ {
+ "request": {
+ "body": {
+ "type": "empty",
+ "value": null
+ },
+ "content_type": "",
+ "method": "GET",
+ "path": "/api/v2/security/remediation_groups",
+ "query": [
+ [
+ "filter[finding_type]",
+ "host_and_container_vulnerability"
+ ]
+ ]
+ },
+ "response": {
+ "body": {
+ "encoding": "text",
+ "value": "{\"data\":[{\"id\":\"cloudvm.image_update:eyJhY3Rpb24iOiJhbHBpbmUiLCJncm91cGluZ19sb2NhdGlvbiI6IkRvY2tlcmZpbGUiLCJyZW1lZGlhdGlvbl9raW5kIjoiaW1hZ2VfdXBkYXRlIiwicmVwb3NpdG9yeV9pZCI6ImdpdGh1Yi5jb20vYWNtZS9hcGkifQ\",\"type\":\"remediation_groups\",\"attributes\":{\"grouping_definition_id\":\"cloudvm.image_update\",\"title\":\"Upgrade alpine to 3.20.3\",\"status\":\"triage\",\"findings\":{\"total\":40,\"by_severity\":{\"critical\":1,\"high\":9,\"medium\":20,\"low\":10,\"info\":0,\"none\":0,\"unknown\":0},\"query\":\"@status:open @remediation.is_available:true @risk.is_production:true @risk.is_image_running:true @resource_type:image @finding_type:(host_and_container_vulnerability) @git.repository_id:\\\"github.com/acme/api\\\" (@code_location.filename:\\\"Dockerfile\\\" OR (-@code_location.filename:* @container_image.repository:\\\"Dockerfile\\\")) @remediation.container_image.latest_major.name:\\\"alpine\\\"\"},\"owners\":{\"codeowners\":{\"items\":[\"@acme/platform\"],\"total\":1},\"teams\":{\"items\":[\"platform\"],\"total\":1}},\"image_update\":{\"repository_id\":\"github.com/acme/api\",\"grouping_location\":\"Dockerfile\",\"location_is_filename\":true,\"remediation_kind\":\"image_update\",\"action\":\"alpine\",\"target_version\":\"3.20.3\",\"advisory_count\":25,\"exploitable_cve_count\":2,\"file_count\":1}},\"relationships\":{\"case\":{\"data\":null}}},{\"id\":\"cloudvm.image_update:eyJhY3Rpb24iOiJuZ2lueCIsImdyb3VwaW5nX2xvY2F0aW9uIjoiYWNtZS93ZWIiLCJyZW1lZGlhdGlvbl9raW5kIjoiaW1hZ2VfdXBkYXRlIiwicmVwb3NpdG9yeV9pZCI6InVua25vd24ifQ\",\"type\":\"remediation_groups\",\"attributes\":{\"grouping_definition_id\":\"cloudvm.image_update\",\"title\":\"Upgrade nginx to 1.27.3\",\"status\":\"triage\",\"findings\":{\"total\":18,\"by_severity\":{\"critical\":0,\"high\":4,\"medium\":9,\"low\":5,\"info\":0,\"none\":0,\"unknown\":0},\"query\":\"@status:open @remediation.is_available:true @risk.is_production:true @risk.is_image_running:true @resource_type:image @finding_type:(host_and_container_vulnerability) -@git.repository_id:* (@code_location.filename:\\\"acme/web\\\" OR (-@code_location.filename:* @container_image.repository:\\\"acme/web\\\")) @remediation.container_image.latest_major.name:\\\"nginx\\\"\"},\"owners\":{\"codeowners\":{\"items\":[],\"total\":0},\"teams\":{\"items\":[\"web\"],\"total\":1}},\"image_update\":{\"repository_id\":\"unknown\",\"grouping_location\":\"acme/web\",\"location_is_filename\":false,\"remediation_kind\":\"image_update\",\"action\":\"nginx\",\"target_version\":\"1.27.3\",\"advisory_count\":11,\"exploitable_cve_count\":0,\"file_count\":0}},\"relationships\":{\"case\":{\"data\":null}}}],\"meta\":{\"page\":{\"number\":1,\"size\":50,\"total_filtered_count\":2}}}"
+ },
+ "headers": {
+ "content-type": "application/vnd.api+json"
+ },
+ "reason": "OK",
+ "status": 200
+ }
+ }
+ ],
+ "scenario": "Search remediation groups filtered by host and container vulnerabilities returns \"OK\" response",
+ "version": "v2"
+ },
+ {
+ "feature": "Security Monitoring",
+ "frozen_at": "2026-12-04T10:00:00.000Z",
+ "interactions": [
+ {
+ "request": {
+ "body": {
+ "type": "empty",
+ "value": null
+ },
+ "content_type": "",
+ "method": "GET",
+ "path": "/api/v2/security/remediation_groups",
+ "query": [
+ [
+ "filter[assignee_id]",
+ "unassigned"
+ ],
+ [
+ "filter[status]",
+ "open"
+ ],
+ [
+ "filter[status]",
+ "triage"
+ ]
+ ]
+ },
+ "response": {
+ "body": {
+ "encoding": "text",
+ "value": "{\"data\":[{\"id\":\"sca.package_update:eyJlY29zeXN0ZW0iOiJucG0iLCJyZWNvbW1lbmRlZF9uYW1lIjoibG9kYXNoIiwicmVwb3NpdG9yeV9pZCI6ImdpdGh1Yi5jb20vYWNtZS9hcGkifQ\",\"type\":\"remediation_groups\",\"attributes\":{\"grouping_definition_id\":\"sca.package_update\",\"title\":\"Update lodash to 4.17.21 in github.com/acme/api\",\"status\":\"open\",\"findings\":{\"total\":12,\"by_severity\":{\"critical\":2,\"high\":5,\"medium\":4,\"low\":1,\"info\":0,\"none\":0,\"unknown\":0},\"query\":\"@package.dependency_type:direct @remediation.is_available:true @advisory.type:component_with_known_vulnerability -@git.is_default_branch:false @status:open @git.repository_id:* @remediation.recommended.name:* @package.declaration.block.filename:* @finding_type:(library_vulnerability) @git.repository_id:\\\"github.com/acme/api\\\" @vulnerability.stack.ecosystem:\\\"npm\\\" @remediation.recommended.name:\\\"lodash\\\"\"},\"owners\":{\"codeowners\":{\"items\":[\"@acme/payments\",\"@acme/platform\"],\"total\":2},\"teams\":{\"items\":[\"payments\"],\"total\":1}},\"package_update\":{\"repository_id\":\"github.com/acme/api\",\"ecosystem\":\"npm\",\"package_name\":\"lodash\",\"target_version\":\"4.17.21\",\"advisory_count\":3,\"exploitable_cve_count\":1,\"file_count\":2}},\"relationships\":{\"case\":{\"data\":{\"id\":\"c1234567-89ab-cdef-0123-456789abcdef\",\"type\":\"cases\"}}}},{\"id\":\"sca.package_update:eyJlY29zeXN0ZW0iOiJucG0iLCJyZWNvbW1lbmRlZF9uYW1lIjoibWluaW1pc3QiLCJyZXBvc2l0b3J5X2lkIjoiZ2l0aHViLmNvbS9hY21lL3dlYiJ9\",\"type\":\"remediation_groups\",\"attributes\":{\"grouping_definition_id\":\"sca.package_update\",\"title\":\"Update minimist to 1.2.8 in github.com/acme/web\",\"status\":\"triage\",\"findings\":{\"total\":4,\"by_severity\":{\"critical\":1,\"high\":2,\"medium\":1,\"low\":0,\"info\":0,\"none\":0,\"unknown\":0},\"query\":\"@package.dependency_type:direct @remediation.is_available:true @advisory.type:component_with_known_vulnerability -@git.is_default_branch:false @status:open @git.repository_id:* @remediation.recommended.name:* @package.declaration.block.filename:* @finding_type:(library_vulnerability) @git.repository_id:\\\"github.com/acme/web\\\" @vulnerability.stack.ecosystem:\\\"npm\\\" @remediation.recommended.name:\\\"minimist\\\"\"},\"owners\":{\"codeowners\":{\"items\":[],\"total\":0},\"teams\":{\"items\":[\"web\"],\"total\":1}},\"package_update\":{\"repository_id\":\"github.com/acme/web\",\"ecosystem\":\"npm\",\"package_name\":\"minimist\",\"target_version\":\"1.2.8\",\"advisory_count\":2,\"exploitable_cve_count\":0,\"file_count\":1}},\"relationships\":{\"case\":{\"data\":null}}}],\"meta\":{\"page\":{\"number\":1,\"size\":50,\"total_filtered_count\":2}}}"
+ },
+ "headers": {
+ "content-type": "application/vnd.api+json"
+ },
+ "reason": "OK",
+ "status": 200
+ }
+ }
+ ],
+ "scenario": "Search remediation groups filtered by status and assignee returns \"OK\" response",
+ "version": "v2"
+ },
{
"feature": "Security Monitoring",
"frozen_at": "2026-11-20T13:20:23.214Z",
@@ -13376,7 +13456,7 @@
"response": {
"body": {
"encoding": "text",
- "value": "{\"data\":[{\"id\":\"sca.package_update:eyJlY29zeXN0ZW0iOiJucG0iLCJyZWNvbW1lbmRlZF9uYW1lIjoibG9kYXNoIiwicmVwb3NpdG9yeV9pZCI6ImdpdGh1Yi5jb20vYWNtZS9hcGkifQ\",\"type\":\"remediation_groups\",\"attributes\":{\"grouping_definition_id\":\"sca.package_update\",\"title\":\"Update lodash to 4.17.21 in github.com/acme/api\",\"findings\":{\"total\":12,\"by_severity\":{\"critical\":2,\"high\":5,\"medium\":4,\"low\":1,\"info\":0,\"none\":0,\"unknown\":0}},\"owners\":{\"codeowners\":{\"items\":[\"@acme/payments\",\"@acme/platform\"],\"total\":2},\"teams\":{\"items\":[\"payments\"],\"total\":1}},\"package_update\":{\"repository_id\":\"github.com/acme/api\",\"ecosystem\":\"npm\",\"package_name\":\"lodash\",\"target_version\":\"4.17.21\",\"advisory_count\":3,\"exploitable_cve_count\":1,\"file_count\":2}},\"relationships\":{\"case\":{\"data\":{\"id\":\"c1234567-89ab-cdef-0123-456789abcdef\",\"type\":\"cases\"}}}},{\"id\":\"sca.package_update:eyJlY29zeXN0ZW0iOiJucG0iLCJyZWNvbW1lbmRlZF9uYW1lIjoiYXhpb3MiLCJyZXBvc2l0b3J5X2lkIjoiZ2l0aHViLmNvbS9hY21lL2FwaSJ9\",\"type\":\"remediation_groups\",\"attributes\":{\"grouping_definition_id\":\"sca.package_update\",\"title\":\"Update axios to 1.7.4 in github.com/acme/api\",\"findings\":{\"total\":6,\"by_severity\":{\"critical\":0,\"high\":3,\"medium\":2,\"low\":1,\"info\":0,\"none\":0,\"unknown\":0}},\"owners\":{\"codeowners\":{\"items\":[\"@acme/platform\"],\"total\":1},\"teams\":{\"items\":[\"platform\"],\"total\":1}},\"package_update\":{\"repository_id\":\"github.com/acme/api\",\"ecosystem\":\"npm\",\"package_name\":\"axios\",\"target_version\":\"1.7.4\",\"advisory_count\":2,\"exploitable_cve_count\":0,\"file_count\":1}},\"relationships\":{\"case\":{\"data\":null}}}],\"meta\":{\"page\":{\"number\":1,\"size\":50,\"total_filtered_count\":2}}}"
+ "value": "{\"data\":[{\"id\":\"sca.package_update:eyJlY29zeXN0ZW0iOiJucG0iLCJyZWNvbW1lbmRlZF9uYW1lIjoibG9kYXNoIiwicmVwb3NpdG9yeV9pZCI6ImdpdGh1Yi5jb20vYWNtZS9hcGkifQ\",\"type\":\"remediation_groups\",\"attributes\":{\"grouping_definition_id\":\"sca.package_update\",\"title\":\"Update lodash to 4.17.21 in github.com/acme/api\",\"status\":\"in_progress\",\"assignee_id\":\"6a1f0c3e-8b2d-4e5f-9a7c-1d2e3f4a5b6c\",\"findings\":{\"total\":12,\"by_severity\":{\"critical\":2,\"high\":5,\"medium\":4,\"low\":1,\"info\":0,\"none\":0,\"unknown\":0},\"query\":\"@package.dependency_type:direct @remediation.is_available:true @advisory.type:component_with_known_vulnerability -@git.is_default_branch:false @status:open @git.repository_id:* @remediation.recommended.name:* @package.declaration.block.filename:* @finding_type:(library_vulnerability) @git.repository_id:\\\"github.com/acme/api\\\" @vulnerability.stack.ecosystem:\\\"npm\\\" @remediation.recommended.name:\\\"lodash\\\"\"},\"owners\":{\"codeowners\":{\"items\":[\"@acme/payments\",\"@acme/platform\"],\"total\":2},\"teams\":{\"items\":[\"payments\"],\"total\":1}},\"package_update\":{\"repository_id\":\"github.com/acme/api\",\"ecosystem\":\"npm\",\"package_name\":\"lodash\",\"target_version\":\"4.17.21\",\"advisory_count\":3,\"exploitable_cve_count\":1,\"file_count\":2}},\"relationships\":{\"case\":{\"data\":{\"id\":\"c1234567-89ab-cdef-0123-456789abcdef\",\"type\":\"cases\"}}}},{\"id\":\"sca.package_update:eyJlY29zeXN0ZW0iOiJucG0iLCJyZWNvbW1lbmRlZF9uYW1lIjoiYXhpb3MiLCJyZXBvc2l0b3J5X2lkIjoiZ2l0aHViLmNvbS9hY21lL2FwaSJ9\",\"type\":\"remediation_groups\",\"attributes\":{\"grouping_definition_id\":\"sca.package_update\",\"title\":\"Update axios to 1.7.4 in github.com/acme/api\",\"status\":\"triage\",\"findings\":{\"total\":6,\"by_severity\":{\"critical\":0,\"high\":3,\"medium\":2,\"low\":1,\"info\":0,\"none\":0,\"unknown\":0},\"query\":\"@package.dependency_type:direct @remediation.is_available:true @advisory.type:component_with_known_vulnerability -@git.is_default_branch:false @status:open @git.repository_id:* @remediation.recommended.name:* @package.declaration.block.filename:* @finding_type:(library_vulnerability) @git.repository_id:\\\"github.com/acme/api\\\" @vulnerability.stack.ecosystem:\\\"npm\\\" @remediation.recommended.name:\\\"axios\\\"\"},\"owners\":{\"codeowners\":{\"items\":[\"@acme/platform\"],\"total\":1},\"teams\":{\"items\":[\"platform\"],\"total\":1}},\"package_update\":{\"repository_id\":\"github.com/acme/api\",\"ecosystem\":\"npm\",\"package_name\":\"axios\",\"target_version\":\"1.7.4\",\"advisory_count\":2,\"exploitable_cve_count\":0,\"file_count\":1}},\"relationships\":{\"case\":{\"data\":null}}}],\"meta\":{\"page\":{\"number\":1,\"size\":50,\"total_filtered_count\":2}}}"
},
"headers": {
"content-type": "application/vnd.api+json"
@@ -13416,7 +13496,7 @@
"response": {
"body": {
"encoding": "text",
- "value": "{\"data\":[{\"id\":\"sca.package_update:eyJlY29zeXN0ZW0iOiJucG0iLCJyZWNvbW1lbmRlZF9uYW1lIjoibG9kYXNoIiwicmVwb3NpdG9yeV9pZCI6ImdpdGh1Yi5jb20vYWNtZS9hcGkifQ\",\"type\":\"remediation_groups\",\"attributes\":{\"grouping_definition_id\":\"sca.package_update\",\"title\":\"Update lodash to 4.17.21 in github.com/acme/api\",\"findings\":{\"total\":12,\"by_severity\":{\"critical\":2,\"high\":5,\"medium\":4,\"low\":1,\"info\":0,\"none\":0,\"unknown\":0}},\"owners\":{\"codeowners\":{\"items\":[\"@acme/payments\",\"@acme/platform\"],\"total\":2},\"teams\":{\"items\":[\"payments\"],\"total\":1}},\"package_update\":{\"repository_id\":\"github.com/acme/api\",\"ecosystem\":\"npm\",\"package_name\":\"lodash\",\"target_version\":\"4.17.21\",\"advisory_count\":3,\"exploitable_cve_count\":1,\"file_count\":2}},\"relationships\":{\"case\":{\"data\":{\"id\":\"c1234567-89ab-cdef-0123-456789abcdef\",\"type\":\"cases\"}}}},{\"id\":\"sca.package_update:eyJlY29zeXN0ZW0iOiJucG0iLCJyZWNvbW1lbmRlZF9uYW1lIjoiYXhpb3MiLCJyZXBvc2l0b3J5X2lkIjoiZ2l0aHViLmNvbS9hY21lL2FwaSJ9\",\"type\":\"remediation_groups\",\"attributes\":{\"grouping_definition_id\":\"sca.package_update\",\"title\":\"Update axios to 1.7.4 in github.com/acme/api\",\"findings\":{\"total\":6,\"by_severity\":{\"critical\":0,\"high\":3,\"medium\":2,\"low\":1,\"info\":0,\"none\":0,\"unknown\":0}},\"owners\":{\"codeowners\":{\"items\":[\"@acme/platform\"],\"total\":1},\"teams\":{\"items\":[\"platform\"],\"total\":1}},\"package_update\":{\"repository_id\":\"github.com/acme/api\",\"ecosystem\":\"npm\",\"package_name\":\"axios\",\"target_version\":\"1.7.4\",\"advisory_count\":2,\"exploitable_cve_count\":0,\"file_count\":1}},\"relationships\":{\"case\":{\"data\":null}}}],\"meta\":{\"page\":{\"number\":1,\"size\":2,\"total_filtered_count\":3}}}"
+ "value": "{\"data\":[{\"id\":\"sca.package_update:eyJlY29zeXN0ZW0iOiJucG0iLCJyZWNvbW1lbmRlZF9uYW1lIjoibG9kYXNoIiwicmVwb3NpdG9yeV9pZCI6ImdpdGh1Yi5jb20vYWNtZS9hcGkifQ\",\"type\":\"remediation_groups\",\"attributes\":{\"grouping_definition_id\":\"sca.package_update\",\"title\":\"Update lodash to 4.17.21 in github.com/acme/api\",\"status\":\"in_progress\",\"assignee_id\":\"6a1f0c3e-8b2d-4e5f-9a7c-1d2e3f4a5b6c\",\"findings\":{\"total\":12,\"by_severity\":{\"critical\":2,\"high\":5,\"medium\":4,\"low\":1,\"info\":0,\"none\":0,\"unknown\":0},\"query\":\"@package.dependency_type:direct @remediation.is_available:true @advisory.type:component_with_known_vulnerability -@git.is_default_branch:false @status:open @git.repository_id:* @remediation.recommended.name:* @package.declaration.block.filename:* @finding_type:(library_vulnerability) @git.repository_id:\\\"github.com/acme/api\\\" @vulnerability.stack.ecosystem:\\\"npm\\\" @remediation.recommended.name:\\\"lodash\\\"\"},\"owners\":{\"codeowners\":{\"items\":[\"@acme/payments\",\"@acme/platform\"],\"total\":2},\"teams\":{\"items\":[\"payments\"],\"total\":1}},\"package_update\":{\"repository_id\":\"github.com/acme/api\",\"ecosystem\":\"npm\",\"package_name\":\"lodash\",\"target_version\":\"4.17.21\",\"advisory_count\":3,\"exploitable_cve_count\":1,\"file_count\":2}},\"relationships\":{\"case\":{\"data\":{\"id\":\"c1234567-89ab-cdef-0123-456789abcdef\",\"type\":\"cases\"}}}},{\"id\":\"sca.package_update:eyJlY29zeXN0ZW0iOiJucG0iLCJyZWNvbW1lbmRlZF9uYW1lIjoiYXhpb3MiLCJyZXBvc2l0b3J5X2lkIjoiZ2l0aHViLmNvbS9hY21lL2FwaSJ9\",\"type\":\"remediation_groups\",\"attributes\":{\"grouping_definition_id\":\"sca.package_update\",\"title\":\"Update axios to 1.7.4 in github.com/acme/api\",\"status\":\"triage\",\"findings\":{\"total\":6,\"by_severity\":{\"critical\":0,\"high\":3,\"medium\":2,\"low\":1,\"info\":0,\"none\":0,\"unknown\":0},\"query\":\"@package.dependency_type:direct @remediation.is_available:true @advisory.type:component_with_known_vulnerability -@git.is_default_branch:false @status:open @git.repository_id:* @remediation.recommended.name:* @package.declaration.block.filename:* @finding_type:(library_vulnerability) @git.repository_id:\\\"github.com/acme/api\\\" @vulnerability.stack.ecosystem:\\\"npm\\\" @remediation.recommended.name:\\\"axios\\\"\"},\"owners\":{\"codeowners\":{\"items\":[\"@acme/platform\"],\"total\":1},\"teams\":{\"items\":[\"platform\"],\"total\":1}},\"package_update\":{\"repository_id\":\"github.com/acme/api\",\"ecosystem\":\"npm\",\"package_name\":\"axios\",\"target_version\":\"1.7.4\",\"advisory_count\":2,\"exploitable_cve_count\":0,\"file_count\":1}},\"relationships\":{\"case\":{\"data\":null}}}],\"meta\":{\"page\":{\"number\":1,\"size\":2,\"total_filtered_count\":3}}}"
},
"headers": {
"content-type": "application/vnd.api+json"
@@ -13448,7 +13528,7 @@
"response": {
"body": {
"encoding": "text",
- "value": "{\"data\":[{\"id\":\"sca.package_update:eyJlY29zeXN0ZW0iOiJucG0iLCJyZWNvbW1lbmRlZF9uYW1lIjoibWluaW1pc3QiLCJyZXBvc2l0b3J5X2lkIjoiZ2l0aHViLmNvbS9hY21lL3dlYiJ9\",\"type\":\"remediation_groups\",\"attributes\":{\"grouping_definition_id\":\"sca.package_update\",\"title\":\"Update minimist to 1.2.8 in github.com/acme/web\",\"findings\":{\"total\":4,\"by_severity\":{\"critical\":1,\"high\":2,\"medium\":1,\"low\":0,\"info\":0,\"none\":0,\"unknown\":0}},\"owners\":{\"codeowners\":{\"items\":[],\"total\":0},\"teams\":{\"items\":[\"web\"],\"total\":1}},\"package_update\":{\"repository_id\":\"github.com/acme/web\",\"ecosystem\":\"npm\",\"package_name\":\"minimist\",\"target_version\":\"1.2.8\",\"advisory_count\":2,\"exploitable_cve_count\":0,\"file_count\":1}},\"relationships\":{\"case\":{\"data\":null}}}],\"meta\":{\"page\":{\"number\":2,\"size\":2,\"total_filtered_count\":3}}}"
+ "value": "{\"data\":[{\"id\":\"sca.package_update:eyJlY29zeXN0ZW0iOiJucG0iLCJyZWNvbW1lbmRlZF9uYW1lIjoibWluaW1pc3QiLCJyZXBvc2l0b3J5X2lkIjoiZ2l0aHViLmNvbS9hY21lL3dlYiJ9\",\"type\":\"remediation_groups\",\"attributes\":{\"grouping_definition_id\":\"sca.package_update\",\"title\":\"Update minimist to 1.2.8 in github.com/acme/web\",\"status\":\"triage\",\"findings\":{\"total\":4,\"by_severity\":{\"critical\":1,\"high\":2,\"medium\":1,\"low\":0,\"info\":0,\"none\":0,\"unknown\":0},\"query\":\"@package.dependency_type:direct @remediation.is_available:true @advisory.type:component_with_known_vulnerability -@git.is_default_branch:false @status:open @git.repository_id:* @remediation.recommended.name:* @package.declaration.block.filename:* @finding_type:(library_vulnerability) @git.repository_id:\\\"github.com/acme/web\\\" @vulnerability.stack.ecosystem:\\\"npm\\\" @remediation.recommended.name:\\\"minimist\\\"\"},\"owners\":{\"codeowners\":{\"items\":[],\"total\":0},\"teams\":{\"items\":[\"web\"],\"total\":1}},\"package_update\":{\"repository_id\":\"github.com/acme/web\",\"ecosystem\":\"npm\",\"package_name\":\"minimist\",\"target_version\":\"1.2.8\",\"advisory_count\":2,\"exploitable_cve_count\":0,\"file_count\":1}},\"relationships\":{\"case\":{\"data\":null}}}],\"meta\":{\"page\":{\"number\":2,\"size\":2,\"total_filtered_count\":3}}}"
},
"headers": {
"content-type": "application/vnd.api+json"
diff --git a/tests/v2/features/security_monitoring.feature b/tests/v2/features/security_monitoring.feature
index fd3f11258e..2472cbc463 100644
--- a/tests/v2/features/security_monitoring.feature
+++ b/tests/v2/features/security_monitoring.feature
@@ -3695,6 +3695,29 @@ Feature: Security Monitoring
When the request is sent
Then the response status is 200 OK
+ @replay-only @team:ddoghq/k9-investigation
+ Scenario: Search remediation groups filtered by host and container vulnerabilities returns "OK" response
+ Given operation "SearchRemediationGroups" enabled
+ And new "SearchRemediationGroups" request
+ And request contains "filter[finding_type]" parameter with value ["host_and_container_vulnerability"]
+ When the request is sent
+ Then the response status is 200 OK
+ And the response "data[0].attributes.grouping_definition_id" is equal to "cloudvm.image_update"
+ And the response "data[0].attributes.image_update.repository_id" is equal to "github.com/acme/api"
+ And the response "data[1].attributes.image_update.repository_id" is equal to "unknown"
+
+ @replay-only @team:ddoghq/k9-investigation
+ Scenario: Search remediation groups filtered by status and assignee returns "OK" response
+ Given operation "SearchRemediationGroups" enabled
+ And new "SearchRemediationGroups" request
+ And request contains "filter[status]" parameter with value ["triage", "open"]
+ And request contains "filter[assignee_id]" parameter with value ["unassigned"]
+ When the request is sent
+ Then the response status is 200 OK
+ And the response "data[0].attributes.status" is equal to "open"
+ And the response "data[1].attributes.status" is equal to "triage"
+ And the response "data[1].attributes.findings.query" is equal to "@package.dependency_type:direct @remediation.is_available:true @advisory.type:component_with_known_vulnerability -@git.is_default_branch:false @status:open @git.repository_id:* @remediation.recommended.name:* @package.declaration.block.filename:* @finding_type:(library_vulnerability) @git.repository_id:\"github.com/acme/web\" @vulnerability.stack.ecosystem:\"npm\" @remediation.recommended.name:\"minimist\""
+
@replay-only @team:ddoghq/k9-investigation
Scenario: Search remediation groups returns "Bad Request" response
Given operation "SearchRemediationGroups" enabled