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
24 changes: 0 additions & 24 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82195,13 +82195,6 @@ paths:
description: 'Get a list of security findings that match a search query.


This endpoint requires one of the following permissions:

- `security_monitoring_findings_read`

- `appsec_vm_read`


### Query Syntax


Expand Down Expand Up @@ -82264,8 +82257,6 @@ paths:
appKeyAuth: []
- AuthZ:
- security_monitoring_findings_read
- AuthZ:
- appsec_vm_read
summary: List security findings
tags:
- Security Monitoring
Expand All @@ -82279,9 +82270,6 @@ paths:
permissions:
- security_monitoring_findings_read
- appsec_vm_read
x-unstable: '**Note**: This endpoint is in beta and subject to change.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/security/findings/cases:
delete:
description: 'Detach security findings from their case.
Expand Down Expand Up @@ -82506,13 +82494,6 @@ paths:
description: 'Get a list of security findings that match a search query.


This endpoint requires one of the following permissions:

- `security_monitoring_findings_read`

- `appsec_vm_read`


### Query Syntax


Expand Down Expand Up @@ -82546,8 +82527,6 @@ paths:
appKeyAuth: []
- AuthZ:
- security_monitoring_findings_read
- AuthZ:
- appsec_vm_read
summary: Search security findings
tags:
- Security Monitoring
Expand All @@ -82562,9 +82541,6 @@ paths:
permissions:
- security_monitoring_findings_read
- appsec_vm_read
x-unstable: '**Note**: This endpoint is in beta and subject to change.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/security/sboms:
get:
description: 'Get a list of assets SBOMs for an organization.
Expand Down
3 changes: 0 additions & 3 deletions examples/v2/security-monitoring/ListSecurityFindings.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# List security findings returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.list_security_findings".to_sym] = true
end
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
p api_instance.list_security_findings()
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# List security findings returns "OK" response with pagination

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.list_security_findings".to_sym] = true
end
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
opts = {
page_limit: 5,
Expand Down
3 changes: 0 additions & 3 deletions examples/v2/security-monitoring/SearchSecurityFindings.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Search security findings returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.search_security_findings".to_sym] = true
end
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new

body = DatadogAPIClient::V2::SecurityFindingsSearchRequest.new({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Search security findings returns "OK" response with pagination

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.search_security_findings".to_sym] = true
end
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new

body = DatadogAPIClient::V2::SecurityFindingsSearchRequest.new({
Expand Down
18 changes: 6 additions & 12 deletions features/v2/security_monitoring.feature
Original file line number Diff line number Diff line change
Expand Up @@ -1323,23 +1323,20 @@ Feature: Security Monitoring

@team:DataDog/cloud-security-posture-management @team:DataDog/k9-findings-platform
Scenario: List security findings returns "Bad Request" response
Given operation "ListSecurityFindings" enabled
And new "ListSecurityFindings" request
Given new "ListSecurityFindings" request
And request contains "page[cursor]" parameter with value "invalid_cursor"
When the request is sent
Then the response status is 400 Bad Request

@team:DataDog/cloud-security-posture-management @team:DataDog/k9-findings-platform
Scenario: List security findings returns "OK" response
Given operation "ListSecurityFindings" enabled
And new "ListSecurityFindings" request
Given new "ListSecurityFindings" request
When the request is sent
Then the response status is 200 OK

@team:DataDog/cloud-security-posture-management @team:DataDog/k9-findings-platform
Scenario: List security findings returns "OK" response with pagination
Given operation "ListSecurityFindings" enabled
And new "ListSecurityFindings" request
Given new "ListSecurityFindings" request
And request contains "page[limit]" parameter with value 5
When the request is sent
Then the response status is 200 OK
Expand Down Expand Up @@ -1602,24 +1599,21 @@ Feature: Security Monitoring

@team:DataDog/cloud-security-posture-management @team:DataDog/k9-findings-platform
Scenario: Search security findings returns "Bad Request" response
Given operation "SearchSecurityFindings" enabled
And new "SearchSecurityFindings" request
Given new "SearchSecurityFindings" request
And body with value {"page": {"cursor": "invalid_cursor"}}
When the request is sent
Then the response status is 400 Bad Request

@team:DataDog/cloud-security-posture-management @team:DataDog/k9-findings-platform
Scenario: Search security findings returns "OK" response
Given operation "SearchSecurityFindings" enabled
And new "SearchSecurityFindings" request
Given new "SearchSecurityFindings" request
And body with value {"data": {"attributes": {"filter": "@severity:(critical OR high)"}}}
When the request is sent
Then the response status is 200 OK

@team:DataDog/cloud-security-posture-management @team:DataDog/k9-findings-platform @with-pagination
Scenario: Search security findings returns "OK" response with pagination
Given operation "SearchSecurityFindings" enabled
And new "SearchSecurityFindings" request
Given new "SearchSecurityFindings" request
And body with value {"data": {"attributes": {"filter": "@severity:(critical OR high)", "page": {"limit": 1}}}}
When the request is sent
Then the response status is 200 OK
Expand Down
2 changes: 0 additions & 2 deletions lib/datadog_api_client/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,12 @@ def initialize
"v2.list_findings": false,
"v2.list_multiple_rulesets": false,
"v2.list_scanned_assets_metadata": false,
"v2.list_security_findings": false,
"v2.list_security_monitoring_histsignals": false,
"v2.list_threat_hunting_jobs": false,
"v2.list_vulnerabilities": false,
"v2.list_vulnerable_assets": false,
"v2.mute_findings": false,
"v2.run_threat_hunting_job": false,
"v2.search_security_findings": false,
"v2.search_security_monitoring_histsignals": false,
"v2.create_dataset": false,
"v2.delete_dataset": false,
Expand Down
20 changes: 0 additions & 20 deletions lib/datadog_api_client/v2/api/security_monitoring_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3700,10 +3700,6 @@ def list_security_findings(opts = {})
#
# Get a list of security findings that match a search query.
#
# This endpoint requires one of the following permissions:
# - `security_monitoring_findings_read`
# - `appsec_vm_read`
#
# ### Query Syntax
#
# This endpoint uses the logs query syntax. Findings attributes (living in the custom. namespace) are prefixed by @ when queried. Tags are queried without a prefix.
Expand All @@ -3717,12 +3713,6 @@ def list_security_findings(opts = {})
# @option opts [SecurityFindingsSort] :sort Sorts by @detection_changed_at.
# @return [Array<(ListSecurityFindingsResponse, Integer, Hash)>] ListSecurityFindingsResponse data, response status code and response headers
def list_security_findings_with_http_info(opts = {})
unstable_enabled = @api_client.config.unstable_operations["v2.list_security_findings".to_sym]
if unstable_enabled
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_security_findings")
else
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_security_findings"))
end

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.list_security_findings ...'
Expand Down Expand Up @@ -4904,10 +4894,6 @@ def search_security_findings(body, opts = {})
#
# Get a list of security findings that match a search query.
#
# This endpoint requires one of the following permissions:
# - `security_monitoring_findings_read`
# - `appsec_vm_read`
#
# ### Query Syntax
#
# The API uses the logs query syntax. Findings attributes (living in the custom. namespace) are prefixed by @ when queried. Tags are queried without a prefix.
Expand All @@ -4918,12 +4904,6 @@ def search_security_findings(body, opts = {})
# @param opts [Hash] the optional parameters
# @return [Array<(ListSecurityFindingsResponse, Integer, Hash)>] ListSecurityFindingsResponse data, response status code and response headers
def search_security_findings_with_http_info(body, opts = {})
unstable_enabled = @api_client.config.unstable_operations["v2.search_security_findings".to_sym]
if unstable_enabled
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.search_security_findings")
else
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.search_security_findings"))
end

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.search_security_findings ...'
Expand Down
Loading