Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Commit 14102d9

Browse files
feat(v1): Add OS inventory item (#147)
* feat: Update OSConfig API PiperOrigin-RevId: 409204961 Source-Link: googleapis/googleapis@a85beae Source-Link: https://github.com/googleapis/googleapis-gen/commit/b334c5d7b45f4af1133af971789048299b66dc39 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjMzNGM1ZDdiNDVmNGFmMTEzM2FmOTcxNzg5MDQ4Mjk5YjY2ZGMzOSJ9 * 🦉 Updates from OwlBot 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 2c953c9 commit 14102d9

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

google/cloud/osconfig_v1/types/vulnerability.py

+39
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ class Vulnerability(proto.Message):
8080
update_time (google.protobuf.timestamp_pb2.Timestamp):
8181
The timestamp for when the vulnerability was
8282
last modified.
83+
items (Sequence[google.cloud.osconfig_v1.types.VulnerabilityReport.Vulnerability.Item]):
84+
List of items affected by the vulnerability.
8385
"""
8486

8587
class Details(proto.Message):
@@ -136,6 +138,40 @@ class Reference(proto.Message):
136138
message="VulnerabilityReport.Vulnerability.Details.Reference",
137139
)
138140

141+
class Item(proto.Message):
142+
r"""OS inventory item that is affected by a vulnerability or
143+
fixed as a result of a vulnerability.
144+
145+
Attributes:
146+
installed_inventory_item_id (str):
147+
Corresponds to the ``INSTALLED_PACKAGE`` inventory item on
148+
the VM. This field displays the inventory items affected by
149+
this vulnerability. If the vulnerability report was not
150+
updated after the VM inventory update, these values might
151+
not display in VM inventory. For some operating systems,
152+
this field might be empty.
153+
available_inventory_item_id (str):
154+
Corresponds to the ``AVAILABLE_PACKAGE`` inventory item on
155+
the VM. If the vulnerability report was not updated after
156+
the VM inventory update, these values might not display in
157+
VM inventory. If there is no available fix, the field is
158+
empty. The ``inventory_item`` value specifies the latest
159+
``SoftwarePackage`` available to the VM that fixes the
160+
vulnerability.
161+
fixed_cpe_uri (str):
162+
The recommended `CPE
163+
URI <https://cpe.mitre.org/specification/>`__ update that
164+
contains a fix for this vulnerability.
165+
upstream_fix (str):
166+
The upstream OS patch, packages or KB that
167+
fixes the vulnerability.
168+
"""
169+
170+
installed_inventory_item_id = proto.Field(proto.STRING, number=1,)
171+
available_inventory_item_id = proto.Field(proto.STRING, number=2,)
172+
fixed_cpe_uri = proto.Field(proto.STRING, number=3,)
173+
upstream_fix = proto.Field(proto.STRING, number=4,)
174+
139175
details = proto.Field(
140176
proto.MESSAGE,
141177
number=1,
@@ -149,6 +185,9 @@ class Reference(proto.Message):
149185
update_time = proto.Field(
150186
proto.MESSAGE, number=5, message=timestamp_pb2.Timestamp,
151187
)
188+
items = proto.RepeatedField(
189+
proto.MESSAGE, number=6, message="VulnerabilityReport.Vulnerability.Item",
190+
)
152191

153192
name = proto.Field(proto.STRING, number=1,)
154193
vulnerabilities = proto.RepeatedField(

0 commit comments

Comments
 (0)