feat(GitSync): Remap playbook view roles by name#686
feat(GitSync): Remap playbook view roles by name#686avitav-svg wants to merge 5 commits intochronicle:mainfrom
Conversation
|
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. |
Summary of ChangesHello, 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 addresses issues with playbook pull failures caused by non-portable role IDs. By implementing a name-based mapping system, the synchronization process now correctly resolves roles to their corresponding IDs in the destination system and gracefully handles missing roles by removing them, thereby improving the reliability of playbook deployments. Highlights
🧠 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 AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request implements role remapping for workflows during synchronization. It introduces a _remap_workflow_roles method in GitSyncManager to translate role names to system-specific IDs and adds a get_soc_roles method to SiemplifyApiClient. Feedback was provided regarding missing type annotations and docstrings in the API client, as well as suggestions for improved defensive programming, docstring compliance, and the use of non-deprecated logging methods in the manager class.
2d88fac to
309f162
Compare
TalShafir1
left a comment
There was a problem hiding this comment.
Please add release notes and increase the integration's version
…ntegrations (#702) * Fix: CI path filter typo skipping all checks for power_ups integrations The path filters in 5 workflow files referenced `power_up/` instead of `power_ups/`, causing validate, build, lint, code check, and Windows CI jobs to silently skip when power_ups integrations were modified. This allowed PR #686 to pass CI without version bump or release notes validation. * Add .claude/ to .gitignore
|
❌ Marketplace Validation Failed Click to view the full reportValidation Report🧩 IntegrationsPre-Build Stagegit_sync
|
2 similar comments
|
❌ Marketplace Validation Failed Click to view the full reportValidation Report🧩 IntegrationsPre-Build Stagegit_sync
|
|
❌ Marketplace Validation Failed Click to view the full reportValidation Report🧩 IntegrationsPre-Build Stagegit_sync
|
2ea0fd5 to
c6efcfb
Compare
|
❌ Marketplace Validation Failed Click to view the full reportValidation Report🧩 IntegrationsPre-Build Stagegit_sync
|
Fixes playbook pull failures due to non-portable role IDs by mapping roles by name to destination IDs. Missing roles are removed.
81a9c71 to
82dab3a
Compare
Signed-off-by: avitav-svg <avitav@google.com>
|
❌ Marketplace Validation Failed Click to view the full reportValidation Report🧩 IntegrationsPre-Build Stagegit_sync
|
|
❌ Marketplace Validation Failed Click to view the full reportValidation Report🧩 IntegrationsPre-Build Stagegit_sync
|
Fixes playbook pull failures due to non-portable role IDs by mapping roles by name to destination IDs. Missing roles are removed.
Title (Please follow the convention below)
Please use a clear and concise title that summarizes your changes.
If this PR is related to an internal Buganizer ticket, please include its ID at the beginning.
Convention:
[Optional Buganizer ID: 123456789] Short, descriptive title of changesExamples:
Fix: Resolve issue with API endpoint returning 500 error[Buganizer ID: 987654321] Feature: Add support for custom data typesDocs: Update README with installation instructionsDescription
Please provide a detailed description of your changes. This helps reviewers understand your work and its context.
What problem does this PR solve?
(e.g., "Fixes a bug where X was happening," "Implements feature Y to allow Z," "Improves performance of function A.")
How does this PR solve the problem?
(e.g., "Modified algorithm in
src/foo.js," "Added new componentBar.vue," "Updated dependencybazto version 1.2.3.")Any other relevant information (e.g., design choices, tradeoffs, known issues):
(e.g., "Chose approach A over B due to performance considerations," "This change might affect X in certain edge cases," "Requires manual migration steps for existing users.")
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:
Open-Source Specific Checks:
For Google Team Members and Reviewers Only:
Screenshots (If Applicable)
If your changes involve UI or visual elements, please include screenshots or GIFs here.
Ensure any sensitive data is redacted or generalized.
Further Comments / Questions
Any additional comments, questions, or areas where you'd like specific feedback.
Note
Medium Risk
Touches workflow save/install logic and permission-related role mappings; incorrect role resolution could change which users can see playbook views or strip roles when names don’t match.
Overview
Ensures playbook
overviewTemplatesrole assignments are portable across SOAR instances by remapping roles fromroleNamesto destination role IDs before saving workflows.During both new installs and updates, GitSync now fetches and caches SOC roles via a new
get_soc_rolesAPI call, replaces templateroleswith the matched IDs, drops unknown roles (with a warning), and removes theroleNamesfield from the payload.Reviewed by Cursor Bugbot for commit 2d88fac. Bugbot is set up for automated code reviews on this repo. Configure here.