Skip to content

[Marketplace Contribution] Kibana#43781

Open
xsoar-bot wants to merge 3 commits intodemisto:contrib/xsoar-contrib_whsmith1223-contrib-Kibanafrom
xsoar-contrib:whsmith1223-contrib-Kibana
Open

[Marketplace Contribution] Kibana#43781
xsoar-bot wants to merge 3 commits intodemisto:contrib/xsoar-contrib_whsmith1223-contrib-Kibanafrom
xsoar-contrib:whsmith1223-contrib-Kibana

Conversation

@xsoar-bot
Copy link
Copy Markdown
Contributor

@xsoar-bot xsoar-bot commented Apr 8, 2026

Status

  • In Progress
  • Ready
  • In Hold - (Reason for hold)

Contributor

@whsmith1223

Description

This pack allows for using Elastic Security for SIEM for security operations management. It also allows for searching Elastic logs.

Notes

These contributions help to boost the severe lack of SIEM capabilities with the Elasticsearch v2 integration. By adding support for Kibana API commands, users can integrate into case management and much more than simple log searching that exists today.

Auto-Generated Documentation Requiring Modification

Video Link

Short demo video of the Pack usage. Speeds up the review. Optional but recommended. Use a video sharing service such as Google Drive or YouTube.

relates: https://jira-dc.paloaltonetworks.com/browse/CIAC-16481

@content-bot content-bot added Contribution Thank you! Contributions are always welcome! External PR Community Support Level Indicates that the contribution is for Community supported pack labels Apr 8, 2026
@content-bot content-bot changed the base branch from master to contrib/xsoar-contrib_whsmith1223-contrib-Kibana April 8, 2026 21:28
@content-bot content-bot requested a review from kamalq97 April 8, 2026 21:28
@content-bot
Copy link
Copy Markdown
Contributor

Thank you for your contribution. Your generosity and caring are unrivaled! Rest assured - our content wizard @kamalq97 will very shortly look over your proposed changes.
For your convenience, here is a link to the contributions SLAs document.

@content-bot
Copy link
Copy Markdown
Contributor

Thanks for contributing to the XSOAR marketplace. To receive credit for your generous contribution, please ask the reviewer to update your information in the pack contributors file. See more information here link

@content-bot
Copy link
Copy Markdown
Contributor

🤖 AI-Powered Code Review Available

Hi @kamalq97, you can leverage AI-powered code review to assist with this PR!

Available Commands:

  • @marketplace-ai-reviewer start review - Initiate a full AI code review
  • @marketplace-ai-reviewer re-review - Incremental review for new commits

@content-bot content-bot added the Contribution Form Filled Whether contribution form filled or not. label Apr 8, 2026
@whsmith1223
Copy link
Copy Markdown

This can be assigned to Barry Yosilevich since we were working on a similar request previously.

@kamalq97 kamalq97 assigned barryyosi-panw and unassigned kamalq97 Apr 9, 2026
@kamalq97 kamalq97 requested review from barryyosi-panw and removed request for kamalq97 April 9, 2026 06:20
@barryyosi-panw
Copy link
Copy Markdown
Contributor

Hi @whsmith1223, please rename the pack to CommunityElasticSearch to reflect this is the community complementary pack for the official ElasticSearch pack.

@barryyosi-panw barryyosi-panw added ready-for-instance-test In contribution PRs, this label will cause a trigger of a build with a modified pack from the PR. ready-for-ai-review The PR is ready for reviewing the PR with the AI Reviewer. labels Apr 13, 2026
@marketplace-ai-reviewer marketplace-ai-reviewer removed the ready-for-ai-review The PR is ready for reviewing the PR with the AI Reviewer. label Apr 13, 2026
@marketplace-ai-reviewer
Copy link
Copy Markdown
Contributor

🤖 Analysis started. Please wait for results...

@content-bot
Copy link
Copy Markdown
Contributor

For the Reviewer: Trigger build request has been accepted for this contribution PR.

@content-bot
Copy link
Copy Markdown
Contributor

For the Reviewer: Successfully created a pipeline in GitLab with url: https://gitlab.xdr.pan.local/xdr/cortex-content/content/-/pipelines/8222051

@content-bot content-bot removed the ready-for-instance-test In contribution PRs, this label will cause a trigger of a build with a modified pack from the PR. label Apr 13, 2026
@marketplace-ai-reviewer
Copy link
Copy Markdown
Contributor

🤖 AI Review Disclaimer

This review was generated by an AI-powered tool and may contain inaccuracies. Please be advised, and we extend our sincere apologies for any inconvenience this may cause.

Copy link
Copy Markdown
Contributor

@marketplace-ai-reviewer marketplace-ai-reviewer left a comment

Choose a reason for hiding this comment

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

Hi there! Thanks for contributing the new Kibana integration to the CommunityElasticSearch pack. I've reviewed your submission and found a few architectural and security items that need to be addressed before we can merge.

Here are the main areas to focus on:

  • Architecture & Testing: Please refactor the integration to use the standard ContentClient class instead of direct requests, ensure demisto.params() is only called once inside main(), and include unit tests for your commands.
  • Security & Code Quality: Avoid hardcoding authentication or SSL bypasses, remove log statements that might expose sensitive credentials, and fix the missing imports and undefined variables.
  • Metadata & Documentation: Update the pack metadata with required fields (categories, keywords, support info), remove the package-lock.json, and regenerate the documentation using the demisto-sdk to include command examples.

Thanks again for your hard work on this!

Additionally, please address the following file-level notes:

  • Packs/CommunityElasticSearch/Integrations/Kibana/package-lock.json: Please remove the package-lock.json file.
  • Packs/CommunityElasticSearch/pack_metadata.json: - Please add a support email and vendor URL to the pack metadata.
  • Please add relevant categories and keywords to the pack metadata.
  • Packs/CommunityElasticSearch/Integrations/Kibana/Kibana.py: - New integrations must use a Client class inheriting from ContentClient (from CommonServerPython) instead of standalone functions and direct requests calls. This standardizes HTTP requests, proxy handling, and SSL verification.
  • All new commands and helpers must have unit tests. Please add a Kibana_test.py file with pytest tests covering the new functionality.

@barryyosi-panw please review and approve the results generated by the AI Reviewer by responding 👍 on this comment.


# Disable insecure warnings
urllib3.disable_warnings()
warnings.filterwarnings(action="ignore", message=".*using SSL with verify_certs=False is insecure.")
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.

Disabling SSL warnings globally is discouraged. SSL verification should be controlled by the insecure parameter from the integration configuration, and handled by the ContentClient.

urllib3.disable_warnings()
warnings.filterwarnings(action="ignore", message=".*using SSL with verify_certs=False is insecure.")

PARAMS = demisto.params()
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.

  • demisto.params() must be called exactly once per script execution, typically within main(). Please move this inside main() and pass the required parameters to your functions or Client class.
  • Missing definitions for INSECURE and TIMEOUT.

"verify_certs": INSECURE,
"timeout": TIMEOUT,
}
demisto.debug(f"Building Elasticsearch client with args: {connection_args}")
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.

Logging connection_args directly can expose sensitive credentials like api_key or basic_auth. Please redact sensitive keys before logging or remove this log statement entirely.

query_params = {"status": status, "severity": severity, "from": from_time}

try:
response = requests.get(
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.

Direct use of the requests library bypasses XSOAR's built-in proxy/SSL configurations and lacks mandatory timeout handling. Please use the _http_request method from a ContentClient class, or wrap this call in a try/except requests.exceptions.Timeout block and implement retries.

# output results to markdown table
md = tableToMarkdown("Kibana Cases", json_data, headers=[])

result = CommandResults(readable_output=md, outputs_prefix="Kibana.Cases", outputs=json_data)
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.

The CommandResults object is missing the raw_response argument. Please include raw_response=json_data to ensure the raw data is available in the context.


| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| email_wildcard | Full or partial email address to search for user with. (i.e. william.smith@*). | Required |
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.

Consider using e.g., instead of i.e. when providing an example.

Suggested change
| email_wildcard | Full or partial email address to search for user with. (i.e. william.smith@*). | Required |
| email_wildcard | Full or partial email address to search for user with. (e.g., william.smith@*). | Required |


| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| case_id | The case ID to retrieve information for. View available case IDs with kibana_find_cases. | Required |
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.

The command name should use kebab-case (kibana-find-cases) instead of snake_case (kibana_find_cases).

Suggested change
| case_id | The case ID to retrieve information for. View available case IDs with kibana_find_cases. | Required |
| case_id | The case ID to retrieve information for. View available case IDs with kibana-find-cases. | Required |

Additionally, it appears this README might be hand-written or generated without examples, as standard sections like Command example and Human Readable Output are missing. Please consider regenerating the documentation with examples using the SDK:
demisto-sdk generate-docs --insecure -e <path/to/command_examples.txt>

"url": "",
"email": "",
"created": "2026-04-08T21:25:31Z",
"categories": [],
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.

The categories field is mandatory and cannot be empty. Please add at least one valid category.

"categories": [],
"tags": [],
"useCases": [],
"keywords": [],
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.

The vendor's name (e.g., Elastic) must appear in the keywords list.

@@ -0,0 +1 @@
These contributions help to boost the lack of SIEM capabilities with the Elasticsearch v2 integration. By adding support for Kibana API commands, users can integrate into case management and much more than simple log searching.
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.

Consider expanding this README to include a structured overview of the pack's capabilities.

@barryyosi-panw
Copy link
Copy Markdown
Contributor

@whsmith1223 please address the comments left by the AI Review so we can proceed with the rest of the review process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community Support Level Indicates that the contribution is for Community supported pack Contribution Form Filled Whether contribution form filled or not. Contribution Thank you! Contributions are always welcome! External PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants