-
Notifications
You must be signed in to change notification settings - Fork 603
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: convert library to TypeScript, adding v1p1beta1 import (#198)
- Loading branch information
Showing
78 changed files
with
43,917 additions
and
23,377 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
**/*.log | ||
**/node_modules | ||
.coverage | ||
coverage | ||
.nyc_output | ||
docs/ | ||
out/ | ||
build/ | ||
system-test/secrets.js | ||
system-test/*key.json | ||
*.lock | ||
**/package-lock.json | ||
.DS_Store | ||
package-lock.json | ||
__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
packages/google-cloud-securitycenter/protos/google/cloud/common_resources.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Copyright 2019 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. | ||
|
||
// This file contains stub messages for common resources in GCP. | ||
// It is not intended to be directly generated, and is instead used by | ||
// other tooling to be able to match common resource patterns. | ||
syntax = "proto3"; | ||
|
||
package google.cloud; | ||
|
||
import "google/api/resource.proto"; | ||
|
||
|
||
option (google.api.resource_definition) = { | ||
type: "cloudresourcemanager.googleapis.com/Project" | ||
pattern: "projects/{project}" | ||
}; | ||
|
||
|
||
option (google.api.resource_definition) = { | ||
type: "cloudresourcemanager.googleapis.com/Organization" | ||
pattern: "organizations/{organization}" | ||
}; | ||
|
||
|
||
option (google.api.resource_definition) = { | ||
type: "cloudresourcemanager.googleapis.com/Folder" | ||
pattern: "folders/{folder}" | ||
}; | ||
|
||
|
||
option (google.api.resource_definition) = { | ||
type: "cloudbilling.googleapis.com/BillingAccount" | ||
pattern: "billingAccounts/{billing_account}" | ||
}; | ||
|
||
option (google.api.resource_definition) = { | ||
type: "locations.googleapis.com/Location" | ||
pattern: "projects/{project}/locations/{location}" | ||
}; | ||
|
119 changes: 119 additions & 0 deletions
119
...ages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/asset.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
// Copyright 2019 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. | ||
// | ||
|
||
syntax = "proto3"; | ||
|
||
package google.cloud.securitycenter.v1p1beta1; | ||
|
||
import "google/api/annotations.proto"; | ||
import "google/api/resource.proto"; | ||
import "google/cloud/securitycenter/v1p1beta1/security_marks.proto"; | ||
import "google/protobuf/struct.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
|
||
option csharp_namespace = "Google.Cloud.SecurityCenter.V1P1Beta1"; | ||
option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter"; | ||
option java_multiple_files = true; | ||
option java_package = "com.google.cloud.securitycenter.v1p1beta1"; | ||
option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1"; | ||
option ruby_package = "Google::Cloud::SecurityCenter::V1p1Beta1"; | ||
|
||
// Cloud Security Command Center's (Cloud SCC) representation of a Google Cloud | ||
// Platform (GCP) resource. | ||
// | ||
// The Asset is a Cloud SCC resource that captures information about a single | ||
// GCP resource. All modifications to an Asset are only within the context of | ||
// Cloud SCC and don't affect the referenced GCP resource. | ||
message Asset { | ||
option (google.api.resource) = { | ||
type: "securitycenter.googleapis.com/Asset" | ||
pattern: "organizations/{organization}/assets/{asset}" | ||
}; | ||
|
||
// Cloud SCC managed properties. These properties are managed by Cloud SCC and | ||
// cannot be modified by the user. | ||
message SecurityCenterProperties { | ||
// The full resource name of the GCP resource this asset | ||
// represents. This field is immutable after create time. See: | ||
// https://cloud.google.com/apis/design/resource_names#full_resource_name | ||
string resource_name = 1; | ||
|
||
// The type of the GCP resource. Examples include: APPLICATION, | ||
// PROJECT, and ORGANIZATION. This is a case insensitive field defined by | ||
// Cloud SCC and/or the producer of the resource and is immutable | ||
// after create time. | ||
string resource_type = 2; | ||
|
||
// The full resource name of the immediate parent of the resource. See: | ||
// https://cloud.google.com/apis/design/resource_names#full_resource_name | ||
string resource_parent = 3; | ||
|
||
// The full resource name of the project the resource belongs to. See: | ||
// https://cloud.google.com/apis/design/resource_names#full_resource_name | ||
string resource_project = 4; | ||
|
||
// Owners of the Google Cloud resource. | ||
repeated string resource_owners = 5; | ||
|
||
// The user defined display name for this resource. | ||
string resource_display_name = 6; | ||
|
||
// The user defined display name for the parent of this resource. | ||
string resource_parent_display_name = 7; | ||
|
||
// The user defined display name for the project of this resource. | ||
string resource_project_display_name = 8; | ||
} | ||
|
||
// IAM Policy information associated with the GCP resource described by the | ||
// Cloud SCC asset. This information is managed and defined by the GCP | ||
// resource and cannot be modified by the user. | ||
message IamPolicy { | ||
// The JSON representation of the Policy associated with the asset. | ||
// See https://cloud.google.com/iam/reference/rest/v1p1beta1/Policy for | ||
// format details. | ||
string policy_blob = 1; | ||
} | ||
|
||
// The relative resource name of this asset. See: | ||
// https://cloud.google.com/apis/design/resource_names#relative_resource_name | ||
// Example: | ||
// "organizations/{organization_id}/assets/{asset_id}". | ||
string name = 1; | ||
|
||
// Cloud SCC managed properties. These properties are managed by | ||
// Cloud SCC and cannot be modified by the user. | ||
SecurityCenterProperties security_center_properties = 2; | ||
|
||
// Resource managed properties. These properties are managed and defined by | ||
// the GCP resource and cannot be modified by the user. | ||
map<string, google.protobuf.Value> resource_properties = 7; | ||
|
||
// User specified security marks. These marks are entirely managed by the user | ||
// and come from the SecurityMarks resource that belongs to the asset. | ||
SecurityMarks security_marks = 8; | ||
|
||
// The time at which the asset was created in Cloud SCC. | ||
google.protobuf.Timestamp create_time = 9; | ||
|
||
// The time at which the asset was last updated, added, or deleted in Cloud | ||
// SCC. | ||
google.protobuf.Timestamp update_time = 10; | ||
|
||
// IAM Policy information associated with the GCP resource described by the | ||
// Cloud SCC asset. This information is managed and defined by the GCP | ||
// resource and cannot be modified by the user. | ||
IamPolicy iam_policy = 11; | ||
} |
111 changes: 111 additions & 0 deletions
111
...es/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1p1beta1/finding.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
// Copyright 2019 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. | ||
// | ||
|
||
syntax = "proto3"; | ||
|
||
package google.cloud.securitycenter.v1p1beta1; | ||
|
||
import "google/api/annotations.proto"; | ||
import "google/api/field_behavior.proto"; | ||
import "google/api/resource.proto"; | ||
import "google/cloud/securitycenter/v1p1beta1/security_marks.proto"; | ||
import "google/protobuf/struct.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
|
||
option csharp_namespace = "Google.Cloud.SecurityCenter.V1P1Beta1"; | ||
option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter"; | ||
option java_multiple_files = true; | ||
option java_package = "com.google.cloud.securitycenter.v1p1beta1"; | ||
option php_namespace = "Google\\Cloud\\SecurityCenter\\V1p1beta1"; | ||
option ruby_package = "Google::Cloud::SecurityCenter::V1p1Beta1"; | ||
|
||
// Cloud Security Command Center (Cloud SCC) finding. | ||
// | ||
// A finding is a record of assessment data (security, risk, health or privacy) | ||
// ingested into Cloud SCC for presentation, notification, analysis, | ||
// policy testing, and enforcement. For example, an XSS vulnerability in an | ||
// App Engine application is a finding. | ||
message Finding { | ||
option (google.api.resource) = { | ||
type: "securitycenter.googleapis.com/Finding" | ||
pattern: "organizations/{organization}/sources/{source}/findings/{finding}" | ||
}; | ||
|
||
// The state of the finding. | ||
enum State { | ||
// Unspecified state. | ||
STATE_UNSPECIFIED = 0; | ||
|
||
// The finding requires attention and has not been addressed yet. | ||
ACTIVE = 1; | ||
|
||
// The finding has been fixed, triaged as a non-issue or otherwise addressed | ||
// and is no longer active. | ||
INACTIVE = 2; | ||
} | ||
|
||
// The relative resource name of this finding. See: | ||
// https://cloud.google.com/apis/design/resource_names#relative_resource_name | ||
// Example: | ||
// "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" | ||
string name = 1; | ||
|
||
// The relative resource name of the source the finding belongs to. See: | ||
// https://cloud.google.com/apis/design/resource_names#relative_resource_name | ||
// This field is immutable after creation time. | ||
// For example: | ||
// "organizations/{organization_id}/sources/{source_id}" | ||
string parent = 2; | ||
|
||
// For findings on Google Cloud Platform (GCP) resources, the full resource | ||
// name of the GCP resource this finding is for. See: | ||
// https://cloud.google.com/apis/design/resource_names#full_resource_name | ||
// When the finding is for a non-GCP resource, the resourceName can be a | ||
// customer or partner defined string. | ||
// This field is immutable after creation time. | ||
string resource_name = 3; | ||
|
||
// The state of the finding. | ||
State state = 4; | ||
|
||
// The additional taxonomy group within findings from a given source. | ||
// This field is immutable after creation time. | ||
// Example: "XSS_FLASH_INJECTION" | ||
string category = 5; | ||
|
||
// The URI that, if available, points to a web page outside of Cloud SCC | ||
// where additional information about the finding can be found. This field is | ||
// guaranteed to be either empty or a well formed URL. | ||
string external_uri = 6; | ||
|
||
// Source specific properties. These properties are managed by the source | ||
// that writes the finding. The key names in the source_properties map must be | ||
// between 1 and 255 characters, and must start with a letter and contain | ||
// alphanumeric characters or underscores only. | ||
map<string, google.protobuf.Value> source_properties = 7; | ||
|
||
// Output only. User specified security marks. These marks are entirely | ||
// managed by the user and come from the SecurityMarks resource that belongs | ||
// to the finding. | ||
SecurityMarks security_marks = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; | ||
|
||
// The time at which the event took place. For example, if the finding | ||
// represents an open firewall it would capture the time the detector believes | ||
// the firewall became open. The accuracy is determined by the detector. | ||
google.protobuf.Timestamp event_time = 9; | ||
|
||
// The time at which the finding was created in Cloud SCC. | ||
google.protobuf.Timestamp create_time = 10; | ||
} |
Oops, something went wrong.