-
Notifications
You must be signed in to change notification settings - Fork 2k
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): Add Resource SCC Management API Org SHA Custom … #3942
base: main
Are you sure you want to change the base?
feat(securitycenter): Add Resource SCC Management API Org SHA Custom … #3942
Conversation
…Module code samples
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Here is the summary of changes. You are about to add 4 region tags.
This comment is generated by snippet-bot.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi team,
I'm currently reviewing this pull request and will provide my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly understand the changes:
This pull request, submitted by agggaurav2024, aims to add code samples for the Security Health Analytics Custom Module in the Security Command Center (SCC) Management API. The intent is to provide examples for creating, updating, getting, and getting the effective state of these custom modules. This addresses issues b/347347427, b/347347480, b/347347258, and b/347347835.
Here's a breakdown of the changes:
- New files added:
security-center/snippets/management_api/createSecurityHealthAnalyticsCustomModule.js
: Adds a function to create a new Security Health Analytics Custom Module. (Lines 1-91)security-center/snippets/management_api/getEffectiveSecurityHealthAnalyticsCustomModule.js
: Adds a function to retrieve an existing effective security health analytics custom module. (Lines 1-46)security-center/snippets/management_api/getSecurityHealthAnalyticsCustomModule.js
: Adds a function to retrieve an existing security health analytics custom module. (Lines 1-46)security-center/snippets/management_api/updateSecurityHealthAnalyticsCustomModule.js
: Adds a function to update an existing security health analytics custom module. (Lines 1-63)security-center/snippets/system-test/managemnt_api/securityHealthAnalyticsCustomModule.test.js
: Added system test file for the new custom modules. (Lines 1-155)
security-center/snippets/package.json
updated: Added@google-cloud/securitycentermanagement
dependency and updated versions of other dependencies. (Lines 13-27)
The code samples utilize the @google-cloud/securitycentermanagement
library. The pull request includes comprehensive comments explaining each function and its parameters. The author has also included a checklist confirming adherence to the project's contribution guidelines and testing procedures.
I'll be looking at the code's functionality, testing, and overall style in my full review.
And now, a little haiku to lighten the mood:
Code flows like a stream,
Tests pass, a joyful green light,
Bugs flee in the night.
Gemini encountered an error creating the review. You can try again by commenting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @agggaurav2024 and reviewers,
I'm currently reviewing this pull request and will provide my feedback in a few minutes. In the meantime, I'm providing this summary of the pull request's content to help you and other reviewers quickly understand the changes and intent.
This pull request, feat(securitycenter): Add Resource SCC Management API Org SHA Custom …
, aims to add code samples for the Security Health Analytics Custom Module in the Security Command Center (SCC) Management API. Specifically, it addresses issues b/347347427, b/347347480, b/347347258, and b/347347835.
Here's a summary of the changes:
- New files added:
security-center/snippets/management_api/createSecurityHealthAnalyticsCustomModule.js
: Adds a function to create a new Security Health Analytics Custom Module.security-center/snippets/management_api/getEffectiveSecurityHealthAnalyticsCustomModule.js
: Adds a function to retrieve an existing effective Security Health Analytics Custom Module.security-center/snippets/management_api/getSecurityHealthAnalyticsCustomModule.js
: Adds a function to retrieve an existing Security Health Analytics Custom Module.security-center/snippets/management_api/updateSecurityHealthAnalyticsCustomModule.js
: Adds a function to update an existing Security Health Analytics Custom Module.security-center/snippets/system-test/managemnt_api/securityHealthAnalyticsCustomModule.test.js
: Adds system tests for the new functions.
security-center/snippets/package.json
updated: Updated dependencies to include@google-cloud/securitycentermanagement
and updated versions of other dependencies.
The code samples demonstrate how to create, update, get, and get the effective configuration of Security Health Analytics Custom Modules. The system tests verify the functionality of these code samples.
I've reviewed the code and found it well-structured and easy to understand. The comments are clear and concise, and the code is well-tested. The updated package.json
ensures all necessary dependencies are included.
And now, a little haiku to lighten the mood:
Code flows like a stream,
Tests pass, a joyful green light,
Bugs flee in the night.
Gemini encountered an error creating the review. You can try again by commenting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi team,
I'm currently reviewing this pull request and will provide my feedback shortly. In the meantime, here's a summary of the changes for you and other reviewers to quickly get up to speed:
This pull request, submitted by agggaurav2024, aims to add code samples for the Security Health Analytics Custom Module in the Security Command Center (SCC) Management API. The changes address issues b/347347427, b/347347480, b/347347258, and b/347347835.
Specifically, the following changes were made:
- New files added:
security-center/snippets/management_api/createSecurityHealthAnalyticsCustomModule.js
: Adds a sample for creating a Security Health Analytics Custom Module.security-center/snippets/management_api/getEffectiveSecurityHealthAnalyticsCustomModule.js
: Adds a sample for retrieving an effective Security Health Analytics Custom Module.security-center/snippets/management_api/getSecurityHealthAnalyticsCustomModule.js
: Adds a sample for retrieving an existing Security Health Analytics Custom Module.security-center/snippets/management_api/updateSecurityHealthAnalyticsCustomModule.js
: Adds a sample for updating an existing Security Health Analytics Custom Module.security-center/snippets/system-test/managemnt_api/securityHealthAnalyticsCustomModule.test.js
: Adds system tests for the new samples.
security-center/snippets/package.json
updated: Updated dependencies to include@google-cloud/securitycentermanagement
and updated versions of other dependencies.
The code samples cover the create
, update
, get
, and getEffective
operations for the Security Health Analytics Custom Module. The system test file thoroughly tests the functionality of these new samples.
The author has indicated that the samples require new API enablement and environment variables in testing projects. This information should be clarified during the review process.
I'll be looking at the code for correctness, style, and test coverage shortly. I'll also check the API enablement and environment variable requirements mentioned in the checklist.
And now, a little haiku to lighten the mood:
Code flows like a stream,
Tests run, a green light appears,
Bugs flee in the night.
Gemini encountered an error creating the review. You can try again by commenting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi team,
I'm currently reviewing this pull request and will provide my feedback shortly. In the meantime, I'm providing this summary of the pull request's content for you and other reviewers to quickly grasp the changes and intent.
This pull request, authored by agggaurav2024, aims to add code samples for the Security Health Analytics Custom Module in the Security Command Center (SCC) Management API. The changes include:
- New files added: Four new
.js
files have been added to thesecurity-center/snippets/management_api
directory. These files provide code samples for creating, updating, getting, and getting the effective state of a Security Health Analytics Custom Module. package.json
updated: Thepackage.json
file has been updated to include the@google-cloud/securitycentermanagement
dependency, along with version bumps for other dependencies.- System test added: A comprehensive system test (
security-center/snippets/system-test/managemnt_api/securityHealthAnalyticsCustomModule.test.js
) has been added to verify the functionality of the new code samples.
The code samples cover the following functionalities:
Function | File Name | Description |
---|---|---|
Create Security Health Analytics Custom Module | createSecurityHealthAnalyticsCustomModule.js |
Creates a new Security Health Analytics Custom Module. |
Update Security Health Analytics Custom Module | updateSecurityHealthAnalyticsCustomModule.js |
Updates an existing Security Health Analytics Custom Module. |
Get Security Health Analytics Custom Module | getSecurityHealthAnalyticsCustomModule.js |
Retrieves an existing Security Health Analytics Custom Module. |
Get Effective Security Health Analytics Custom Module | getEffectiveSecurityHealthAnalyticsCustomModule.js |
Retrieves the effective state of an existing Security Health Analytics Custom Module. |
The pull request also addresses issues b/347347427, b/347347480, b/347347258, and b/347347835. The author has indicated that all tests and lint checks have passed, and the necessary updates to CODEOWNERS and GitHub Actions workflows have been made.
I'll provide a more detailed review shortly. Until then, happy reviewing!
A little poem for your coding pleasure:
Code flows like a river,
Tests run, a gentle current,
Bugs swim downstream.
Gemini encountered an error creating the review. You can try again by commenting |
…Module code samples
Description
Fixes # b/347347427, b/347347480, b/347347258, b/347347835
This PR adds SCC Managament API Org Security Health Analytics Custom Module Code Samples for Create, Update, Get and GetEffective.
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
npm test
(see Testing)npm run lint
(see Style)GoogleCloudPlatform/nodejs-docs-samples
. Not a fork.