Skip to content

Commit

Permalink
feat: [google-cloud-securitycenter] Add application field to finding'…
Browse files Browse the repository at this point in the history
…s list of attributes (#12301)

- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 606675743

Source-Link:
googleapis/googleapis@8e7f6bb

Source-Link:
googleapis/googleapis-gen@e65f14e
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlY3VyaXR5Y2VudGVyLy5Pd2xCb3QueWFtbCIsImgiOiJlNjVmMTRlNDkxOTgyYTFhZWYyZWNmYzQxOTQwYjA0YjlkZTc4MDY5In0=

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Feb 14, 2024
1 parent 8b5f319 commit c26abaf
Show file tree
Hide file tree
Showing 15 changed files with 81 additions and 7 deletions.
Expand Up @@ -29,6 +29,7 @@
Geolocation,
ServiceAccountDelegationInfo,
)
from google.cloud.securitycenter_v1.types.application import Application
from google.cloud.securitycenter_v1.types.asset import Asset
from google.cloud.securitycenter_v1.types.bigquery_export import BigQueryExport
from google.cloud.securitycenter_v1.types.cloud_dlp_data_profile import (
Expand Down Expand Up @@ -149,6 +150,7 @@
"Access",
"Geolocation",
"ServiceAccountDelegationInfo",
"Application",
"Asset",
"BigQueryExport",
"CloudDlpDataProfile",
Expand Down
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.26.1" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Expand Up @@ -20,6 +20,7 @@

from .services.security_center import SecurityCenterAsyncClient, SecurityCenterClient
from .types.access import Access, Geolocation, ServiceAccountDelegationInfo
from .types.application import Application
from .types.asset import Asset
from .types.bigquery_export import BigQueryExport
from .types.cloud_dlp_data_profile import CloudDlpDataProfile
Expand Down Expand Up @@ -119,6 +120,7 @@
__all__ = (
"SecurityCenterAsyncClient",
"Access",
"Application",
"Asset",
"BigQueryExport",
"BulkMuteFindingsRequest",
Expand Down
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.26.1" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Expand Up @@ -55,6 +55,7 @@
from google.cloud.securitycenter_v1.services.security_center import pagers
from google.cloud.securitycenter_v1.types import (
access,
application,
bigquery_export,
cloud_dlp_data_profile,
cloud_dlp_inspection,
Expand Down
Expand Up @@ -59,6 +59,7 @@
from google.cloud.securitycenter_v1.services.security_center import pagers
from google.cloud.securitycenter_v1.types import (
access,
application,
bigquery_export,
cloud_dlp_data_profile,
cloud_dlp_inspection,
Expand Down
Expand Up @@ -14,6 +14,7 @@
# limitations under the License.
#
from .access import Access, Geolocation, ServiceAccountDelegationInfo
from .application import Application
from .asset import Asset
from .bigquery_export import BigQueryExport
from .cloud_dlp_data_profile import CloudDlpDataProfile
Expand Down Expand Up @@ -112,6 +113,7 @@
"Access",
"Geolocation",
"ServiceAccountDelegationInfo",
"Application",
"Asset",
"BigQueryExport",
"CloudDlpDataProfile",
Expand Down
@@ -0,0 +1,54 @@
# -*- coding: utf-8 -*-
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import annotations

from typing import MutableMapping, MutableSequence

import proto # type: ignore

__protobuf__ = proto.module(
package="google.cloud.securitycenter.v1",
manifest={
"Application",
},
)


class Application(proto.Message):
r"""Represents an application associated with a finding.
Attributes:
base_uri (str):
The base URI that identifies the network location of the
application in which the vulnerability was detected. For
example, ``http://example.com``.
full_uri (str):
The full URI with payload that can be used to reproduce the
vulnerability. For example,
``http://example.com?p=aMmYgI6H``.
"""

base_uri: str = proto.Field(
proto.STRING,
number=1,
)
full_uri: str = proto.Field(
proto.STRING,
number=2,
)


__all__ = tuple(sorted(__protobuf__.manifest))
Expand Up @@ -40,6 +40,7 @@
from google.cloud.securitycenter_v1.types import security_marks as gcs_security_marks
from google.cloud.securitycenter_v1.types import vulnerability as gcs_vulnerability
from google.cloud.securitycenter_v1.types import access as gcs_access
from google.cloud.securitycenter_v1.types import application as gcs_application
from google.cloud.securitycenter_v1.types import database as gcs_database
from google.cloud.securitycenter_v1.types import indicator as gcs_indicator
from google.cloud.securitycenter_v1.types import kubernetes as gcs_kubernetes
Expand Down Expand Up @@ -238,6 +239,9 @@ class Finding(proto.Message):
with the finding.
kernel_rootkit (google.cloud.securitycenter_v1.types.KernelRootkit):
Signature of the kernel rootkit.
application (google.cloud.securitycenter_v1.types.Application):
Represents an application associated with the
finding.
"""

class State(proto.Enum):
Expand Down Expand Up @@ -580,6 +584,11 @@ class FindingClass(proto.Enum):
number=50,
message=gcs_kernel_rootkit.KernelRootkit,
)
application: gcs_application.Application = proto.Field(
proto.MESSAGE,
number=53,
message=gcs_application.Application,
)


__all__ = tuple(sorted(__protobuf__.manifest))
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.26.1" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.26.1" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-securitycenter",
"version": "1.26.1"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-securitycenter",
"version": "1.26.1"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-securitycenter",
"version": "1.26.1"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Expand Up @@ -69,6 +69,7 @@
)
from google.cloud.securitycenter_v1.types import (
access,
application,
bigquery_export,
cloud_dlp_data_profile,
cloud_dlp_inspection,
Expand Down Expand Up @@ -16405,6 +16406,7 @@ def test_create_finding_rest(request_type):
"unexpected_interrupt_handler": True,
"unexpected_processes_in_runqueue": True,
},
"application": {"base_uri": "base_uri_value", "full_uri": "full_uri_value"},
}
# The version of a generated dependency at test runtime may differ from the version used during generation.
# Delete any fields which are not present in the current runtime dependency
Expand Down Expand Up @@ -26431,6 +26433,7 @@ def test_update_finding_rest(request_type):
"unexpected_interrupt_handler": True,
"unexpected_processes_in_runqueue": True,
},
"application": {"base_uri": "base_uri_value", "full_uri": "full_uri_value"},
}
# The version of a generated dependency at test runtime may differ from the version used during generation.
# Delete any fields which are not present in the current runtime dependency
Expand Down

0 comments on commit c26abaf

Please sign in to comment.