Skip to content

Commit 4bf2b08

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit fcf2546 of spec repo (DataDog#3521)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 156713a commit 4bf2b08

11 files changed

Lines changed: 191 additions & 47 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29976,6 +29976,13 @@ components:
2997629976
Library:
2997729977
description: Vulnerability library.
2997829978
properties:
29979+
additional_names:
29980+
description: Related library or package names (such as child packages or
29981+
affected binary paths).
29982+
items:
29983+
example: linux-tools-common
29984+
type: string
29985+
type: array
2997929986
name:
2998029987
description: Vulnerability library name.
2998129988
example: linux-aws-5.15
@@ -57353,6 +57360,12 @@ components:
5735357360
type: array
5735457361
risks:
5735557362
$ref: '#/components/schemas/VulnerabilityRisks'
57363+
running_kernel:
57364+
description: "True if the vulnerability affects a package in the host\u2019s
57365+
running kernel, false if it affects a non-running kernel, and omit if
57366+
it is not kernel-related."
57367+
example: true
57368+
type: boolean
5735657369
status:
5735757370
$ref: '#/components/schemas/VulnerabilityStatus'
5735857371
title:
@@ -57413,10 +57426,15 @@ components:
5741357426
- RubyGems
5741457427
- Go
5741557428
- Packagist
57416-
- Ddeb
57429+
- Deb
5741757430
- Rpm
5741857431
- Apk
5741957432
- Windows
57433+
- Generic
57434+
- MacOs
57435+
- Oci
57436+
- BottleRocket
57437+
- None
5742057438
type: string
5742157439
x-enum-varnames:
5742257440
- PYPI
@@ -57426,10 +57444,15 @@ components:
5742657444
- RUBY_GEMS
5742757445
- GO
5742857446
- PACKAGIST
57429-
- D_DEB
57447+
- DEB
5743057448
- RPM
5743157449
- APK
5743257450
- WINDOWS
57451+
- GENERIC
57452+
- MAC_OS
57453+
- OCI
57454+
- BOTTLE_ROCKET
57455+
- NONE
5743357456
VulnerabilityRelationships:
5743457457
description: Related entities object.
5743557458
properties:
@@ -57530,12 +57553,14 @@ components:
5753057553
- IAST
5753157554
- SCA
5753257555
- Infra
57556+
- SAST
5753357557
example: SCA
5753457558
type: string
5753557559
x-enum-varnames:
5753657560
- IAST
5753757561
- SCA
5753857562
- INFRA
57563+
- SAST
5753957564
VulnerabilityType:
5754057565
description: The vulnerability type.
5754157566
enum:
@@ -80296,6 +80321,10 @@ paths:
8029680321
summary: List assets SBOMs
8029780322
tags:
8029880323
- Security Monitoring
80324+
x-permission:
80325+
operator: OR
80326+
permissions:
80327+
- appsec_vm_read
8029980328
x-unstable: '**Note**: This endpoint is a private preview.
8030080329

8030180330
If you are interested in accessing this API, [fill out this form](https://forms.gle/kMYC1sDr6WDUBDsx9).'
@@ -80367,6 +80396,10 @@ paths:
8036780396
summary: Get SBOM
8036880397
tags:
8036980398
- Security Monitoring
80399+
x-permission:
80400+
operator: OR
80401+
permissions:
80402+
- appsec_vm_read
8037080403
x-unstable: '**Note**: This endpoint is a private preview.
8037180404

8037280405
If you are interested in accessing this API, [fill out this form](https://forms.gle/kMYC1sDr6WDUBDsx9).'
@@ -80481,6 +80514,10 @@ paths:
8048180514
summary: List scanned assets metadata
8048280515
tags:
8048380516
- Security Monitoring
80517+
x-permission:
80518+
operator: OR
80519+
permissions:
80520+
- appsec_vm_read
8048480521
x-unstable: '**Note**: This endpoint is a private preview.
8048580522

8048680523
If you are interested in accessing this API, [fill out this form](https://forms.gle/kMYC1sDr6WDUBDsx9).'
@@ -80909,6 +80946,14 @@ paths:
8090980946
required: false
8091080947
schema:
8091180948
type: string
80949+
- description: Filter for whether the vulnerability affects a running kernel
80950+
(for vulnerabilities related to a `Host` asset).
80951+
example: true
80952+
in: query
80953+
name: filter[running_kernel]
80954+
required: false
80955+
schema:
80956+
type: boolean
8091280957
- description: Filter by asset name. This field supports the usage of wildcards
8091380958
(*).
8091480959
example: datadog-agent
@@ -81052,6 +81097,10 @@ paths:
8105281097
summary: List vulnerabilities
8105381098
tags:
8105481099
- Security Monitoring
81100+
x-permission:
81101+
operator: OR
81102+
permissions:
81103+
- appsec_vm_read
8105581104
x-unstable: '**Note**: This endpoint is a private preview.
8105681105

8105781106
If you are interested in accessing this API, [fill out this form](https://forms.gle/kMYC1sDr6WDUBDsx9).'
@@ -81410,6 +81459,10 @@ paths:
8141081459
summary: List vulnerable assets
8141181460
tags:
8141281461
- Security Monitoring
81462+
x-permission:
81463+
operator: OR
81464+
permissions:
81465+
- appsec_vm_read
8141381466
x-unstable: '**Note**: This endpoint is a private preview.
8141481467

8141581468
If you are interested in accessing this API, [fill out this form](https://forms.gle/kMYC1sDr6WDUBDsx9).'
@@ -84547,8 +84600,8 @@ paths:
8454784600
x-unstable: '**Note**: This endpoint may be subject to changes.'
8454884601
/api/v2/static-analysis/secrets/rules:
8454984602
get:
84550-
description: Returns list of Secrets rules with ID, Pattern, Description, Priority,
84551-
and SDS ID
84603+
description: Returns a list of Secrets rules with ID, Pattern, Description,
84604+
Priority, and SDS ID.
8455284605
operationId: GetSecretsRules
8455384606
responses:
8455484607
'200':
@@ -84564,7 +84617,7 @@ paths:
8456484617
appKeyAuth: []
8456584618
- AuthZ:
8456684619
- code_analysis_read
84567-
summary: Returns list of Secrets rules
84620+
summary: Returns a list of Secrets rules
8456884621
tags:
8456984622
- Security Monitoring
8457084623
x-unstable: '**Note**: This endpoint may be subject to changes.'

api/datadogV2/api_security_monitoring.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2560,8 +2560,8 @@ func (a *SecurityMonitoringApi) GetSBOM(ctx _context.Context, assetType AssetTyp
25602560
return localVarReturnValue, localVarHTTPResponse, nil
25612561
}
25622562

2563-
// GetSecretsRules Returns list of Secrets rules.
2564-
// Returns list of Secrets rules with ID, Pattern, Description, Priority, and SDS ID
2563+
// GetSecretsRules Returns a list of Secrets rules.
2564+
// Returns a list of Secrets rules with ID, Pattern, Description, Priority, and SDS ID.
25652565
func (a *SecurityMonitoringApi) GetSecretsRules(ctx _context.Context) (SecretRuleArray, *_nethttp.Response, error) {
25662566
var (
25672567
localVarHTTPMethod = _nethttp.MethodGet
@@ -5490,6 +5490,7 @@ type ListVulnerabilitiesOptionalParameters struct {
54905490
FilterFixAvailable *bool
54915491
FilterRepoDigests *string
54925492
FilterOrigin *string
5493+
FilterRunningKernel *bool
54935494
FilterAssetName *string
54945495
FilterAssetType *AssetType
54955496
FilterAssetVersionFirst *string
@@ -5675,6 +5676,12 @@ func (r *ListVulnerabilitiesOptionalParameters) WithFilterOrigin(filterOrigin st
56755676
return r
56765677
}
56775678

5679+
// WithFilterRunningKernel sets the corresponding parameter name and returns the struct.
5680+
func (r *ListVulnerabilitiesOptionalParameters) WithFilterRunningKernel(filterRunningKernel bool) *ListVulnerabilitiesOptionalParameters {
5681+
r.FilterRunningKernel = &filterRunningKernel
5682+
return r
5683+
}
5684+
56785685
// WithFilterAssetName sets the corresponding parameter name and returns the struct.
56795686
func (r *ListVulnerabilitiesOptionalParameters) WithFilterAssetName(filterAssetName string) *ListVulnerabilitiesOptionalParameters {
56805687
r.FilterAssetName = &filterAssetName
@@ -5973,6 +5980,9 @@ func (a *SecurityMonitoringApi) ListVulnerabilities(ctx _context.Context, o ...L
59735980
if optionalParams.FilterOrigin != nil {
59745981
localVarQueryParams.Add("filter[origin]", datadog.ParameterToString(*optionalParams.FilterOrigin, ""))
59755982
}
5983+
if optionalParams.FilterRunningKernel != nil {
5984+
localVarQueryParams.Add("filter[running_kernel]", datadog.ParameterToString(*optionalParams.FilterRunningKernel, ""))
5985+
}
59765986
if optionalParams.FilterAssetName != nil {
59775987
localVarQueryParams.Add("filter[asset.name]", datadog.ParameterToString(*optionalParams.FilterAssetName, ""))
59785988
}

api/datadogV2/model_library.go

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import (
1212

1313
// Library Vulnerability library.
1414
type Library struct {
15+
// Related library or package names (such as child packages or affected binary paths).
16+
AdditionalNames []string `json:"additional_names,omitempty"`
1517
// Vulnerability library name.
1618
Name string `json:"name"`
1719
// Vulnerability library version.
@@ -39,6 +41,34 @@ func NewLibraryWithDefaults() *Library {
3941
return &this
4042
}
4143

44+
// GetAdditionalNames returns the AdditionalNames field value if set, zero value otherwise.
45+
func (o *Library) GetAdditionalNames() []string {
46+
if o == nil || o.AdditionalNames == nil {
47+
var ret []string
48+
return ret
49+
}
50+
return o.AdditionalNames
51+
}
52+
53+
// GetAdditionalNamesOk returns a tuple with the AdditionalNames field value if set, nil otherwise
54+
// and a boolean to check if the value has been set.
55+
func (o *Library) GetAdditionalNamesOk() (*[]string, bool) {
56+
if o == nil || o.AdditionalNames == nil {
57+
return nil, false
58+
}
59+
return &o.AdditionalNames, true
60+
}
61+
62+
// HasAdditionalNames returns a boolean if a field has been set.
63+
func (o *Library) HasAdditionalNames() bool {
64+
return o != nil && o.AdditionalNames != nil
65+
}
66+
67+
// SetAdditionalNames gets a reference to the given []string and assigns it to the AdditionalNames field.
68+
func (o *Library) SetAdditionalNames(v []string) {
69+
o.AdditionalNames = v
70+
}
71+
4272
// GetName returns the Name field value.
4373
func (o *Library) GetName() string {
4474
if o == nil {
@@ -96,6 +126,9 @@ func (o Library) MarshalJSON() ([]byte, error) {
96126
if o.UnparsedObject != nil {
97127
return datadog.Marshal(o.UnparsedObject)
98128
}
129+
if o.AdditionalNames != nil {
130+
toSerialize["additional_names"] = o.AdditionalNames
131+
}
99132
toSerialize["name"] = o.Name
100133
if o.Version != nil {
101134
toSerialize["version"] = o.Version
@@ -110,8 +143,9 @@ func (o Library) MarshalJSON() ([]byte, error) {
110143
// UnmarshalJSON deserializes the given payload.
111144
func (o *Library) UnmarshalJSON(bytes []byte) (err error) {
112145
all := struct {
113-
Name *string `json:"name"`
114-
Version *string `json:"version,omitempty"`
146+
AdditionalNames []string `json:"additional_names,omitempty"`
147+
Name *string `json:"name"`
148+
Version *string `json:"version,omitempty"`
115149
}{}
116150
if err = datadog.Unmarshal(bytes, &all); err != nil {
117151
return datadog.Unmarshal(bytes, &o.UnparsedObject)
@@ -121,10 +155,11 @@ func (o *Library) UnmarshalJSON(bytes []byte) (err error) {
121155
}
122156
additionalProperties := make(map[string]interface{})
123157
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
124-
datadog.DeleteKeys(additionalProperties, &[]string{"name", "version"})
158+
datadog.DeleteKeys(additionalProperties, &[]string{"additional_names", "name", "version"})
125159
} else {
126160
return err
127161
}
162+
o.AdditionalNames = all.AdditionalNames
128163
o.Name = *all.Name
129164
o.Version = all.Version
130165

api/datadogV2/model_vulnerability_attributes.go

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ type VulnerabilityAttributes struct {
4848
RepoDigests []string `json:"repo_digests,omitempty"`
4949
// Vulnerability risks.
5050
Risks VulnerabilityRisks `json:"risks"`
51+
// True if the vulnerability affects a package in the host’s running kernel, false if it affects a non-running kernel, and omit if it is not kernel-related.
52+
RunningKernel *bool `json:"running_kernel,omitempty"`
5153
// The vulnerability status.
5254
Status VulnerabilityStatus `json:"status"`
5355
// Vulnerability title.
@@ -542,6 +544,34 @@ func (o *VulnerabilityAttributes) SetRisks(v VulnerabilityRisks) {
542544
o.Risks = v
543545
}
544546

547+
// GetRunningKernel returns the RunningKernel field value if set, zero value otherwise.
548+
func (o *VulnerabilityAttributes) GetRunningKernel() bool {
549+
if o == nil || o.RunningKernel == nil {
550+
var ret bool
551+
return ret
552+
}
553+
return *o.RunningKernel
554+
}
555+
556+
// GetRunningKernelOk returns a tuple with the RunningKernel field value if set, nil otherwise
557+
// and a boolean to check if the value has been set.
558+
func (o *VulnerabilityAttributes) GetRunningKernelOk() (*bool, bool) {
559+
if o == nil || o.RunningKernel == nil {
560+
return nil, false
561+
}
562+
return o.RunningKernel, true
563+
}
564+
565+
// HasRunningKernel returns a boolean if a field has been set.
566+
func (o *VulnerabilityAttributes) HasRunningKernel() bool {
567+
return o != nil && o.RunningKernel != nil
568+
}
569+
570+
// SetRunningKernel gets a reference to the given bool and assigns it to the RunningKernel field.
571+
func (o *VulnerabilityAttributes) SetRunningKernel(v bool) {
572+
o.RunningKernel = &v
573+
}
574+
545575
// GetStatus returns the Status field value.
546576
func (o *VulnerabilityAttributes) GetStatus() VulnerabilityStatus {
547577
if o == nil {
@@ -672,6 +702,9 @@ func (o VulnerabilityAttributes) MarshalJSON() ([]byte, error) {
672702
toSerialize["repo_digests"] = o.RepoDigests
673703
}
674704
toSerialize["risks"] = o.Risks
705+
if o.RunningKernel != nil {
706+
toSerialize["running_kernel"] = o.RunningKernel
707+
}
675708
toSerialize["status"] = o.Status
676709
toSerialize["title"] = o.Title
677710
toSerialize["tool"] = o.Tool
@@ -704,6 +737,7 @@ func (o *VulnerabilityAttributes) UnmarshalJSON(bytes []byte) (err error) {
704737
Remediations *[]Remediation `json:"remediations"`
705738
RepoDigests []string `json:"repo_digests,omitempty"`
706739
Risks *VulnerabilityRisks `json:"risks"`
740+
RunningKernel *bool `json:"running_kernel,omitempty"`
707741
Status *VulnerabilityStatus `json:"status"`
708742
Title *string `json:"title"`
709743
Tool *VulnerabilityTool `json:"tool"`
@@ -759,7 +793,7 @@ func (o *VulnerabilityAttributes) UnmarshalJSON(bytes []byte) (err error) {
759793
}
760794
additionalProperties := make(map[string]interface{})
761795
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
762-
datadog.DeleteKeys(additionalProperties, &[]string{"advisory", "advisory_id", "code_location", "cve_list", "cvss", "dependency_locations", "description", "ecosystem", "exposure_time", "first_detection", "fix_available", "language", "last_detection", "library", "origin", "remediations", "repo_digests", "risks", "status", "title", "tool", "type"})
796+
datadog.DeleteKeys(additionalProperties, &[]string{"advisory", "advisory_id", "code_location", "cve_list", "cvss", "dependency_locations", "description", "ecosystem", "exposure_time", "first_detection", "fix_available", "language", "last_detection", "library", "origin", "remediations", "repo_digests", "risks", "running_kernel", "status", "title", "tool", "type"})
763797
} else {
764798
return err
765799
}
@@ -805,6 +839,7 @@ func (o *VulnerabilityAttributes) UnmarshalJSON(bytes []byte) (err error) {
805839
hasInvalidField = true
806840
}
807841
o.Risks = *all.Risks
842+
o.RunningKernel = all.RunningKernel
808843
if !all.Status.IsValid() {
809844
hasInvalidField = true
810845
} else {

0 commit comments

Comments
 (0)