Skip to content

migrate hcl_big_fix_inventory#693

Open
haggit-eliyahu wants to merge 4 commits intomainfrom
migrate-hcl_big_fix_inventory
Open

migrate hcl_big_fix_inventory#693
haggit-eliyahu wants to merge 4 commits intomainfrom
migrate-hcl_big_fix_inventory

Conversation

@haggit-eliyahu
Copy link
Copy Markdown
Contributor

No description provided.

@haggit-eliyahu haggit-eliyahu requested a review from a team as a code owner April 19, 2026 16:22
@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 new integration for HCL BigFix Inventory. The integration provides capabilities to enrich entities with device information and verify connectivity to the HCL BigFix Inventory server. It includes all necessary backend logic, data models, and UI components to support these actions within the platform.

Highlights

  • New Integration: Added the HCL BigFix Inventory integration, including core management logic, data models, and action scripts.
  • Actions Implemented: Implemented 'Enrich Entities' for device data retrieval and 'Ping' for connectivity testing.
  • Configuration and Tooling: Added necessary configuration files, release notes, and updated the ruff configuration to include the new integration.

🧠 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

Marketplace Validation Failed

Click to view the full report

Validation Report

🧩 Integrations
Pre-Build Stage

hcl_big_fix_inventory

Validation Name Details
⚠️ Integration Version Bump New integration project.toml and release_note.yaml version must be initialize to 1.0
⚠️ JSON Result Example Validation Actions with JSON results missing example files in resources/: EnrichEntities

1 similar comment
@github-actions
Copy link
Copy Markdown

Marketplace Validation Failed

Click to view the full report

Validation Report

🧩 Integrations
Pre-Build Stage

hcl_big_fix_inventory

Validation Name Details
⚠️ Integration Version Bump New integration project.toml and release_note.yaml version must be initialize to 1.0
⚠️ JSON Result Example Validation Actions with JSON results missing example files in resources/: EnrichEntities

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 the HCL BigFix Inventory integration, providing actions for entity enrichment and connectivity testing. The review identifies several necessary improvements to align with the repository's style and security standards, including adding missing type annotations, correcting result example file paths, and specifying a Python version range. Furthermore, feedback suggests using json.dumps for robust JSON handling and warns against logging raw response content to prevent potential PII leakage.



@output_handler
def main():
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Missing return type annotation for the main function. According to the style guide, all function parameters and return types must be annotated.

Suggested change
def main():
def main() -> None:
References
  1. All function parameters and return types must be annotated. (link)

information about the entity.
is_mandatory: false
dynamic_results_metadata:
- result_example_path: resources/enrich_entities_JsonResult_example.json
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The result_example_path should point to a file named according to the action filename convention: EnrichEntities_JsonResult_example.json.

-   result_example_path: resources/EnrichEntities_JsonResult_example.json
References
  1. The example file must match the action's filename: action_name.py requires resources/action_name_JsonResult_example.json. (link)



@output_handler
def main():
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Missing return type annotation for the main function. All function parameters and return types must be annotated per the style guide.

Suggested change
def main():
def main() -> None:
References
  1. All function parameters and return types must be annotated. (link)

Comment on lines +15 to +20
from __future__ import annotations
from urllib.parse import urljoin
import requests
from .UtilsManager import validate_response
from .HCLBigFixInventoryParser import HCLBigFixInventoryParser
from .constants import ENDPOINTS
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Add import json and from typing import Any to support type annotations and robust JSON handling.

Suggested change
from __future__ import annotations
from urllib.parse import urljoin
import requests
from .UtilsManager import validate_response
from .HCLBigFixInventoryParser import HCLBigFixInventoryParser
from .constants import ENDPOINTS
from __future__ import annotations
import json
from typing import Any
from urllib.parse import urljoin
import requests
from .UtilsManager import validate_response
from .HCLBigFixInventoryParser import HCLBigFixInventoryParser
from .constants import ENDPOINTS



class HCLBigFixInventoryManager:
def __init__(self, api_root, api_token, verify_ssl, siemplify_logger=None):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Missing type annotations for function parameters and return types. All functions must be annotated according to the style guide.

Suggested change
def __init__(self, api_root, api_token, verify_ssl, siemplify_logger=None):
def __init__(self, api_root: str, api_token: str, verify_ssl: bool, siemplify_logger: Any | None = None) -> None:
References
  1. All function parameters and return types must be annotated. (link)

Comment on lines +118 to +123
"criteria": (
f'{{"or": [["name", "=", "{hostname}"], '
f'["dns_name", "=", "{hostname}"]]}}'
if hostname
else f'{{"or": [["ip_address", "=", "{ip}"]]}}'
),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Avoid manual JSON string construction for the criteria parameter. Using json.dumps is more robust and handles character escaping correctly.

            "criteria": json.dumps(
                {"or": [["name", "=", hostname], ["dns_name", "=", hostname]]}
                if hostname
                else {"or": [["ip_address", "=", ip]]}
            ),

Comment on lines +15 to +17
from __future__ import annotations
import requests
from .HCLBigFixInventoryExceptions import HCLBigFixInventoryException
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Add from typing import Any to support type annotations.

Suggested change
from __future__ import annotations
import requests
from .HCLBigFixInventoryExceptions import HCLBigFixInventoryException
from __future__ import annotations
from typing import Any
import requests
from .HCLBigFixInventoryExceptions import HCLBigFixInventoryException

from .HCLBigFixInventoryExceptions import HCLBigFixInventoryException


def validate_response(response, sensitive_data=None, error_msg="An error occurred"):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Missing type annotations for function parameters and return types. All functions must be annotated according to the style guide.

Suggested change
def validate_response(response, sensitive_data=None, error_msg="An error occurred"):
def validate_response(response: requests.Response, sensitive_data: list[str] | None = None, error_msg: str = "An error occurred") -> bool:
References
  1. All function parameters and return types must be annotated. (link)

if sensitive_data:
raise HCLBigFixInventoryException(
encode_sensitive_data(
str(f"{error_msg}: {error} {error.response.content}"),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

security-medium medium

Avoid logging response.content directly as it may contain PII or secrets. The style guide strictly forbids persisting such information in logs.

Suggested change
str(f"{error_msg}: {error} {error.response.content}"),
str(f"{error_msg}: {error}"),
References
  1. No PII/secrets in logs — don't log response.content directly. (link)

name = "HCLBigFixInventory"
version = "5.0"
description = "HCL BigFix Software Inventory provides valuable insight into what the organization owns and what it has installed but does not own along with how often the software is being used."
requires-python = ">=3.11"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The requires-python field should specify a range to ensure compatibility, as per the repository style guide.

Suggested change
requires-python = ">=3.11"
requires-python = ">=3.11,<3.12"
References
  1. requires-python should be ">=3.11,<3.12". (link)

@github-actions
Copy link
Copy Markdown

Marketplace Validation Failed

Click to view the full report

Validation Report

🧩 Integrations
Pre-Build Stage

hcl_big_fix_inventory

Validation Name Details
⚠️ Integration Version Bump New integration project.toml and release_note.yaml version must be initialize to 1.0
⚠️ JSON Result Example Validation Actions with JSON results missing example files in resources/: EnrichEntities

@github-actions
Copy link
Copy Markdown

Marketplace Validation Failed

Click to view the full report

Validation Report

🧩 Integrations
Pre-Build Stage

hcl_big_fix_inventory

Validation Name Details
⚠️ Integration Version Bump New integration project.toml and release_note.yaml version must be initialize to 1.0
⚠️ JSON Result Example Validation Actions with JSON results missing example files in resources/: EnrichEntities

@github-actions
Copy link
Copy Markdown

Marketplace Validation Failed

Click to view the full report

Validation Report

🧩 Integrations
Pre-Build Stage

hcl_big_fix_inventory

Validation Name Details
⚠️ Integration Version Bump New integration project.toml and release_note.yaml version must be initialize to 1.0
⚠️ JSON Result Example Validation Actions with JSON results missing example files in resources/: EnrichEntities

1 similar comment
@github-actions
Copy link
Copy Markdown

Marketplace Validation Failed

Click to view the full report

Validation Report

🧩 Integrations
Pre-Build Stage

hcl_big_fix_inventory

Validation Name Details
⚠️ Integration Version Bump New integration project.toml and release_note.yaml version must be initialize to 1.0
⚠️ JSON Result Example Validation Actions with JSON results missing example files in resources/: EnrichEntities

@github-actions
Copy link
Copy Markdown

Marketplace Validation Failed

Click to view the full report

Validation Report

🧩 Integrations
Pre-Build Stage

hcl_big_fix_inventory

Validation Name Details
⚠️ Integration Version Bump New integration project.toml and release_note.yaml version must be initialize to 1.0
⚠️ JSON Result Example Validation Actions with JSON results missing example files in resources/: EnrichEntities

@github-actions
Copy link
Copy Markdown

Marketplace Validation Failed

Click to view the full report

Validation Report

🧩 Integrations
Pre-Build Stage

hcl_big_fix_inventory

Validation Name Details
⚠️ Integration Version Bump New integration project.toml and release_note.yaml version must be initialize to 1.0
⚠️ JSON Result Example Validation Actions with JSON results missing example files in resources/: EnrichEntities

1 similar comment
@github-actions
Copy link
Copy Markdown

Marketplace Validation Failed

Click to view the full report

Validation Report

🧩 Integrations
Pre-Build Stage

hcl_big_fix_inventory

Validation Name Details
⚠️ Integration Version Bump New integration project.toml and release_note.yaml version must be initialize to 1.0
⚠️ JSON Result Example Validation Actions with JSON results missing example files in resources/: EnrichEntities

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.

1 participant