Skip to content

Commit 3db8fce

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Extended List Findings API to expose resource related Private IP Addresses to details (#817)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent e9550ec commit 3db8fce

File tree

5 files changed

+60
-8
lines changed

5 files changed

+60
-8
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "df31e44",
3-
"generated": "2025-07-28 19:59:31.744"
2+
"spec_repo_commit": "dcf594e",
3+
"generated": "2025-07-31 10:00:30.229"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56012,12 +56012,13 @@ paths:
5601256012
following fields are available for findings:\n- `external_id`: The resource
5601356013
external ID related to the finding.\n- `description`: The description and
5601456014
remediation steps for the finding.\n- `datadog_link`: The Datadog relative
56015-
link for the finding.\n\n### Response\n\nThe response includes an array of
56016-
finding objects, pagination metadata, and a count of items that match the
56017-
query.\n\nEach finding object contains the following:\n\n- The finding ID
56018-
that can be used in a `GetFinding` request to retrieve the full finding details.\n-
56019-
Core attributes, including status, evaluation, high-level resource details,
56020-
muted state, and rule details.\n- `evaluation_changed_at` and `resource_discovery_date`
56015+
link for the finding.\n- `ip_addresses`: The list of private IP addresses
56016+
for the resource related to the finding.\n\n### Response\n\nThe response includes
56017+
an array of finding objects, pagination metadata, and a count of items that
56018+
match the query.\n\nEach finding object contains the following:\n\n- The finding
56019+
ID that can be used in a `GetFinding` request to retrieve the full finding
56020+
details.\n- Core attributes, including status, evaluation, high-level resource
56021+
details, muted state, and rule details.\n- `evaluation_changed_at` and `resource_discovery_date`
5602156022
time stamps.\n- An array of associated tags.\n"
5602256023
operationId: ListFindings
5602356024
parameters:
@@ -56088,6 +56089,12 @@ paths:
5608856089
required: false
5608956090
schema:
5609056091
type: string
56092+
- description: Return only findings for the specified resource id.
56093+
in: query
56094+
name: filter[@resource_id]
56095+
required: false
56096+
schema:
56097+
type: string
5609156098
- description: Return findings that were found on a specified date (Unix ms)
5609256099
or date range (using comparison operators).
5609356100
example: '>=1678721573794'

LICENSE-3rdparty.csv

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ android-tzdata,https://github.com/RumovZ/android-tzdata,MIT OR Apache-2.0,RumovZ
55
android_system_properties,https://github.com/nical/android_system_properties,MIT OR Apache-2.0,Nicolas Silva <[email protected]>
66
anyhow,https://github.com/dtolnay/anyhow,MIT OR Apache-2.0,David Tolnay <[email protected]>
77
async-stream,https://github.com/tokio-rs/async-stream,MIT,Carl Lerche <[email protected]>
8+
async-stream-impl,https://github.com/tokio-rs/async-stream,MIT,Carl Lerche <[email protected]>
89
async-trait,https://github.com/dtolnay/async-trait,MIT OR Apache-2.0,David Tolnay <[email protected]>
910
backtrace,https://github.com/rust-lang/backtrace-rs,MIT OR Apache-2.0,The Rust Project Developers
1011
base64,https://github.com/marshallpierce/rust-base64,MIT OR Apache-2.0,"Alice Maz <[email protected]>, Marshall Pierce <[email protected]>"
@@ -15,8 +16,11 @@ bytes,https://github.com/tokio-rs/bytes,MIT,"Carl Lerche <[email protected]>, Se
1516
cfg-if,https://github.com/rust-lang/cfg-if,MIT OR Apache-2.0,Alex Crichton <[email protected]>
1617
chrono,https://github.com/chronotope/chrono,MIT OR Apache-2.0,The chrono Authors
1718
core-foundation,https://github.com/servo/core-foundation-rs,MIT OR Apache-2.0,The Servo Project Developers
19+
core-foundation-sys,https://github.com/servo/core-foundation-rs,MIT OR Apache-2.0,The Servo Project Developers
1820
crc32fast,https://github.com/srijs/rust-crc32fast,MIT OR Apache-2.0,"Sam Rijs <[email protected]>, Alex Crichton <[email protected]>"
1921
darling,https://github.com/TedDriggs/darling,MIT,Ted Driggs <[email protected]>
22+
darling_core,https://github.com/TedDriggs/darling,MIT,Ted Driggs <[email protected]>
23+
darling_macro,https://github.com/TedDriggs/darling,MIT,Ted Driggs <[email protected]>
2024
deranged,https://github.com/jhpratt/deranged,MIT OR Apache-2.0,Jacob Pratt <[email protected]>
2125
displaydoc,https://github.com/yaahc/displaydoc,MIT OR Apache-2.0,Jane Lusby <[email protected]>
2226
dyn-clone,https://github.com/dtolnay/dyn-clone,MIT OR Apache-2.0,David Tolnay <[email protected]>
@@ -27,7 +31,9 @@ fastrand,https://github.com/smol-rs/fastrand,Apache-2.0 OR MIT,Stjepan Glavina <
2731
flate2,https://github.com/rust-lang/flate2-rs,MIT OR Apache-2.0,"Alex Crichton <[email protected]>, Josh Triplett <[email protected]>"
2832
fnv,https://github.com/servo/rust-fnv,Apache-2.0 OR MIT,Alex Crichton <[email protected]>
2933
foreign-types,https://github.com/sfackler/foreign-types,MIT OR Apache-2.0,Steven Fackler <[email protected]>
34+
foreign-types-shared,https://github.com/sfackler/foreign-types,MIT OR Apache-2.0,Steven Fackler <[email protected]>
3035
form-data-builder,https://github.com/iliana/form-data-builder,MIT-0,The form-data-builder Authors
36+
form_urlencoded,https://github.com/servo/rust-url,MIT OR Apache-2.0,The rust-url developers
3137
futures,https://github.com/rust-lang/futures-rs,MIT OR Apache-2.0,The futures Authors
3238
futures-channel,https://github.com/rust-lang/futures-rs,MIT OR Apache-2.0,The futures-channel Authors
3339
futures-core,https://github.com/rust-lang/futures-rs,MIT OR Apache-2.0,The futures-core Authors
@@ -58,6 +64,7 @@ icu_properties,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Projec
5864
icu_properties_data,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers
5965
icu_provider,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers
6066
ident_case,https://github.com/TedDriggs/ident_case,MIT OR Apache-2.0,Ted Driggs <[email protected]>
67+
idna,https://github.com/servo/rust-url,MIT OR Apache-2.0,The rust-url developers
6168
idna_adapter,https://github.com/hsivonen/idna_adapter,Apache-2.0 OR MIT,The rust-url developers
6269
indexmap,https://github.com/bluss/indexmap,Apache-2.0 OR MIT,The indexmap Authors
6370
indexmap,https://github.com/indexmap-rs/indexmap,Apache-2.0 OR MIT,The indexmap Authors
@@ -87,6 +94,8 @@ openssl-macros,https://github.com/sfackler/rust-openssl,MIT OR Apache-2.0,The op
8794
openssl-probe,https://github.com/alexcrichton/openssl-probe,MIT OR Apache-2.0,Alex Crichton <[email protected]>
8895
openssl-sys,https://github.com/sfackler/rust-openssl,MIT,"Alex Crichton <[email protected]>, Steven Fackler <[email protected]>"
8996
parking_lot,https://github.com/Amanieu/parking_lot,Apache-2.0 OR MIT,Amanieu d'Antras <[email protected]>
97+
parking_lot_core,https://github.com/Amanieu/parking_lot,Apache-2.0 OR MIT,Amanieu d'Antras <[email protected]>
98+
percent-encoding,https://github.com/servo/rust-url,MIT OR Apache-2.0,The rust-url developers
9099
pin-project-lite,https://github.com/taiki-e/pin-project-lite,Apache-2.0 OR MIT,The pin-project-lite Authors
91100
pin-utils,https://github.com/rust-lang-nursery/pin-utils,MIT OR Apache-2.0,Josef Brandl <[email protected]>
92101
potential_utf,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers
@@ -97,10 +106,13 @@ quote,https://github.com/dtolnay/quote,MIT OR Apache-2.0,David Tolnay <dtolnay@g
97106
r-efi,https://github.com/r-efi/r-efi,MIT OR Apache-2.0 OR LGPL-2.1-or-later,The r-efi Authors
98107
rand,https://github.com/rust-random/rand,MIT OR Apache-2.0,"The Rand Project Developers, The Rust Project Developers"
99108
rand_chacha,https://github.com/rust-random/rand,MIT OR Apache-2.0,"The Rand Project Developers, The Rust Project Developers, The CryptoCorrosion Contributors"
109+
rand_core,https://github.com/rust-random/rand,MIT OR Apache-2.0,"The Rand Project Developers, The Rust Project Developers"
100110
redox_syscall,https://gitlab.redox-os.org/redox-os/syscall,MIT,Jeremy Soller <[email protected]>
101111
ref-cast,https://github.com/dtolnay/ref-cast,MIT OR Apache-2.0,David Tolnay <[email protected]>
112+
ref-cast-impl,https://github.com/dtolnay/ref-cast,MIT OR Apache-2.0,David Tolnay <[email protected]>
102113
reqwest,https://github.com/seanmonstar/reqwest,MIT OR Apache-2.0,Sean McArthur <[email protected]>
103114
reqwest-middleware,https://github.com/TrueLayer/reqwest-middleware,MIT OR Apache-2.0,Rodrigo Gryzinski <[email protected]>
115+
reqwest-retry,https://github.com/TrueLayer/reqwest-middleware,MIT OR Apache-2.0,Rodrigo Gryzinski <[email protected]>
104116
retry-policies,https://github.com/TrueLayer/retry-policies,MIT OR Apache-2.0,Luca Palmieri <[email protected]>
105117
rustc-demangle,https://github.com/rust-lang/rustc-demangle,MIT OR Apache-2.0,Alex Crichton <[email protected]>
106118
rustix,https://github.com/bytecodealliance/rustix,Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT,"Dan Gohman <[email protected]>, Jakub Konka <[email protected]>"
@@ -111,7 +123,9 @@ schannel,https://github.com/steffengy/schannel-rs,MIT,"Steven Fackler <sfackler@
111123
schemars,https://github.com/GREsau/schemars,MIT,Graham Esau <[email protected]>
112124
scopeguard,https://github.com/bluss/scopeguard,MIT OR Apache-2.0,bluss
113125
security-framework,https://github.com/kornelski/rust-security-framework,MIT OR Apache-2.0,"Steven Fackler <[email protected]>, Kornel <[email protected]>"
126+
security-framework-sys,https://github.com/kornelski/rust-security-framework,MIT OR Apache-2.0,"Steven Fackler <[email protected]>, Kornel <[email protected]>"
114127
serde,https://github.com/serde-rs/serde,MIT OR Apache-2.0,"Erick Tryzelaar <[email protected]>, David Tolnay <[email protected]>"
128+
serde_derive,https://github.com/serde-rs/serde,MIT OR Apache-2.0,"Erick Tryzelaar <[email protected]>, David Tolnay <[email protected]>"
115129
serde_json,https://github.com/serde-rs/json,MIT OR Apache-2.0,"Erick Tryzelaar <[email protected]>, David Tolnay <[email protected]>"
116130
serde_urlencoded,https://github.com/nox/serde_urlencoded,MIT OR Apache-2.0,Anthony Ramine <[email protected]>
117131
serde_with,https://github.com/jonasbb/serde_with,MIT OR Apache-2.0,"Jonas Bushart, Marcin Kaźmierczak"
@@ -125,13 +139,19 @@ syn,https://github.com/dtolnay/syn,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail
125139
sync_wrapper,https://github.com/Actyx/sync_wrapper,Apache-2.0,Actyx AG <[email protected]>
126140
synstructure,https://github.com/mystor/synstructure,MIT,Nika Layzell <[email protected]>
127141
system-configuration,https://github.com/mullvad/system-configuration-rs,MIT OR Apache-2.0,Mullvad VPN
142+
system-configuration-sys,https://github.com/mullvad/system-configuration-rs,MIT OR Apache-2.0,Mullvad VPN
128143
task-local-extensions,https://github.com/TrueLayer/task-local-extensions,MIT OR Apache-2.0,"Conrad Ludgate <[email protected]>, Rodrigo Gryzinski <[email protected]>"
129144
tempfile,https://github.com/Stebalien/tempfile,MIT OR Apache-2.0,"Steven Allen <[email protected]>, The Rust Project Developers, Ashley Mannix <[email protected]>, Jason White <[email protected]>"
130145
thiserror,https://github.com/dtolnay/thiserror,MIT OR Apache-2.0,David Tolnay <[email protected]>
146+
thiserror-impl,https://github.com/dtolnay/thiserror,MIT OR Apache-2.0,David Tolnay <[email protected]>
131147
time,https://github.com/time-rs/time,MIT OR Apache-2.0,"Jacob Pratt <[email protected]>, Time contributors"
148+
time-core,https://github.com/time-rs/time,MIT OR Apache-2.0,"Jacob Pratt <[email protected]>, Time contributors"
149+
time-macros,https://github.com/time-rs/time,MIT OR Apache-2.0,"Jacob Pratt <[email protected]>, Time contributors"
132150
tinystr,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers
133151
tokio,https://github.com/tokio-rs/tokio,MIT,Tokio Contributors <[email protected]>
152+
tokio-macros,https://github.com/tokio-rs/tokio,MIT,Tokio Contributors <[email protected]>
134153
tokio-native-tls,https://github.com/tokio-rs/tls,MIT,Tokio Contributors <[email protected]>
154+
tokio-util,https://github.com/tokio-rs/tokio,MIT,Tokio Contributors <[email protected]>
135155
tower-service,https://github.com/tower-rs/tower,MIT,Tower Maintainers <[email protected]>
136156
tracing,https://github.com/tokio-rs/tracing,MIT,"Eliza Weisman <[email protected]>, Tokio Contributors <[email protected]>"
137157
tracing-attributes,https://github.com/tokio-rs/tracing,MIT,"Tokio Contributors <[email protected]>, Eliza Weisman <[email protected]>, David Barsky <[email protected]>"
@@ -155,6 +175,8 @@ wasm-bindgen-shared,https://github.com/rustwasm/wasm-bindgen/tree/master/crates/
155175
wasm-timer,https://github.com/tomaka/wasm-timer,MIT,Pierre Krieger <[email protected]>
156176
web-sys,https://github.com/rustwasm/wasm-bindgen/tree/master/crates/web-sys,MIT OR Apache-2.0,The wasm-bindgen Developers
157177
winapi,https://github.com/retep998/winapi-rs,MIT OR Apache-2.0,Peter Atashian <[email protected]>
178+
winapi-i686-pc-windows-gnu,https://github.com/retep998/winapi-rs,MIT OR Apache-2.0,Peter Atashian <[email protected]>
179+
winapi-x86_64-pc-windows-gnu,https://github.com/retep998/winapi-rs,MIT OR Apache-2.0,Peter Atashian <[email protected]>
158180
windows-core,https://github.com/microsoft/windows-rs,MIT OR Apache-2.0,Microsoft
159181
windows-implement,https://github.com/microsoft/windows-rs,MIT OR Apache-2.0,Microsoft
160182
windows-interface,https://github.com/microsoft/windows-rs,MIT OR Apache-2.0,Microsoft
@@ -177,6 +199,7 @@ writeable,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Dev
177199
yoke,https://github.com/unicode-org/icu4x,Unicode-3.0,Manish Goregaokar <[email protected]>
178200
yoke-derive,https://github.com/unicode-org/icu4x,Unicode-3.0,Manish Goregaokar <[email protected]>
179201
zerocopy,https://github.com/google/zerocopy,BSD-2-Clause OR Apache-2.0 OR MIT,"Joshua Liebow-Feeser <[email protected]>, Jack Wrenn <[email protected]>"
202+
zerocopy-derive,https://github.com/google/zerocopy,BSD-2-Clause OR Apache-2.0 OR MIT,"Joshua Liebow-Feeser <[email protected]>, Jack Wrenn <[email protected]>"
180203
zerofrom,https://github.com/unicode-org/icu4x,Unicode-3.0,Manish Goregaokar <[email protected]>
181204
zerofrom-derive,https://github.com/unicode-org/icu4x,Unicode-3.0,Manish Goregaokar <[email protected]>
182205
zerotrie,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers

src/datadogV2/api/api_security_monitoring.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ pub struct ListFindingsOptionalParams {
188188
pub filter_rule_name: Option<String>,
189189
/// Return only findings for the specified resource type.
190190
pub filter_resource_type: Option<String>,
191+
/// Return only findings for the specified resource id.
192+
pub filter_resource_id: Option<String>,
191193
/// Return findings that were found on a specified date (Unix ms) or date range (using comparison operators).
192194
pub filter_discovery_timestamp: Option<String>,
193195
/// Return only `pass` or `fail` findings.
@@ -246,6 +248,11 @@ impl ListFindingsOptionalParams {
246248
self.filter_resource_type = Some(value);
247249
self
248250
}
251+
/// Return only findings for the specified resource id.
252+
pub fn filter_resource_id(mut self, value: String) -> Self {
253+
self.filter_resource_id = Some(value);
254+
self
255+
}
249256
/// Return findings that were found on a specified date (Unix ms) or date range (using comparison operators).
250257
pub fn filter_discovery_timestamp(mut self, value: String) -> Self {
251258
self.filter_discovery_timestamp = Some(value);
@@ -5838,6 +5845,7 @@ impl SecurityMonitoringAPI {
58385845
/// - `external_id`: The resource external ID related to the finding.
58395846
/// - `description`: The description and remediation steps for the finding.
58405847
/// - `datadog_link`: The Datadog relative link for the finding.
5848+
/// - `ip_addresses`: The list of private IP addresses for the resource related to the finding.
58415849
///
58425850
/// ### Response
58435851
///
@@ -5934,6 +5942,7 @@ impl SecurityMonitoringAPI {
59345942
/// - `external_id`: The resource external ID related to the finding.
59355943
/// - `description`: The description and remediation steps for the finding.
59365944
/// - `datadog_link`: The Datadog relative link for the finding.
5945+
/// - `ip_addresses`: The list of private IP addresses for the resource related to the finding.
59375946
///
59385947
/// ### Response
59395948
///
@@ -5974,6 +5983,7 @@ impl SecurityMonitoringAPI {
59745983
let filter_rule_id = params.filter_rule_id;
59755984
let filter_rule_name = params.filter_rule_name;
59765985
let filter_resource_type = params.filter_resource_type;
5986+
let filter_resource_id = params.filter_resource_id;
59775987
let filter_discovery_timestamp = params.filter_discovery_timestamp;
59785988
let filter_evaluation = params.filter_evaluation;
59795989
let filter_status = params.filter_status;
@@ -6027,6 +6037,10 @@ impl SecurityMonitoringAPI {
60276037
local_req_builder = local_req_builder
60286038
.query(&[("filter[resource_type]", &local_query_param.to_string())]);
60296039
};
6040+
if let Some(ref local_query_param) = filter_resource_id {
6041+
local_req_builder = local_req_builder
6042+
.query(&[("filter[@resource_id]", &local_query_param.to_string())]);
6043+
};
60306044
if let Some(ref local_query_param) = filter_discovery_timestamp {
60316045
local_req_builder = local_req_builder.query(&[(
60326046
"filter[discovery_timestamp]",

tests/scenarios/function_mappings.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14503,6 +14503,9 @@ fn test_v2_list_findings(world: &mut DatadogWorld, _parameters: &HashMap<String,
1450314503
let filter_resource_type = _parameters
1450414504
.get("filter[resource_type]")
1450514505
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
14506+
let filter_resource_id = _parameters
14507+
.get("filter[@resource_id]")
14508+
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
1450614509
let filter_discovery_timestamp = _parameters
1450714510
.get("filter[discovery_timestamp]")
1450814511
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
@@ -14528,6 +14531,7 @@ fn test_v2_list_findings(world: &mut DatadogWorld, _parameters: &HashMap<String,
1452814531
params.filter_rule_id = filter_rule_id;
1452914532
params.filter_rule_name = filter_rule_name;
1453014533
params.filter_resource_type = filter_resource_type;
14534+
params.filter_resource_id = filter_resource_id;
1453114535
params.filter_discovery_timestamp = filter_discovery_timestamp;
1453214536
params.filter_evaluation = filter_evaluation;
1453314537
params.filter_status = filter_status;
@@ -14586,6 +14590,9 @@ fn test_v2_list_findings_with_pagination(
1458614590
let filter_resource_type = _parameters
1458714591
.get("filter[resource_type]")
1458814592
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
14593+
let filter_resource_id = _parameters
14594+
.get("filter[@resource_id]")
14595+
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
1458914596
let filter_discovery_timestamp = _parameters
1459014597
.get("filter[discovery_timestamp]")
1459114598
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
@@ -14611,6 +14618,7 @@ fn test_v2_list_findings_with_pagination(
1461114618
params.filter_rule_id = filter_rule_id;
1461214619
params.filter_rule_name = filter_rule_name;
1461314620
params.filter_resource_type = filter_resource_type;
14621+
params.filter_resource_id = filter_resource_id;
1461414622
params.filter_discovery_timestamp = filter_discovery_timestamp;
1461514623
params.filter_evaluation = filter_evaluation;
1461614624
params.filter_status = filter_status;

0 commit comments

Comments
 (0)