Skip to content

b/489016956 b/482974687 b/486115090 b/482976229 CloudIdentity#668

Open
lemanczykp wants to merge 1 commit intochronicle:mainfrom
lemanczykp:CloudIdentity
Open

b/489016956 b/482974687 b/486115090 b/482976229 CloudIdentity#668
lemanczykp wants to merge 1 commit intochronicle:mainfrom
lemanczykp:CloudIdentity

Conversation

@lemanczykp
Copy link
Copy Markdown
Contributor

@lemanczykp lemanczykp commented Apr 8, 2026

CloudIdentity integration

  • [Buganizer ID: 489016956] Feature: Added List Policies action
  • [Buganizer ID: 482974687] Feature: Added Entity To Detector URL List action
  • [Buganizer ID: 486115090] Feature: Added Ping and integration configuration
  • [Buganizer ID: 482976229] Feature: Added Create policy action

Description

Implement Cloud Identity API integration and actions

  • Add centralized ApiManager for handling authenticated requests.
  • Add resource handlers for Policies and Organizational Units (OrgUnits).
  • Add dataclass-based models for data serialization.
  • Implement actions: Ping, ListPolicies, CreatePolicy, and AddEntityToDetectorURLList.
  • Implement automated parameter mapping and validation for actions.

Checklist:

Please ensure you have completed the following items before submitting your PR.
This helps us review your contribution faster and more efficiently.

General Checks:

  • I have read and followed the project's contributing.md guide.
  • My code follows the project's coding style guidelines.
  • I have performed a self-review of my own code.
  • My changes do not introduce any new warnings.
  • My changes pass all existing tests.
  • I have added new tests where appropriate to cover my changes. (If applicable)
  • I have updated the documentation where necessary (e.g., README, API docs). (If applicable)

Open-Source Specific Checks:

  • My changes do not introduce any Personally Identifiable Information (PII) or sensitive customer data.
  • My changes do not expose any internal-only code examples, configurations, or URLs.
  • All code examples, comments, and messages are generic and suitable for a public repository.
  • I understand that any internal context or sensitive details related to this work are handled separately in internal systems (Buganizer for Google team members).

For Google Team Members and Reviewers Only:

  • I have included the Buganizer ID in the PR title or description (e.g., "Internal Buganizer ID: 123456789" or "Related Buganizer: go/buganizer/123456789").
  • I have ensured that all internal discussions and PII related to this work remain in Buganizer.
  • I have tagged the PR with one or more labels that reflect the pull request purpose.

Note

High Risk
Adds a new integration that performs authenticated Google API calls (service account/workload identity impersonation) and can create/update Cloud Identity policies, so mistakes could impact access/policy enforcement. The new update_url_list_detector_policy implementation appears error-prone (URL list mutation/append logic), increasing the chance of incorrect policy updates.

Overview
Introduces a new CloudIdentity response integration (Python 3.11) with configuration (definition.yaml, pyproject.toml, release notes, resources) and a shared action framework (core/action_wrapper.py) plus parameter mapping/validation helpers.

Implements authenticated API access via an AuthManager and GoogleCloudIdentityApiManager, including API resource clients for Cloud Identity Policies and Admin SDK OrgUnits, with dataclass models and response validation.

Adds four new actions with YAML definitions and tests: Ping (connectivity check), ListPolicies (filterable listing by org unit/type/setting/display name), CreatePolicy (create from provided policy entry), and AddEntityToDetectorURLList (append URLs/domains/entities to a URL list detector policy).

Reviewed by Cursor Bugbot for commit 9681941. Bugbot is set up for automated code reviews on this repo. Configure here.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a comprehensive integration for the Cloud Identity API, enabling automated policy management and URL detector list updates. The implementation includes a structured framework for API interaction, authentication, and action execution, ensuring consistent handling of requests and responses across the new functionality.

Highlights

  • Cloud Identity Integration: Implemented a new Cloud Identity integration, including a centralized ApiManager for authenticated requests and resource handlers for Policies and Organizational Units.
  • New Actions: Added support for Ping, ListPolicies, CreatePolicy, and AddEntityToDetectorURLList actions, complete with automated parameter mapping and validation.
  • Data Models: Introduced dataclass-based models to facilitate robust data serialization and deserialization for API interactions.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

Marketplace Validation Failed

Click to view the full report

Validation Report

🧩 Integrations
Pre-Build Stage

cloud_identity

Validation Name Details
⚠️ Integration Version Bump New integration project.toml and release_note.yaml version must be initialize to 1.0
⚠️ SSL Integration Validation The default value of the 'Verify SSL' param in Cloud Identity must be a boolean true

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new Google Cloud Identity integration, adding actions such as AddEntityToDetectorURLList, CreatePolicy, ListPolicies, and Ping, along with their core components for API interaction, authentication, and parameter mapping. The review highlights several areas for improvement, including enhancing the robustness of API connectivity checks, correcting a potential bug in URL list updates, removing an unused parameter in AddEntityToDetectorURLList, and addressing multiple security concerns related to logging PII and using json.loads() instead of yaml.safe_load() for parsing. The JSON result example for AddEntityToDetectorURLList also needs to be updated for accuracy and naming convention, and the PyYAML dependency must be added.

Comment thread content/response_integrations/google/cloud_identity/core/api_manager.py Outdated
Comment thread content/response_integrations/google/cloud_identity/core/api_manager.py Outdated
Comment thread content/response_integrations/google/cloud_identity/core/action_param_mappers.py Outdated
Comment thread content/response_integrations/google/cloud_identity/core/action_param_mappers.py Outdated
Comment thread content/response_integrations/google/cloud_identity/pyproject.toml
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 9, 2026

Marketplace Validation Failed

Click to view the full report

Validation Report

🧩 Integrations
Pre-Build Stage

cloud_identity

Validation Name Details
⚠️ Integration Version Bump New integration project.toml and release_note.yaml version must be initialize to 1.0
⚠️ SSL Integration Validation The default value of the 'Verify SSL' param in Cloud Identity must be a boolean true

@lemanczykp lemanczykp closed this Apr 9, 2026
@lemanczykp lemanczykp reopened this Apr 9, 2026
@lemanczykp lemanczykp force-pushed the CloudIdentity branch 3 times, most recently from 8b90337 to 9681941 Compare April 10, 2026 08:35
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9681941. Configure here.

Comment thread content/response_integrations/google/cloud_identity/core/api_manager.py Outdated
@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 10, 2026

You have used all of your free Bugbot PR reviews.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 10, 2026

You have used all of your free Bugbot PR reviews.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 10, 2026

You have used all of your free Bugbot PR reviews.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

sedovolosiy
sedovolosiy previously approved these changes Apr 10, 2026
@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 14, 2026

You have used all of your free Bugbot PR reviews.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

1 similar comment
@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 15, 2026

You have used all of your free Bugbot PR reviews.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@TalShafir1 TalShafir1 marked this pull request as draft April 15, 2026 12:28
@TalShafir1 TalShafir1 marked this pull request as ready for review April 15, 2026 12:28
@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 15, 2026

You have used all of your free Bugbot PR reviews.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@lemanczykp lemanczykp force-pushed the CloudIdentity branch 2 times, most recently from baec628 to 805a82f Compare April 21, 2026 14:35
@lemanczykp lemanczykp force-pushed the CloudIdentity branch 2 times, most recently from 1267d20 to ddcf6f0 Compare April 22, 2026 07:49
- bootstrap for Google Cloud Identity integration
- added api manager
- added Ping action
- added ListPolicies
- added AddEntityToDetectorURLList
- added CreatePolicy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants