Skip to content

Commit c063a4e

Browse files
feat: Added parent display name i.e. source display name for a finding as one of the finding attributes (#390)
* feat: Added parent display name i.e. source display name for a finding as one of the finding attributes PiperOrigin-RevId: 474319054 Source-Link: googleapis/googleapis@862f99f Source-Link: googleapis/googleapis-gen@bfc3497 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmZjMzQ5NzFlMWQxNmIxNzlmZmFiOGNiNjc3OWJjNjRmNzM3OGMwOSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 4fef1a8 commit c063a4e

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/finding.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class Finding(proto.Message):
162162
Represents operating system processes
163163
associated with the Finding.
164164
contacts (Mapping[str, google.cloud.securitycenter_v1.types.ContactDetails]):
165-
Output only. Map containing the point of contacts for the
165+
Output only. Map containing the points of contact for the
166166
given finding. The key represents the type of contact, while
167167
the value contains a list of all the contacts that pertain.
168168
Please refer to:
@@ -185,6 +185,10 @@ class Finding(proto.Message):
185185
compliances (Sequence[google.cloud.securitycenter_v1.types.Compliance]):
186186
Contains compliance information for security
187187
standards associated to the finding.
188+
parent_display_name (str):
189+
Output only. The human readable display name
190+
of the finding source such as "Event Threat
191+
Detection" or "Security Health Analytics".
188192
description (str):
189193
Contains more detail about the finding.
190194
exfiltration (google.cloud.securitycenter_v1.types.Exfiltration):
@@ -357,6 +361,10 @@ class FindingClass(proto.Enum):
357361
number=34,
358362
message=compliance.Compliance,
359363
)
364+
parent_display_name = proto.Field(
365+
proto.STRING,
366+
number=36,
367+
)
360368
description = proto.Field(
361369
proto.STRING,
362370
number=37,

packages/google-cloud-securitycenter/tests/unit/gapic/securitycenter_v1/test_security_center.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,6 +1260,7 @@ def test_create_finding(request_type, transport: str = "grpc"):
12601260
mute=gcs_finding.Finding.Mute.MUTED,
12611261
finding_class=gcs_finding.Finding.FindingClass.THREAT,
12621262
mute_initiator="mute_initiator_value",
1263+
parent_display_name="parent_display_name_value",
12631264
description="description_value",
12641265
next_steps="next_steps_value",
12651266
)
@@ -1283,6 +1284,7 @@ def test_create_finding(request_type, transport: str = "grpc"):
12831284
assert response.mute == gcs_finding.Finding.Mute.MUTED
12841285
assert response.finding_class == gcs_finding.Finding.FindingClass.THREAT
12851286
assert response.mute_initiator == "mute_initiator_value"
1287+
assert response.parent_display_name == "parent_display_name_value"
12861288
assert response.description == "description_value"
12871289
assert response.next_steps == "next_steps_value"
12881290

@@ -1333,6 +1335,7 @@ async def test_create_finding_async(
13331335
mute=gcs_finding.Finding.Mute.MUTED,
13341336
finding_class=gcs_finding.Finding.FindingClass.THREAT,
13351337
mute_initiator="mute_initiator_value",
1338+
parent_display_name="parent_display_name_value",
13361339
description="description_value",
13371340
next_steps="next_steps_value",
13381341
)
@@ -1357,6 +1360,7 @@ async def test_create_finding_async(
13571360
assert response.mute == gcs_finding.Finding.Mute.MUTED
13581361
assert response.finding_class == gcs_finding.Finding.FindingClass.THREAT
13591362
assert response.mute_initiator == "mute_initiator_value"
1363+
assert response.parent_display_name == "parent_display_name_value"
13601364
assert response.description == "description_value"
13611365
assert response.next_steps == "next_steps_value"
13621366

@@ -7153,6 +7157,7 @@ def test_set_finding_state(request_type, transport: str = "grpc"):
71537157
mute=finding.Finding.Mute.MUTED,
71547158
finding_class=finding.Finding.FindingClass.THREAT,
71557159
mute_initiator="mute_initiator_value",
7160+
parent_display_name="parent_display_name_value",
71567161
description="description_value",
71577162
next_steps="next_steps_value",
71587163
)
@@ -7176,6 +7181,7 @@ def test_set_finding_state(request_type, transport: str = "grpc"):
71767181
assert response.mute == finding.Finding.Mute.MUTED
71777182
assert response.finding_class == finding.Finding.FindingClass.THREAT
71787183
assert response.mute_initiator == "mute_initiator_value"
7184+
assert response.parent_display_name == "parent_display_name_value"
71797185
assert response.description == "description_value"
71807186
assert response.next_steps == "next_steps_value"
71817187

@@ -7230,6 +7236,7 @@ async def test_set_finding_state_async(
72307236
mute=finding.Finding.Mute.MUTED,
72317237
finding_class=finding.Finding.FindingClass.THREAT,
72327238
mute_initiator="mute_initiator_value",
7239+
parent_display_name="parent_display_name_value",
72337240
description="description_value",
72347241
next_steps="next_steps_value",
72357242
)
@@ -7254,6 +7261,7 @@ async def test_set_finding_state_async(
72547261
assert response.mute == finding.Finding.Mute.MUTED
72557262
assert response.finding_class == finding.Finding.FindingClass.THREAT
72567263
assert response.mute_initiator == "mute_initiator_value"
7264+
assert response.parent_display_name == "parent_display_name_value"
72577265
assert response.description == "description_value"
72587266
assert response.next_steps == "next_steps_value"
72597267

@@ -7462,6 +7470,7 @@ def test_set_mute(request_type, transport: str = "grpc"):
74627470
mute=finding.Finding.Mute.MUTED,
74637471
finding_class=finding.Finding.FindingClass.THREAT,
74647472
mute_initiator="mute_initiator_value",
7473+
parent_display_name="parent_display_name_value",
74657474
description="description_value",
74667475
next_steps="next_steps_value",
74677476
)
@@ -7485,6 +7494,7 @@ def test_set_mute(request_type, transport: str = "grpc"):
74857494
assert response.mute == finding.Finding.Mute.MUTED
74867495
assert response.finding_class == finding.Finding.FindingClass.THREAT
74877496
assert response.mute_initiator == "mute_initiator_value"
7497+
assert response.parent_display_name == "parent_display_name_value"
74887498
assert response.description == "description_value"
74897499
assert response.next_steps == "next_steps_value"
74907500

@@ -7534,6 +7544,7 @@ async def test_set_mute_async(
75347544
mute=finding.Finding.Mute.MUTED,
75357545
finding_class=finding.Finding.FindingClass.THREAT,
75367546
mute_initiator="mute_initiator_value",
7547+
parent_display_name="parent_display_name_value",
75377548
description="description_value",
75387549
next_steps="next_steps_value",
75397550
)
@@ -7558,6 +7569,7 @@ async def test_set_mute_async(
75587569
assert response.mute == finding.Finding.Mute.MUTED
75597570
assert response.finding_class == finding.Finding.FindingClass.THREAT
75607571
assert response.mute_initiator == "mute_initiator_value"
7572+
assert response.parent_display_name == "parent_display_name_value"
75617573
assert response.description == "description_value"
75627574
assert response.next_steps == "next_steps_value"
75637575

@@ -8543,6 +8555,7 @@ def test_update_finding(request_type, transport: str = "grpc"):
85438555
mute=gcs_finding.Finding.Mute.MUTED,
85448556
finding_class=gcs_finding.Finding.FindingClass.THREAT,
85458557
mute_initiator="mute_initiator_value",
8558+
parent_display_name="parent_display_name_value",
85468559
description="description_value",
85478560
next_steps="next_steps_value",
85488561
)
@@ -8566,6 +8579,7 @@ def test_update_finding(request_type, transport: str = "grpc"):
85668579
assert response.mute == gcs_finding.Finding.Mute.MUTED
85678580
assert response.finding_class == gcs_finding.Finding.FindingClass.THREAT
85688581
assert response.mute_initiator == "mute_initiator_value"
8582+
assert response.parent_display_name == "parent_display_name_value"
85698583
assert response.description == "description_value"
85708584
assert response.next_steps == "next_steps_value"
85718585

@@ -8616,6 +8630,7 @@ async def test_update_finding_async(
86168630
mute=gcs_finding.Finding.Mute.MUTED,
86178631
finding_class=gcs_finding.Finding.FindingClass.THREAT,
86188632
mute_initiator="mute_initiator_value",
8633+
parent_display_name="parent_display_name_value",
86198634
description="description_value",
86208635
next_steps="next_steps_value",
86218636
)
@@ -8640,6 +8655,7 @@ async def test_update_finding_async(
86408655
assert response.mute == gcs_finding.Finding.Mute.MUTED
86418656
assert response.finding_class == gcs_finding.Finding.FindingClass.THREAT
86428657
assert response.mute_initiator == "mute_initiator_value"
8658+
assert response.parent_display_name == "parent_display_name_value"
86438659
assert response.description == "description_value"
86448660
assert response.next_steps == "next_steps_value"
86458661

0 commit comments

Comments
 (0)