Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
168 changes: 55 additions & 113 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120114,18 +120114,16 @@ components:
type: object
RemediationGroupAttributes:
description: |-
Attributes of a remediation group. Each group includes one kind object, `package_update` or `image_update`,
depending on its grouping definition.
Attributes of a remediation group. Each group includes one kind object, depending on its grouping definition.
properties:
findings:
$ref: "#/components/schemas/RemediationGroupFindings"
grouping_definition_id:
description: |-
Grouping definition that formed the group: `sca.package_update` or `cloudvm.image_update`.
description: Grouping definition that formed the group, such as `sca.package_update`.
example: sca.package_update
type: string
image_update:
$ref: "#/components/schemas/RemediationGroupImageUpdate"
owners:
$ref: "#/components/schemas/RemediationGroupOwners"
package_update:
$ref: "#/components/schemas/RemediationGroupPackageUpdate"
title:
Expand All @@ -120136,6 +120134,7 @@ components:
- grouping_definition_id
- title
- findings
- owners
type: object
RemediationGroupCaseRelationship:
description: Relationship to the case that tracks the group's remediation.
Expand Down Expand Up @@ -120184,12 +120183,10 @@ 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
Expand Down Expand Up @@ -120255,70 +120252,6 @@ components:
- none
- unknown
type: object
RemediationGroupImageUpdate:
description: |-
An 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 `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.
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.name`.
example: Dockerfile
type: string
location_is_filename:
description: Whether `grouping_location` is a `@code_location.filename` rather than a `@container_image.name`.
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
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:
- 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:
Expand All @@ -120327,6 +120260,42 @@ components:
type: string
x-enum-varnames:
- CASE
RemediationGroupOwnerList:
description: |-
Owners of the group's open findings. `items` lists at most 5 owners, the owners of the most findings first,
then by name. `total` counts every distinct owner, so the list is cut when `total` is larger than the number
of items.
properties:
items:
description: Owners of the most findings in the group, at most 5.
example:
- "@acme/payments"
- "@acme/platform"
items:
type: string
type: array
total:
description: Number of distinct owners across the group's findings.
example: 2
format: int64
type: integer
required:
- items
- total
type: object
RemediationGroupOwners:
description: |-
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.
properties:
codeowners:
$ref: "#/components/schemas/RemediationGroupOwnerList"
teams:
$ref: "#/components/schemas/RemediationGroupOwnerList"
required:
- codeowners
- teams
type: object
RemediationGroupPackageUpdate:
description: |-
A package to update in a repository, for a group of library vulnerabilities (`sca.package_update`). The group
Expand Down Expand Up @@ -257903,15 +257872,14 @@ 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 or upgrading an image.
that one change fixes, such as updating a package in a repository.

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` |
| `cloudvm.image_update` | `host_and_container_vulnerability` | `image_update` |
| Grouping definition | Finding type | Kind object |
| -------------------- | ----------------------- | ---------------- |
| `sca.package_update` | `library_vulnerability` | `package_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
Expand Down Expand Up @@ -257991,42 +257959,6 @@ paths:
content:
application/json:
examples:
cloud_vm_group_without_case:
summary: A host and container vulnerability group with no case yet
value:
data:
- attributes:
findings:
by_severity:
critical: 1
high: 9
info: 0
low: 10
medium: 20
none: 0
unknown: 0
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
target_version: 3.20.3
title: Upgrade alpine to 3.20.3
id: cloudvm.image_update:eyJhY3Rpb24iOiJhbHBpbmUiLCJncm91cGluZ19sb2NhdGlvbiI6IkRvY2tlcmZpbGUiLCJyZW1lZGlhdGlvbl9raW5kIjoiaW1hZ2VfdXBkYXRlIn0
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:
Expand All @@ -258043,6 +257975,16 @@ paths:
unknown: 0
total: 12
grouping_definition_id: sca.package_update
owners:
codeowners:
items:
- "@acme/payments"
- "@acme/platform"
total: 2
teams:
items:
- payments
total: 1
package_update:
advisory_count: 3
ecosystem: npm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29951,16 +29951,14 @@ public PaginationIterable<RemediationGroupData> searchRemediationGroupsWithPagin

/**
* 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 or
* upgrading an image.
* security findings that one change fixes, such as updating a package in a repository.
*
* <p>Each group comes from a grouping definition, which sets the finding type it covers and the
* kind object the group returns:
*
* <p>| Grouping definition | Finding type | Kind object | | ---------------------- |
* ---------------------------------- | ---------------- | | <code>sca.package_update</code> |
* <code>library_vulnerability</code> | <code>package_update</code> | | <code>cloudvm.image_update
* </code> | <code>host_and_container_vulnerability</code> | <code>image_update</code> |
* <p>| Grouping definition | Finding type | Kind object | | -------------------- |
* ----------------------- | ---------------- | | <code>sca.package_update</code> | <code>
* library_vulnerability</code> | <code>package_update</code> |
*
* <p>Groups are computed from the attributes of security findings, described in the <a
* href="https://docs.datadoghq.com/security/guide/findings-schema/">security findings schema</a>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
import java.util.Objects;

/**
* Attributes of a remediation group. Each group includes one kind object, <code>package_update
* </code> or <code>image_update</code>, depending on its grouping definition.
* Attributes of a remediation group. Each group includes one kind object, depending on its grouping
* definition.
*/
@JsonPropertyOrder({
RemediationGroupAttributes.JSON_PROPERTY_FINDINGS,
RemediationGroupAttributes.JSON_PROPERTY_GROUPING_DEFINITION_ID,
RemediationGroupAttributes.JSON_PROPERTY_IMAGE_UPDATE,
RemediationGroupAttributes.JSON_PROPERTY_OWNERS,
RemediationGroupAttributes.JSON_PROPERTY_PACKAGE_UPDATE,
RemediationGroupAttributes.JSON_PROPERTY_TITLE
})
Expand All @@ -38,8 +38,8 @@ public class RemediationGroupAttributes {
public static final String JSON_PROPERTY_GROUPING_DEFINITION_ID = "grouping_definition_id";
private String groupingDefinitionId;

public static final String JSON_PROPERTY_IMAGE_UPDATE = "image_update";
private RemediationGroupImageUpdate imageUpdate;
public static final String JSON_PROPERTY_OWNERS = "owners";
private RemediationGroupOwners owners;

public static final String JSON_PROPERTY_PACKAGE_UPDATE = "package_update";
private RemediationGroupPackageUpdate packageUpdate;
Expand All @@ -55,10 +55,13 @@ public RemediationGroupAttributes(
RemediationGroupFindings findings,
@JsonProperty(required = true, value = JSON_PROPERTY_GROUPING_DEFINITION_ID)
String groupingDefinitionId,
@JsonProperty(required = true, value = JSON_PROPERTY_OWNERS) RemediationGroupOwners owners,
@JsonProperty(required = true, value = JSON_PROPERTY_TITLE) String title) {
this.findings = findings;
this.unparsed |= findings.unparsed;
this.groupingDefinitionId = groupingDefinitionId;
this.owners = owners;
this.unparsed |= owners.unparsed;
this.title = title;
}

Expand Down Expand Up @@ -93,8 +96,7 @@ public RemediationGroupAttributes groupingDefinitionId(String groupingDefinition
}

/**
* Grouping definition that formed the group: <code>sca.package_update</code> or <code>
* cloudvm.image_update</code>.
* Grouping definition that formed the group, such as <code>sca.package_update</code>.
*
* @return groupingDefinitionId
*/
Expand All @@ -108,31 +110,29 @@ public void setGroupingDefinitionId(String groupingDefinitionId) {
this.groupingDefinitionId = groupingDefinitionId;
}

public RemediationGroupAttributes imageUpdate(RemediationGroupImageUpdate imageUpdate) {
this.imageUpdate = imageUpdate;
this.unparsed |= imageUpdate.unparsed;
public RemediationGroupAttributes owners(RemediationGroupOwners owners) {
this.owners = owners;
this.unparsed |= owners.unparsed;
return this;
}

/**
* An image or package to upgrade, for a group of host and container vulnerabilities (<code>
* cloudvm.image_update</code>). The group gathers the open vulnerabilities of running production
* images that have a fix available, and groups them by <code>grouping_location</code>, <code>
* remediation_kind</code>, and <code>action</code>.
* Who should fix the group: the code owners of the group's findings, from their <code>
* @git.codeowners</code> attribute, and their Datadog teams, from their <code>team</code> tag. A
* group with no owners has empty <code>items</code> and a <code>total</code> of 0.
*
* @return imageUpdate
* @return owners
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_IMAGE_UPDATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public RemediationGroupImageUpdate getImageUpdate() {
return imageUpdate;
@JsonProperty(JSON_PROPERTY_OWNERS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public RemediationGroupOwners getOwners() {
return owners;
}

public void setImageUpdate(RemediationGroupImageUpdate imageUpdate) {
this.imageUpdate = imageUpdate;
if (imageUpdate != null) {
this.unparsed |= imageUpdate.unparsed;
public void setOwners(RemediationGroupOwners owners) {
this.owners = owners;
if (owners != null) {
this.unparsed |= owners.unparsed;
}
}

Expand Down Expand Up @@ -243,7 +243,7 @@ public boolean equals(Object o) {
return Objects.equals(this.findings, remediationGroupAttributes.findings)
&& Objects.equals(
this.groupingDefinitionId, remediationGroupAttributes.groupingDefinitionId)
&& Objects.equals(this.imageUpdate, remediationGroupAttributes.imageUpdate)
&& Objects.equals(this.owners, remediationGroupAttributes.owners)
&& Objects.equals(this.packageUpdate, remediationGroupAttributes.packageUpdate)
&& Objects.equals(this.title, remediationGroupAttributes.title)
&& Objects.equals(
Expand All @@ -253,7 +253,7 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
return Objects.hash(
findings, groupingDefinitionId, imageUpdate, packageUpdate, title, additionalProperties);
findings, groupingDefinitionId, owners, packageUpdate, title, additionalProperties);
}

@Override
Expand All @@ -264,7 +264,7 @@ public String toString() {
sb.append(" groupingDefinitionId: ")
.append(toIndentedString(groupingDefinitionId))
.append("\n");
sb.append(" imageUpdate: ").append(toIndentedString(imageUpdate)).append("\n");
sb.append(" owners: ").append(toIndentedString(owners)).append("\n");
sb.append(" packageUpdate: ").append(toIndentedString(packageUpdate)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" additionalProperties: ")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public RemediationGroupData attributes(RemediationGroupAttributes attributes) {
}

/**
* Attributes of a remediation group. Each group includes one kind object, <code>package_update
* </code> or <code>image_update</code>, depending on its grouping definition.
* Attributes of a remediation group. Each group includes one kind object, depending on its
* grouping definition.
*
* @return attributes
*/
Expand Down
Loading
Loading