Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [securitycenter] added cloud provider field to list findings response #5507

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions owl-bot-staging/google-cloud-securitycenter/v1/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**/node_modules
**/.coverage
build/
docs/
protos/
system-test/
samples/generated/
3 changes: 3 additions & 0 deletions owl-bot-staging/google-cloud-securitycenter/v1/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./node_modules/gts"
}
14 changes: 14 additions & 0 deletions owl-bot-staging/google-cloud-securitycenter/v1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
**/*.log
**/node_modules
/.coverage
/coverage
/.nyc_output
/docs/
/out/
/build/
system-test/secrets.js
system-test/*key.json
*.lock
.DS_Store
package-lock.json
__pycache__
55 changes: 55 additions & 0 deletions owl-bot-staging/google-cloud-securitycenter/v1/.jsdoc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Copyright 2024 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
//
// https://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 is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

'use strict';

module.exports = {
opts: {
readme: './README.md',
package: './package.json',
template: './node_modules/jsdoc-fresh',
recurse: true,
verbose: true,
destination: './docs/'
},
plugins: [
'plugins/markdown',
'jsdoc-region-tag'
],
source: {
excludePattern: '(^|\\/|\\\\)[._]',
include: [
'build/src',
'protos'
],
includePattern: '\\.js$'
},
templates: {
copyright: 'Copyright 2024 Google LLC',
includeDate: false,
sourceFiles: false,
systemName: '@google-cloud/security-center',
theme: 'lumen',
default: {
outputSourceFiles: false
}
},
markdown: {
idInHeadings: true
}
};
33 changes: 33 additions & 0 deletions owl-bot-staging/google-cloud-securitycenter/v1/.mocharc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright 2024 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
//
// https://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 is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

const config = {
"enable-source-maps": true,
"throw-deprecation": true,
"timeout": 10000
}
if (process.env.MOCHA_THROW_DEPRECATION === 'false') {
delete config['throw-deprecation'];
}
if (process.env.MOCHA_REPORTER) {
config.reporter = process.env.MOCHA_REPORTER;
}
if (process.env.MOCHA_REPORTER_OUTPUT) {
config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`;
}
module.exports = config
22 changes: 22 additions & 0 deletions owl-bot-staging/google-cloud-securitycenter/v1/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright 2024 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
//
// https://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 is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **


module.exports = {
...require('gts/.prettierrc.json')
}
1 change: 1 addition & 0 deletions owl-bot-staging/google-cloud-securitycenter/v1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Securitycenter: Nodejs Client
58 changes: 58 additions & 0 deletions owl-bot-staging/google-cloud-securitycenter/v1/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"name": "@google-cloud/security-center",
"version": "0.1.0",
"description": "Securitycenter client for Node.js",
"repository": "googleapis/nodejs-securitycenter",
"license": "Apache-2.0",
"author": "Google LLC",
"main": "build/src/index.js",
"files": [
"build/src",
"build/protos"
],
"keywords": [
"google apis client",
"google api client",
"google apis",
"google api",
"google",
"google cloud platform",
"google cloud",
"cloud",
"google securitycenter",
"securitycenter",
"security center"
],
"scripts": {
"clean": "gts clean",
"compile": "tsc -p . && cp -r protos build/ && minifyProtoJson",
"compile-protos": "compileProtos src",
"docs": "jsdoc -c .jsdoc.js",
"fix": "gts fix",
"lint": "gts check",
"prepare": "npm run compile-protos && npm run compile",
"system-test": "c8 mocha build/system-test",
"test": "c8 mocha build/test"
},
"dependencies": {
"google-gax": "^4.3.4"
},
"devDependencies": {
"@types/mocha": "^10.0.6",
"@types/node": "^20.12.12",
"@types/sinon": "^10.0.20",
"c8": "^9.1.0",
"gapic-tools": "^0.4.2",
"gts": "5.3.0",
"jsdoc": "^4.0.3",
"jsdoc-fresh": "^3.0.0",
"jsdoc-region-tag": "^3.0.0",
"mocha": "^10.4.0",
"pack-n-play": "^2.0.3",
"sinon": "^15.2.0",
"typescript": "5.1.6"
},
"engines": {
"node": ">=v14"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
// Copyright 2024 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.v1;

option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
option go_package = "cloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb";
option java_multiple_files = true;
option java_outer_classname = "AccessProto";
option java_package = "com.google.cloud.securitycenter.v1";
option php_namespace = "Google\\Cloud\\SecurityCenter\\V1";
option ruby_package = "Google::Cloud::SecurityCenter::V1";

// Represents an access event.
message Access {
// Associated email, such as "[email protected]".
//
// The email address of the authenticated user or a service account acting on
// behalf of a third party principal making the request. For third party
// identity callers, the `principal_subject` field is populated instead of
// this field. For privacy reasons, the principal email address is sometimes
// redacted. For more information, see [Caller identities in audit
// logs](https://cloud.google.com/logging/docs/audit#user-id).
string principal_email = 1;

// Caller's IP address, such as "1.1.1.1".
string caller_ip = 2;

// The caller IP's geolocation, which identifies where the call came from.
Geolocation caller_ip_geo = 3;

// Type of user agent associated with the finding. For example, an operating
// system shell or an embedded or standalone application.
string user_agent_family = 4;

// The caller's user agent string associated with the finding.
string user_agent = 12;

// This is the API service that the service account made a call to, e.g.
// "iam.googleapis.com"
string service_name = 5;

// The method that the service account called, e.g. "SetIamPolicy".
string method_name = 6;

// A string that represents the principal_subject that is associated with the
// identity. Unlike `principal_email`, `principal_subject` supports principals
// that aren't associated with email addresses, such as third party
// principals. For most identities, the format is
// `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`.
// Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD,
// still use the legacy format `serviceAccount:{identity pool
// name}[{subject}]`.
string principal_subject = 7;

// The name of the service account key that was used to create or exchange
// credentials when authenticating the service account that made the request.
// This is a scheme-less URI full resource name. For example:
//
// "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}".
//
string service_account_key_name = 8;

// The identity delegation history of an authenticated service account that
// made the request. The `serviceAccountDelegationInfo[]` object contains
// information about the real authorities that try to access Google Cloud
// resources by delegating on a service account. When multiple authorities are
// present, they are guaranteed to be sorted based on the original ordering of
// the identity delegation events.
repeated ServiceAccountDelegationInfo service_account_delegation_info = 9;

// A string that represents a username. The username provided depends on the
// type of the finding and is likely not an IAM principal. For example, this
// can be a system username if the finding is related to a virtual machine, or
// it can be an application login username.
string user_name = 11;
}

// Identity delegation history of an authenticated service account.
message ServiceAccountDelegationInfo {
// The email address of a Google account.
string principal_email = 1;

// A string representing the principal_subject associated with the identity.
// As compared to `principal_email`, supports principals that aren't
// associated with email addresses, such as third party principals. For most
// identities, the format will be `principal://iam.googleapis.com/{identity
// pool name}/subjects/{subject}` except for some GKE identities
// (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy
// format `serviceAccount:{identity pool name}[{subject}]`
string principal_subject = 2;
}

// Represents a geographical location for a given access.
message Geolocation {
// A CLDR.
string region_code = 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright 2024 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.v1;

option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
option go_package = "cloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb";
option java_multiple_files = true;
option java_outer_classname = "ApplicationProto";
option java_package = "com.google.cloud.securitycenter.v1";
option php_namespace = "Google\\Cloud\\SecurityCenter\\V1";
option ruby_package = "Google::Cloud::SecurityCenter::V1";

// Represents an application associated with a finding.
message Application {
// The base URI that identifies the network location of the application in
// which the vulnerability was detected. For example, `http://example.com`.
string base_uri = 1;

// The full URI with payload that can be used to reproduce the
// vulnerability. For example, `http://example.com?p=aMmYgI6H`.
string full_uri = 2;
}
Loading
Loading