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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-02 14:39:40.447374",
"spec_repo_commit": "b4e964b3"
"regenerated": "2025-01-02 16:18:05.602948",
"spec_repo_commit": "bc53c28f"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-02 14:39:40.463809",
"spec_repo_commit": "b4e964b3"
"regenerated": "2025-01-02 16:18:05.618096",
"spec_repo_commit": "bc53c28f"
}
}
}
209 changes: 209 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7340,6 +7340,140 @@ components:
meta:
$ref: '#/components/schemas/CSMAgentsMetadata'
type: object
CsmCloudAccountsCoverageAnalysisAttributes:
description: CSM Cloud Accounts Coverage Analysis attributes.
properties:
aws_coverage:
$ref: '#/components/schemas/CsmCoverageAnalysis'
azure_coverage:
$ref: '#/components/schemas/CsmCoverageAnalysis'
gcp_coverage:
$ref: '#/components/schemas/CsmCoverageAnalysis'
org_id:
description: The ID of your organization.
example: 123456
format: int64
type: integer
total_coverage:
$ref: '#/components/schemas/CsmCoverageAnalysis'
type: object
CsmCloudAccountsCoverageAnalysisData:
description: CSM Cloud Accounts Coverage Analysis data.
properties:
attributes:
$ref: '#/components/schemas/CsmCloudAccountsCoverageAnalysisAttributes'
id:
description: The ID of your organization.
example: 66b3c6b5-5c9a-457e-b1c3-f247ca23afa3
type: string
type:
default: get_cloud_accounts_coverage_analysis_response_public_v0
description: The type of the resource. The value should always be `get_cloud_accounts_coverage_analysis_response_public_v0`.
example: get_cloud_accounts_coverage_analysis_response_public_v0
type: string
type: object
CsmCloudAccountsCoverageAnalysisResponse:
description: CSM Cloud Accounts Coverage Analysis response.
properties:
data:
$ref: '#/components/schemas/CsmCloudAccountsCoverageAnalysisData'
type: object
CsmCoverageAnalysis:
description: CSM Coverage Analysis.
properties:
configured_resources_count:
description: The number of fully configured resources.
example: 8
format: int64
type: integer
coverage:
description: The coverage percentage.
example: 0.8
format: double
type: number
partially_configured_resources_count:
description: The number of partially configured resources.
example: 0
format: int64
type: integer
total_resources_count:
description: The total number of resources.
example: 10
format: int64
type: integer
type: object
CsmHostsAndContainersCoverageAnalysisAttributes:
description: CSM Hosts and Containers Coverage Analysis attributes.
properties:
cspm_coverage:
$ref: '#/components/schemas/CsmCoverageAnalysis'
cws_coverage:
$ref: '#/components/schemas/CsmCoverageAnalysis'
org_id:
description: The ID of your organization.
example: 123456
format: int64
type: integer
total_coverage:
$ref: '#/components/schemas/CsmCoverageAnalysis'
vm_coverage:
$ref: '#/components/schemas/CsmCoverageAnalysis'
type: object
CsmHostsAndContainersCoverageAnalysisData:
description: CSM Hosts and Containers Coverage Analysis data.
properties:
attributes:
$ref: '#/components/schemas/CsmHostsAndContainersCoverageAnalysisAttributes'
id:
description: The ID of your organization.
example: 66b3c6b5-5c9a-457e-b1c3-f247ca23afa3
type: string
type:
default: get_hosts_and_containers_coverage_analysis_response_public_v0
description: The type of the resource. The value should always be `get_hosts_and_containers_coverage_analysis_response_public_v0`.
example: get_hosts_and_containers_coverage_analysis_response_public_v0
type: string
type: object
CsmHostsAndContainersCoverageAnalysisResponse:
description: CSM Hosts and Containers Coverage Analysis response.
properties:
data:
$ref: '#/components/schemas/CsmHostsAndContainersCoverageAnalysisData'
type: object
CsmServerlessCoverageAnalysisAttributes:
description: CSM Serverless Resources Coverage Analysis attributes.
properties:
cws_coverage:
$ref: '#/components/schemas/CsmCoverageAnalysis'
org_id:
description: The ID of your organization.
example: 123456
format: int64
type: integer
total_coverage:
$ref: '#/components/schemas/CsmCoverageAnalysis'
type: object
CsmServerlessCoverageAnalysisData:
description: CSM Serverless Resources Coverage Analysis data.
properties:
attributes:
$ref: '#/components/schemas/CsmServerlessCoverageAnalysisAttributes'
id:
description: The ID of your organization.
example: 66b3c6b5-5c9a-457e-b1c3-f247ca23afa3
type: string
type:
default: get_serverless_coverage_analysis_response_public_v0
description: The type of the resource. The value should always be `get_serverless_coverage_analysis_response_public_v0`.
example: get_serverless_coverage_analysis_response_public_v0
type: string
type: object
CsmServerlessCoverageAnalysisResponse:
description: CSM Serverless Resources Coverage Analysis response.
properties:
data:
$ref: '#/components/schemas/CsmServerlessCoverageAnalysisData'
type: object
CustomConnection:
description: The definition of `CustomConnection` object.
properties:
Expand Down Expand Up @@ -33610,6 +33744,72 @@ paths:
summary: Get all CSM Agents
tags:
- CSM Agents
/api/v2/csm/onboarding/coverage_analysis/cloud_accounts:
get:
description: 'Get the CSM Coverage Analysis of your Cloud Accounts.

This is calculated based on the number of your Cloud Accounts that are

scanned for security issues.'
operationId: GetCSMCloudAccountsCoverageAnalysis
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CsmCloudAccountsCoverageAnalysisResponse'
description: OK
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Get the CSM Cloud Accounts Coverage Analysis
tags:
- CSM Coverage Analysis
/api/v2/csm/onboarding/coverage_analysis/hosts_and_containers:
get:
description: 'Get the CSM Coverage Analysis of your Hosts and Containers.

This is calculated based on the number of agents running on your Hosts

and Containers with CSM feature(s) enabled.'
operationId: GetCSMHostsAndContainersCoverageAnalysis
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CsmHostsAndContainersCoverageAnalysisResponse'
description: OK
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Get the CSM Hosts and Containers Coverage Analysis
tags:
- CSM Coverage Analysis
/api/v2/csm/onboarding/coverage_analysis/serverless:
get:
description: 'Get the CSM Coverage Analysis of your Serverless Resources.

This is calculated based on the number of agents running on your Serverless

Resources with CSM feature(s) enabled.'
operationId: GetCSMServerlessCoverageAnalysis
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CsmServerlessCoverageAnalysisResponse'
description: OK
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Get the CSM Serverless Coverage Analysis
tags:
- CSM Coverage Analysis
/api/v2/csm/onboarding/serverless/agents:
get:
description: Get the list of all CSM Serverless Agents running on your hosts
Expand Down Expand Up @@ -47941,6 +48141,15 @@ tags:

Go to https://docs.datadoghq.com/security/cloud_security_management to learn more'
name: CSM Agents
- description: 'Datadog Cloud Security Management (CSM) delivers real-time threat
detection

and continuous configuration audits across your entire cloud infrastructure,

all in a unified view for seamless collaboration and faster remediation.

Go to https://docs.datadoghq.com/security/cloud_security_management to learn more.'
name: CSM Coverage Analysis
- description: Cloud Security Management Threats (CSM Threats) monitors file, network,
and process activity across your environment to detect real-time threats to your
infrastructure. See [Cloud Security Management Threats](https://docs.datadoghq.com/security/threats/)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2024-12-19T17:17:10.296Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2024-12-19T17:17:10.704Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2024-12-19T17:17:11.235Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get the CSM Cloud Accounts Coverage Analysis returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::CSMCoverageAnalysisAPI.new
p api_instance.get_csm_cloud_accounts_coverage_analysis()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Quality Violation

Suggested change
p api_instance.get_csm_cloud_accounts_coverage_analysis()
p api_instance.get_csm_cloud_accounts_coverage_analysis
Do not use parentheses with methods that take no arguments (...read more)

The rule "Avoid parentheses when methods take no arguments" is part of the Ruby style guide. It suggests that when a method takes no arguments, you should not use parentheses. This is because the use of parentheses in such a case is redundant and unnecessary, and it can make your code more difficult to read and understand.

This rule is important because it promotes cleaner, more readable code. In Ruby, clean and readable code is highly valued. By following this rule, you can ensure your code is easier to understand and maintain, which is crucial for long-term project success.

To adhere to this rule, remove the parentheses when calling a method that does not require any arguments. For example, instead of writing 'test'.upcase(), you should write 'test'.upcase. Similarly, instead of Kernel.exit!(), write Kernel.exit!. However, note that there is an exception for super - super by itself is different from super(), so in this case, parentheses may be necessary.

View in Datadog  Leave us feedback  Documentation

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get the CSM Hosts and Containers Coverage Analysis returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::CSMCoverageAnalysisAPI.new
p api_instance.get_csm_hosts_and_containers_coverage_analysis()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Quality Violation

Suggested change
p api_instance.get_csm_hosts_and_containers_coverage_analysis()
p api_instance.get_csm_hosts_and_containers_coverage_analysis
Do not use parentheses with methods that take no arguments (...read more)

The rule "Avoid parentheses when methods take no arguments" is part of the Ruby style guide. It suggests that when a method takes no arguments, you should not use parentheses. This is because the use of parentheses in such a case is redundant and unnecessary, and it can make your code more difficult to read and understand.

This rule is important because it promotes cleaner, more readable code. In Ruby, clean and readable code is highly valued. By following this rule, you can ensure your code is easier to understand and maintain, which is crucial for long-term project success.

To adhere to this rule, remove the parentheses when calling a method that does not require any arguments. For example, instead of writing 'test'.upcase(), you should write 'test'.upcase. Similarly, instead of Kernel.exit!(), write Kernel.exit!. However, note that there is an exception for super - super by itself is different from super(), so in this case, parentheses may be necessary.

View in Datadog  Leave us feedback  Documentation

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get the CSM Serverless Coverage Analysis returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::CSMCoverageAnalysisAPI.new
p api_instance.get_csm_serverless_coverage_analysis()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Quality Violation

Suggested change
p api_instance.get_csm_serverless_coverage_analysis()
p api_instance.get_csm_serverless_coverage_analysis
Do not use parentheses with methods that take no arguments (...read more)

The rule "Avoid parentheses when methods take no arguments" is part of the Ruby style guide. It suggests that when a method takes no arguments, you should not use parentheses. This is because the use of parentheses in such a case is redundant and unnecessary, and it can make your code more difficult to read and understand.

This rule is important because it promotes cleaner, more readable code. In Ruby, clean and readable code is highly valued. By following this rule, you can ensure your code is easier to understand and maintain, which is crucial for long-term project success.

To adhere to this rule, remove the parentheses when calling a method that does not require any arguments. For example, instead of writing 'test'.upcase(), you should write 'test'.upcase. Similarly, instead of Kernel.exit!(), write Kernel.exit!. However, note that there is an exception for super - super by itself is different from super(), so in this case, parentheses may be necessary.

View in Datadog  Leave us feedback  Documentation

31 changes: 31 additions & 0 deletions features/v2/csm_coverage_analysis.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@endpoint(csm-coverage-analysis) @endpoint(csm-coverage-analysis-v2)
Feature: CSM Coverage Analysis
Datadog Cloud Security Management (CSM) delivers real-time threat
detection and continuous configuration audits across your entire cloud
infrastructure, all in a unified view for seamless collaboration and
faster remediation. Go to
https://docs.datadoghq.com/security/cloud_security_management to learn
more.

Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "CSMCoverageAnalysis" API

@team:DataDog/k9-cloud-security-platform
Scenario: Get the CSM Cloud Accounts Coverage Analysis returns "OK" response
Given new "GetCSMCloudAccountsCoverageAnalysis" request
When the request is sent
Then the response status is 200 OK

@team:DataDog/k9-cloud-security-platform
Scenario: Get the CSM Hosts and Containers Coverage Analysis returns "OK" response
Given new "GetCSMHostsAndContainersCoverageAnalysis" request
When the request is sent
Then the response status is 200 OK

@team:DataDog/k9-cloud-security-platform
Scenario: Get the CSM Serverless Coverage Analysis returns "OK" response
Given new "GetCSMServerlessCoverageAnalysis" request
When the request is sent
Then the response status is 200 OK
18 changes: 18 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,24 @@
"type": "safe"
}
},
"GetCSMCloudAccountsCoverageAnalysis": {
"tag": "CSM Coverage Analysis",
"undo": {
"type": "safe"
}
},
"GetCSMHostsAndContainersCoverageAnalysis": {
"tag": "CSM Coverage Analysis",
"undo": {
"type": "safe"
}
},
"GetCSMServerlessCoverageAnalysis": {
"tag": "CSM Coverage Analysis",
"undo": {
"type": "safe"
}
},
"ListAllCSMServerlessAgents": {
"tag": "CSM Agents",
"undo": {
Expand Down
Loading