Skip to content
Open
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
3 changes: 0 additions & 3 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146585,9 +146585,6 @@ paths:
permissions:
- security_monitoring_findings_write
- appsec_vm_write
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/security/findings/search:
post:
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.muteSecurityFindings", true);
SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);

MuteFindingsRequest body =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.muteSecurityFindings", true);
SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);

MuteFindingsRequest body =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.muteSecurityFindings", true);
SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);

MuteFindingsRequest body =
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/datadog/api/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,6 @@ public class ApiClient {
put("v2.listVulnerabilities", false);
put("v2.listVulnerableAssets", false);
put("v2.muteFindings", false);
put("v2.muteSecurityFindings", false);
put("v2.runHistoricalJob", false);
put("v2.searchSecurityMonitoringHistsignals", false);
put("v2.updateSecurityMonitoringDataset", false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19991,13 +19991,6 @@ public CompletableFuture<MuteFindingsResponse> muteSecurityFindingsAsync(
*/
public ApiResponse<MuteFindingsResponse> muteSecurityFindingsWithHttpInfo(
MuteFindingsRequest body) throws ApiException {
// Check if unstable operation is enabled
String operationId = "muteSecurityFindings";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = body;

// verify the required parameter 'body' is set
Expand Down Expand Up @@ -20040,16 +20033,6 @@ public ApiResponse<MuteFindingsResponse> muteSecurityFindingsWithHttpInfo(
*/
public CompletableFuture<ApiResponse<MuteFindingsResponse>> muteSecurityFindingsWithHttpInfoAsync(
MuteFindingsRequest body) {
// Check if unstable operation is enabled
String operationId = "muteSecurityFindings";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
CompletableFuture<ApiResponse<MuteFindingsResponse>> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
return result;
}
Object localVarPostBody = body;

// verify the required parameter 'body' is set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2300,56 +2300,49 @@ Feature: Security Monitoring

@generated @skip @team:DataDog/k9-investigation
Scenario: Mute or unmute security findings returns "Accepted" response
Given operation "MuteSecurityFindings" enabled
And new "MuteSecurityFindings" request
Given new "MuteSecurityFindings" request
And body with value {"data": {"attributes": {"mute": {"description": "To be resolved later.", "expire_at": 1778721573794, "is_muted": true, "reason": "PENDING_FIX"}}, "id": "00000000-0000-0000-0000-000000000001", "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}}, "type": "mute"}}
When the request is sent
Then the response status is 202 Accepted

@generated @skip @team:DataDog/k9-investigation
Scenario: Mute or unmute security findings returns "Bad Request" response
Given operation "MuteSecurityFindings" enabled
And new "MuteSecurityFindings" request
Given new "MuteSecurityFindings" request
And body with value {"data": {"attributes": {"mute": {"description": "To be resolved later.", "expire_at": 1778721573794, "is_muted": true, "reason": "PENDING_FIX"}}, "id": "00000000-0000-0000-0000-000000000001", "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}}, "type": "mute"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/k9-investigation
Scenario: Mute or unmute security findings returns "Not Found" response
Given operation "MuteSecurityFindings" enabled
And new "MuteSecurityFindings" request
Given new "MuteSecurityFindings" request
And body with value {"data": {"attributes": {"mute": {"description": "To be resolved later.", "expire_at": 1778721573794, "is_muted": true, "reason": "PENDING_FIX"}}, "id": "00000000-0000-0000-0000-000000000001", "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}}, "type": "mute"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/k9-investigation
Scenario: Mute or unmute security findings returns "Unprocessable Entity" response
Given operation "MuteSecurityFindings" enabled
And new "MuteSecurityFindings" request
Given new "MuteSecurityFindings" request
And body with value {"data": {"attributes": {"mute": {"description": "To be resolved later.", "expire_at": 1778721573794, "is_muted": true, "reason": "PENDING_FIX"}}, "id": "00000000-0000-0000-0000-000000000001", "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}}, "type": "mute"}}
When the request is sent
Then the response status is 422 Unprocessable Entity

@team:DataDog/k9-investigation
Scenario: Mute security findings returns "Accepted" response
Given operation "MuteSecurityFindings" enabled
And new "MuteSecurityFindings" request
Given new "MuteSecurityFindings" request
And body with value {"data": {"attributes": {"mute": {"description": "To be resolved later.", "expire_at": 1778721573794, "is_muted": true, "reason": "RISK_ACCEPTED"}}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwMC0wYmd-MDE4NjcyMDJkMzE4MDE5ODY5MGE4ZmQ2MmFlMjg0Y2M=", "type": "findings"}]}}, "type": "mute"}}
When the request is sent
Then the response status is 202 Accepted

@team:DataDog/k9-investigation
Scenario: Mute security findings returns "Not Found" response
Given operation "MuteSecurityFindings" enabled
And new "MuteSecurityFindings" request
Given new "MuteSecurityFindings" request
And body with value {"data": {"attributes": {"mute": {"description": "To be resolved later.", "expire_at": 1778721573794, "is_muted": true, "reason": "RISK_ACCEPTED"}}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}}, "type": "mute"}}
When the request is sent
Then the response status is 404 Not Found

@team:DataDog/k9-investigation
Scenario: Mute security findings returns "Unprocessable Entity" response
Given operation "MuteSecurityFindings" enabled
And new "MuteSecurityFindings" request
Given new "MuteSecurityFindings" request
And body with value {"data": {"attributes": {"mute": {"description": "To be resolved later.", "expire_at": 1, "is_muted": true, "reason": "RISK_ACCEPTED"}}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}}, "type": "mute"}}
When the request is sent
Then the response status is 422 Unprocessable Entity
Expand Down Expand Up @@ -2573,24 +2566,21 @@ Feature: Security Monitoring

@team:DataDog/k9-investigation
Scenario: Unmute security findings returns "Accepted" response
Given operation "MuteSecurityFindings" enabled
And new "MuteSecurityFindings" request
Given new "MuteSecurityFindings" request
And body with value {"data": {"attributes": {"mute": {"description": "Resolved.", "is_muted": false, "reason": "NO_PENDING_FIX"}}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwMC0wYmd-MDE4NjcyMDJkMzE4MDE5ODY5MGE4ZmQ2MmFlMjg0Y2M=", "type": "findings"}]}}, "type": "mute"}}
When the request is sent
Then the response status is 202 Accepted

@team:DataDog/k9-investigation
Scenario: Unmute security findings returns "Not Found" response
Given operation "MuteSecurityFindings" enabled
And new "MuteSecurityFindings" request
Given new "MuteSecurityFindings" request
And body with value {"data": {"attributes": {"mute": {"description": "Resolved.", "is_muted": false, "reason": "NO_PENDING_FIX"}}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}}, "type": "mute"}}
When the request is sent
Then the response status is 404 Not Found

@team:DataDog/k9-investigation
Scenario: Unmute security findings returns "Unprocessable Entity" response
Given operation "MuteSecurityFindings" enabled
And new "MuteSecurityFindings" request
Given new "MuteSecurityFindings" request
And body with value {"data": {"attributes": {"mute": {"description": "Resolved.", "is_muted": false, "reason": "RISK_ACCEPTED"}}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}}, "type": "mute"}}
When the request is sent
Then the response status is 422 Unprocessable Entity
Expand Down