Skip to content

Commit 1d9abdf

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 5b8fcb9 of spec repo (#3422)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 4e01f41 commit 1d9abdf

12 files changed

Lines changed: 470 additions & 78 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 159 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -76116,73 +76116,90 @@ components:
7611676116
- attributes
7611776117
type: object
7611876118
SecurityEntityRiskScoreAttributes:
76119-
description: Attributes of an entity risk score
76119+
description: Attributes of an entity risk score.
7612076120
properties:
76121+
accountIds:
76122+
description: Cloud account IDs associated with the entity.
76123+
example: ["222233334444", "3333333555555"]
76124+
items:
76125+
description: A cloud account ID.
76126+
type: string
76127+
type: array
7612176128
configRisks:
7612276129
$ref: "#/components/schemas/SecurityEntityConfigRisks"
76123-
entityID:
76124-
description: Unique identifier for the entity
76125-
example: "arn:aws:iam::123456789012:user/john.doe"
76126-
type: string
7612776130
entityMetadata:
7612876131
$ref: "#/components/schemas/SecurityEntityMetadata"
7612976132
entityName:
76130-
description: Human-readable name of the entity
76133+
description: Human-readable name of the entity.
7613176134
example: "john.doe"
7613276135
type: string
7613376136
entityProviders:
76134-
description: Cloud providers associated with the entity
76135-
example: ["aws"]
76137+
description: Cloud providers associated with the entity.
76138+
example: ["AWS"]
7613676139
items:
7613776140
description: A cloud provider name.
7613876141
type: string
7613976142
type: array
7614076143
entityRoles:
76141-
description: Roles associated with the entity
76142-
example: ["Admin", "Developer"]
76144+
description: Roles associated with the entity.
76145+
example: []
7614376146
items:
7614476147
description: A role assigned to the entity.
7614576148
type: string
7614676149
type: array
76150+
entitySubTypes:
76151+
description: Sub-types associated with the entity.
76152+
example: ["Root"]
76153+
items:
76154+
description: An entity sub-type label.
76155+
type: string
76156+
type: array
7614776157
entityType:
76148-
description: Type of the entity (e.g., aws_iam_user, aws_ec2_instance)
76158+
description: Type of the entity (for example, aws_iam_user, aws_ec2_instance).
7614976159
example: "aws_iam_user"
7615076160
type: string
76161+
entityTypes:
76162+
description: All types associated with the entity.
76163+
example: ["Root", "User Name"]
76164+
items:
76165+
description: An entity type label.
76166+
type: string
76167+
type: array
7615176168
firstDetected:
76152-
description: Timestamp when the entity was first detected (Unix milliseconds)
76153-
example: 1704067200000
76169+
description: Timestamp when the entity was first detected (Unix milliseconds).
76170+
example: 1778876604661
7615476171
format: int64
7615576172
type: integer
7615676173
lastActivityTitle:
76157-
description: Title of the most recent signal detected for this entity
76174+
description: Title of the most recent signal detected for this entity.
7615876175
example: "Suspicious API call detected"
7615976176
type: string
7616076177
lastDetected:
76161-
description: Timestamp when the entity was last detected (Unix milliseconds)
76162-
example: 1705276800000
76178+
description: Timestamp when the entity was last detected (Unix milliseconds).
76179+
example: 1780064607093
7616376180
format: int64
7616476181
type: integer
7616576182
riskScore:
76166-
description: Current risk score for the entity
76183+
description: Current risk score for the entity.
7616776184
example: 85
7616876185
format: int64
7616976186
type: integer
7617076187
riskScoreEvolution:
76171-
description: Change in risk score compared to previous period
76188+
description: Change in risk score compared to previous period.
7617276189
example: 12
7617376190
format: int64
7617476191
type: integer
7617576192
severity:
7617676193
$ref: "#/components/schemas/SecurityEntityRiskScoreAttributesSeverity"
7617776194
signalsDetected:
76178-
description: Number of security signals detected for this entity
76195+
description: Number of security signals detected for this entity.
7617976196
example: 15
7618076197
format: int64
7618176198
type: integer
7618276199
required:
76183-
- entityID
76184-
- entityType
7618576200
- entityProviders
76201+
- entitySubTypes
76202+
- accountIds
7618676203
- riskScore
7618776204
- riskScoreEvolution
7618876205
- severity
@@ -76209,11 +76226,19 @@ components:
7620976226
- MEDIUM
7621076227
- LOW
7621176228
- INFO
76229+
SecurityEntityRiskScoreResponse:
76230+
description: Response containing a single entity risk score
76231+
properties:
76232+
data:
76233+
$ref: "#/components/schemas/SecurityEntityRiskScore"
76234+
required:
76235+
- data
76236+
type: object
7621276237
SecurityEntityRiskScoreType:
76213-
description: Resource type
76238+
description: Resource type.
7621476239
enum:
76215-
- security_entity_risk_score
76216-
example: security_entity_risk_score
76240+
- SecurityEntityRiskScore
76241+
example: SecurityEntityRiskScore
7621776242
type: string
7621876243
x-enum-varnames:
7621976244
- SECURITY_ENTITY_RISK_SCORE
@@ -153097,28 +153122,34 @@ paths:
153097153122
value:
153098153123
data:
153099153124
- attributes:
153125+
accountIds:
153126+
- "123456789012"
153100153127
configRisks:
153101153128
hasIdentityRisk: false
153102153129
hasMisconfiguration: true
153103153130
hasPrivilegedRole: false
153104153131
isPrivileged: false
153105153132
isProduction: true
153106153133
isPubliclyAccessible: true
153107-
entityID: "arn:aws:iam::123456789012:user/test-user"
153108153134
entityMetadata:
153109153135
environments:
153110153136
- production
153111-
mitreTactics: []
153112-
mitreTechniques: []
153137+
mitreTactics:
153138+
- ta0006-credential-access
153139+
mitreTechniques:
153140+
- t1078-valid-accounts
153113153141
services:
153114153142
- api-gateway
153115153143
sources:
153116153144
- cloudtrail
153117153145
entityName: test-user
153118153146
entityProviders:
153119-
- aws
153147+
- AWS
153120153148
entityRoles: []
153121-
entityType: aws_iam_user
153149+
entitySubTypes:
153150+
- "IAM User"
153151+
entityTypes:
153152+
- "IAMUser"
153122153153
firstDetected: 1704067200000
153123153154
lastActivityTitle: "Suspicious API call detected"
153124153155
lastDetected: 1705276800000
@@ -153127,10 +153158,12 @@ paths:
153127153158
severity: critical
153128153159
signalsDetected: 15
153129153160
id: "arn:aws:iam::123456789012:user/test-user"
153130-
type: security_entity_risk_score
153161+
type: SecurityEntityRiskScore
153131153162
meta:
153132-
page:
153133-
total: 1
153163+
pageNumber: 1
153164+
pageSize: 10
153165+
queryId: "abc123def456"
153166+
totalRowCount: 1
153134153167
schema:
153135153168
$ref: "#/components/schemas/SecurityEntityRiskScoresResponse"
153136153169
description: OK
@@ -153160,6 +153193,100 @@ paths:
153160153193
x-unstable: |-
153161153194
**Note**: This endpoint is in public beta and it's subject to change.
153162153195
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
153196+
/api/v2/security-entities/risk-scores/{entity_id}:
153197+
get:
153198+
description: |-
153199+
Get the risk score for a specific entity by its ID. Returns security risk assessment including risk score, severity, detected signals, misconfigurations, and identity risks.
153200+
operationId: GetEntityRiskScore
153201+
parameters:
153202+
- description: The URL-encoded unique identifier for the entity.
153203+
in: path
153204+
name: entity_id
153205+
required: true
153206+
schema:
153207+
example: "arn:aws:iam::123456789012:user/john.doe"
153208+
type: string
153209+
responses:
153210+
"200":
153211+
content:
153212+
application/json:
153213+
examples:
153214+
default:
153215+
value:
153216+
data:
153217+
attributes:
153218+
accountIds:
153219+
- "123456789012"
153220+
configRisks:
153221+
hasIdentityRisk: false
153222+
hasMisconfiguration: true
153223+
hasPrivilegedRole: false
153224+
isPrivileged: false
153225+
isProduction: true
153226+
isPubliclyAccessible: true
153227+
entityMetadata:
153228+
environments:
153229+
- production
153230+
mitreTactics:
153231+
- ta0006-credential-access
153232+
mitreTechniques:
153233+
- t1078-valid-accounts
153234+
services:
153235+
- api-gateway
153236+
sources:
153237+
- cloudtrail
153238+
entityName: "test-user"
153239+
entityProviders:
153240+
- AWS
153241+
entityRoles: []
153242+
entitySubTypes:
153243+
- "IAM User"
153244+
entityTypes:
153245+
- "IAMUser"
153246+
firstDetected: 1704067200000
153247+
lastActivityTitle: "Suspicious API call detected"
153248+
lastDetected: 1705276800000
153249+
riskScore: 85
153250+
riskScoreEvolution: 12
153251+
severity: critical
153252+
signalsDetected: 15
153253+
id: "arn:aws:iam::123456789012:user/test-user"
153254+
type: SecurityEntityRiskScore
153255+
schema:
153256+
$ref: "#/components/schemas/SecurityEntityRiskScoreResponse"
153257+
description: OK
153258+
"400":
153259+
content:
153260+
application/json:
153261+
schema:
153262+
$ref: "#/components/schemas/JSONAPIErrorResponse"
153263+
description: Bad Request
153264+
"401":
153265+
content:
153266+
application/json:
153267+
schema:
153268+
$ref: "#/components/schemas/JSONAPIErrorResponse"
153269+
description: Unauthorized
153270+
"403":
153271+
content:
153272+
application/json:
153273+
schema:
153274+
$ref: "#/components/schemas/JSONAPIErrorResponse"
153275+
description: Forbidden
153276+
"404":
153277+
content:
153278+
application/json:
153279+
schema:
153280+
$ref: "#/components/schemas/JSONAPIErrorResponse"
153281+
description: Not Found
153282+
"429":
153283+
$ref: "#/components/responses/TooManyRequestsResponse"
153284+
summary: Get Entity Risk Score
153285+
tags:
153286+
- Entity Risk Scores
153287+
x-unstable: |-
153288+
**Note**: This endpoint is in public beta and it's subject to change.
153289+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
153163153290
/api/v2/security/cloud_workload/policy/download:
153164153291
get:
153165153292
description: |-
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Get Entity Risk Score returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.get_entity_risk_score".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::EntityRiskScoresAPI.new
8+
p api_instance.get_entity_risk_score("arn:aws:iam::123456789012:user/john.doe")

features/scenarios_model_mapping.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4786,6 +4786,9 @@
47864786
"filter_query" => "String",
47874787
"entity_type" => "Array<String>",
47884788
},
4789+
"v2.GetEntityRiskScore" => {
4790+
"entity_id" => "String",
4791+
},
47894792
"v2.ReorderScanningGroups" => {
47904793
"body" => "SensitiveDataScannerConfigRequest",
47914794
},

features/v2/entity_risk_scores.feature

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,41 @@ Feature: Entity Risk Scores
66
Given a valid "apiKeyAuth" key in the system
77
And a valid "appKeyAuth" key in the system
88
And an instance of "EntityRiskScores" API
9-
And operation "ListEntityRiskScores" enabled
10-
And new "ListEntityRiskScores" request
9+
10+
@generated @skip @team:DataDog/cloud-siem
11+
Scenario: Get Entity Risk Score returns "Bad Request" response
12+
Given operation "GetEntityRiskScore" enabled
13+
And new "GetEntityRiskScore" request
14+
And request contains "entity_id" parameter from "REPLACE.ME"
15+
When the request is sent
16+
Then the response status is 400 Bad Request
17+
18+
@generated @skip @team:DataDog/cloud-siem
19+
Scenario: Get Entity Risk Score returns "Not Found" response
20+
Given operation "GetEntityRiskScore" enabled
21+
And new "GetEntityRiskScore" request
22+
And request contains "entity_id" parameter from "REPLACE.ME"
23+
When the request is sent
24+
Then the response status is 404 Not Found
25+
26+
@generated @skip @team:DataDog/cloud-siem
27+
Scenario: Get Entity Risk Score returns "OK" response
28+
Given operation "GetEntityRiskScore" enabled
29+
And new "GetEntityRiskScore" request
30+
And request contains "entity_id" parameter from "REPLACE.ME"
31+
When the request is sent
32+
Then the response status is 200 OK
1133

1234
@generated @skip @team:DataDog/cloud-siem
1335
Scenario: List Entity Risk Scores returns "Bad Request" response
36+
Given operation "ListEntityRiskScores" enabled
37+
And new "ListEntityRiskScores" request
1438
When the request is sent
1539
Then the response status is 400 Bad Request
1640

1741
@generated @skip @team:DataDog/cloud-siem
1842
Scenario: List Entity Risk Scores returns "OK" response
43+
Given operation "ListEntityRiskScores" enabled
44+
And new "ListEntityRiskScores" request
1945
When the request is sent
2046
Then the response status is 200 OK

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6396,6 +6396,12 @@
63966396
"type": "safe"
63976397
}
63986398
},
6399+
"GetEntityRiskScore": {
6400+
"tag": "Entity Risk Scores",
6401+
"undo": {
6402+
"type": "safe"
6403+
}
6404+
},
63996405
"DownloadCloudWorkloadPolicyFile": {
64006406
"tag": "CSM Threats",
64016407
"undo": {

lib/datadog_api_client/configuration.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,7 @@ def initialize
571571
"v2.query_aggregated_signals_problems": false,
572572
"v2.query_aggregated_waterfall": false,
573573
"v2.create_scorecard_outcomes_batch": false,
574+
"v2.get_entity_risk_score": false,
574575
"v2.list_entity_risk_scores": false,
575576
"v2.create_incident_service": false,
576577
"v2.delete_incident_service": false,

lib/datadog_api_client/inflector.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5806,6 +5806,7 @@ def overrides
58065806
"v2.security_entity_risk_score" => "SecurityEntityRiskScore",
58075807
"v2.security_entity_risk_score_attributes" => "SecurityEntityRiskScoreAttributes",
58085808
"v2.security_entity_risk_score_attributes_severity" => "SecurityEntityRiskScoreAttributesSeverity",
5809+
"v2.security_entity_risk_score_response" => "SecurityEntityRiskScoreResponse",
58095810
"v2.security_entity_risk_scores_meta" => "SecurityEntityRiskScoresMeta",
58105811
"v2.security_entity_risk_scores_response" => "SecurityEntityRiskScoresResponse",
58115812
"v2.security_entity_risk_score_type" => "SecurityEntityRiskScoreType",

0 commit comments

Comments
 (0)