NetApp Ransomware Resilience Integration for Google SecOps#577
NetApp Ransomware Resilience Integration for Google SecOps#577ronypnetapp wants to merge 14 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 @ronypnetapp, 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 delivers a comprehensive integration of NetApp's Ransomware Resilience capabilities into Google SecOps SOAR workflows. The primary goal is to provide security teams with robust tools for rapid ransomware incident response, allowing for automated actions directly on storage systems. The integration is designed for secure communication via OAuth 2.0 and offers a suite of actions to enrich threat intelligence, manage storage resources, and monitor operations, thereby streamlining the containment and recovery process during security incidents. 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. Changelog
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. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request introduces the NetApp Ransomware Resilience integration, providing actions for IP enrichment, storage enrichment, snapshot creation, volume offline operations, and job status checks. The code generally follows a good structure for integrations. However, several areas require attention to improve correctness, maintainability, and adherence to the repository's style guide. Key issues include incorrect token expiration logic, logging of potentially sensitive information, missing documentation for function parameters and exceptions, and the use of specific IDs as default values in YAML configuration files. Additionally, some imports are unused, and there are minor style inconsistencies.
...nt/response_integrations/third_party/partner/netappransomwareresilience/core/auth_manager.py
Show resolved
Hide resolved
content/response_integrations/third_party/partner/netappransomwareresilience/definition.yaml
Outdated
Show resolved
Hide resolved
content/response_integrations/third_party/partner/netappransomwareresilience/core/ApiManager.py
Show resolved
Hide resolved
...nt/response_integrations/third_party/partner/netappransomwareresilience/core/auth_manager.py
Show resolved
Hide resolved
content/response_integrations/third_party/partner/netappransomwareresilience/definition.yaml
Outdated
Show resolved
Hide resolved
content/response_integrations/third_party/partner/netappransomwareresilience/core/utils.py
Outdated
Show resolved
Hide resolved
content/response_integrations/third_party/partner/netappransomwareresilience/definition.yaml
Outdated
Show resolved
Hide resolved
...onse_integrations/third_party/partner/netappransomwareresilience/actions/Check Job Status.py
Outdated
Show resolved
Hide resolved
...onse_integrations/third_party/partner/netappransomwareresilience/actions/Check Job Status.py
Outdated
Show resolved
Hide resolved
content/response_integrations/third_party/partner/netappransomwareresilience/definition.yaml
Outdated
Show resolved
Hide resolved
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new integration for NetApp Ransomware Resilience. While the core functionality for several actions is present, there are critical issues that must be addressed before this can be considered for merging. Most importantly, the submission is missing the required unit tests, which is a mandatory part of the contribution process for this repository. Additionally, the code contains hardcoded staging endpoints and has SSL verification disabled, making it unsuitable for a production environment. I have also left several comments regarding violations of the repository's style guide, including missing type hints, incomplete docstrings, broad exception handling, and potential logging of sensitive data. Please address these points to improve the security, reliability, and maintainability of the integration.
|
|
||
|
|
||
| @output_handler | ||
| def main(): |
There was a problem hiding this comment.
This new integration is missing the required unit tests. The repository style guide mandates that all new features in the content/response_integrations/** directory must include corresponding pytest unit tests to ensure production stability. Please add a test suite that covers the new actions and core logic, ensuring that network calls are mocked as per the guide's reference examples.
References
- All new features, bug fixes, or integrations added to
content/response_integrations/**must include corresponding unit tests to ensure production stability. (link)
content/response_integrations/third_party/partner/netappransomwareresilience/core/constants.py
Outdated
Show resolved
Hide resolved
...nt/response_integrations/third_party/partner/netappransomwareresilience/core/auth_manager.py
Show resolved
Hide resolved
| output_message = "Successfully retrieved job status" # human readable message, showed in UI as the action result | ||
| result_value = True # Set a simple result value, used for playbook if\else and placeholders. | ||
|
|
||
| except Exception as e: |
There was a problem hiding this comment.
The try...except block catches the generic Exception, which can mask underlying issues and make debugging difficult. Please catch more specific exceptions, such as requests.exceptions.RequestException for network errors, and other potential exceptions from the ApiManager. This will improve error handling and resilience, as per the style guide's "Production-Ready SecOps" principle. This comment applies to all action scripts in this PR.
References
- Code must be resilient. Implement defensive programming, proactive error handling, and structured logging. (link)
...se_integrations/third_party/partner/netappransomwareresilience/actions/Check Job Status.yaml
Show resolved
Hide resolved
...onse_integrations/third_party/partner/netappransomwareresilience/actions/Check Job Status.py
Outdated
Show resolved
Hide resolved
|
|
||
|
|
||
| @output_handler | ||
| def main(): |
There was a problem hiding this comment.
The main function is missing a return type annotation (-> None) and a Google-style docstring. The repository style guide requires both for all functions to improve readability and maintainability. Please add them. This applies to all action scripts in this PR.
| def main(): | |
| def main() -> None: |
content/response_integrations/third_party/partner/netappransomwareresilience/core/utils.py
Outdated
Show resolved
Hide resolved
content/response_integrations/third_party/partner/netappransomwareresilience/core/utils.py
Show resolved
Hide resolved
content/response_integrations/third_party/partner/netappransomwareresilience/core/utils.py
Outdated
Show resolved
Hide resolved
content/response_integrations/third_party/partner/netappransomwareresilience/release_notes.yaml
Outdated
Show resolved
Hide resolved
content/response_integrations/third_party/partner/netappransomwareresilience/pyproject.toml
Outdated
Show resolved
Hide resolved
|
Hi @ronypnetapp my name is Amit i will review your pr. |
content/response_integrations/third_party/partner/netappransomwareresilience/release_notes.yaml
Outdated
Show resolved
Hide resolved
|
Hi @ronypnetapp please see the errors from the github actions: i think that the build and validations errors is caused by the missing image.png in the resources folder. |
|
@AmitJ98 I have a question regarding the linter errors. This integration was entirely developed using SecOps IDE, and I used the Additionally, I am unable to push my local changes to the remote repository using the command What would you recommend in this case to resolve this issue gracefully?
|
to answer your questions:
|
@AmitJ98 I figured out the actual issue, and it's related to the folder name of the custom integration. When I pulled the integration from the IDE, it was pulled into a folder named using the snake_case pattern, even though my identifier followed the PascalCase pattern. This creates a problem when pushing using the mp command: the integration name is in PascalCase, but the folder name generated is in snake_case. Using the PascalCase name throws an error with the mp command, complaining that such a folder does not exist. How do we handle such a case? |
the command should be mp dev-env push integration netappransomwareresilience |
|
❌ Marketplace Validation Failed Click to view the full reportValidation Report🧩 IntegrationsPre-Build Stagenetappransomwareresilience
|
1 similar comment
|
❌ Marketplace Validation Failed Click to view the full reportValidation Report🧩 IntegrationsPre-Build Stagenetappransomwareresilience
|
* Revise Ruff and Mypy setup instructions Updated configuration steps for Ruff and Mypy integrations, including new paths and options. Signed-off-by: Tal Shafir <94114984+TalShafir1@users.noreply.github.com> * Add Pydantic support section to setup guide Added a section on Pydantic to the setup documentation. Signed-off-by: Tal Shafir <94114984+TalShafir1@users.noreply.github.com> * Update configuration paths for Ruff and type checking Signed-off-by: Tal Shafir <94114984+TalShafir1@users.noreply.github.com> --------- Signed-off-by: Tal Shafir <94114984+TalShafir1@users.noreply.github.com>
* Removed Unused Param from Job * Updated Release Notes
…ressed review comments
There was a problem hiding this comment.
please change actions file names to snake case
|
Hey @ronypnetapp please resolve gemini comments and my comments before we can continue. |


NetApp Ransomware Resilience Integration for Google SecOps
Description
The NetApp Ransomware Resilience integration enables security teams to leverage NetApp's advanced storage protection capabilities directly within Google SecOps SOAR workflows for rapid ransomware incident response. This integration authenticates via OAuth 2.0 using client credentials (client ID, client secret, and account ID) to connect with NetApp's Ransomware Resilience SaaS service. It provides six core actions: Ping (connectivity testing), Enrich IP Address (threat intelligence enrichment for suspicious IPs), Enrich Storage (retrieve volume information for specific agents and storage systems), Take Snapshot (create immutable volume snapshots for recovery purposes), Volume Offline (immediately isolate compromised volumes to prevent lateral spread), and Check Job Status (monitor asynchronous operations). The integration requires configuration of the authentication credentials and optionally supports SSL verification, making it essential for organizations seeking automated, storage-level containment and forensic preservation during active ransomware attacks.
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.