Repository navigation
Lumu SecOps Integration - SecOps Operation [update new API] - #46058
Conversation
|
Thank you for your contribution. Your generosity and caring are unrivaled! Make sure to register your contribution by filling the Contribution Registration form, so our content wizard @kamalq97 will know the proposed changes are ready to be reviewed. |
|
Hi @eparralumu, thanks for contributing to the XSOAR marketplace. To receive credit for your generous contribution please follow this link. |
🤖 AI-Powered Code Review AvailableHi @kamalq97, @Benimanela, you can leverage AI-powered code review to assist with this PR! Available Commands:
|
Hi @eparralumu Thank you for your contribution! Please read through and sign our recently updated Contributor License Agreement to enable us to proceed with handling this PR. Regards, |
Benimanela
left a comment
There was a problem hiding this comment.
Hi @eparralumu, Thank you for the work on this contribution. The implementation looks good overall.
I have a few comments from a security perspective at this stage:
General
- Please run
demisto-sdk formaton the changed files to ensure they comply with XSOAR standards.
Integration parameters (LumuSecops.yml)
- Required:
api_key: please usetype: 9(credentials, withhiddenusername: true) instead oftype: 4.mirror_directionadditionalinfo mentions SentinelOne. Please update it to Lumu.
- Recommended:
- Add
section: Connect/section: Collectto the params (docs). max_fetchhas nodisplayand overlaps withtotal_items_per_lumu_fetch/fetch_offset. Please label them clearly or remove the redundant ones.- Please document the permissions/scope the API key requires.
- Add
Release Notes
- Since the integration, incident type, mapper and layout are all new in
1.0.32, please keep a singleNew:entry per entity and drop theChanged:bullets. - The RN header
Lumu SecOpsshould match the integration display name (Lumu Secops).
Incident Fields
- Some new fields appear to duplicate existing Lumu fields, for example:
lumu_secops_company_id/companyIdlumu_secops_status/lumu_statuslumu_secops_description/lumu_description
- If the semantics are the same, please consider reusing the existing fields by associating them with the
LumuSecopstype.
Let me know once you've addressed the feedback so I can review again!
|
🤖 Analysis started. Please wait for results... |
🤖 AI Review DisclaimerThis 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. |
marketplace-ai-reviewer
left a comment
There was a problem hiding this comment.
Hi there! Thanks for submitting this integration for Lumu. I've reviewed your code and found a few areas that need adjustment, primarily around Python best practices, YAML configuration standards, and documentation formatting.
Here are the key areas to focus on:
- Code Quality & Context: Please use safe dictionary access (
.get()), standard parsing functions (likearg_to_datetime), and avoid unbounded loops. Ensure exceptions are raised properly for mirroring and avoid overloading the integration context with large caches. Don't forget to add the missing unit tests! - YAML Standards: Update the configuration to use
type: 9for secrets, implementsectionorderfor newer Cortex versions, and ensure all descriptions follow standard phrasing (active voice, starting with "The"). - Documentation: Move general product overviews and usage examples from the description file to the README, generate command examples, and fix minor copy-paste errors and release note formatting.
Thanks again for your hard work on this, and let me know if you have any questions!
Additionally, please address the following file-level notes:
Packs/Lumu/Integrations/LumuSecops/LumuSecops.yml: - MissingIntegration_description.mdfile.- Please ensure that the
README.mdfile is updated to reflect all the new commands, arguments, and outputs introduced in this YML file, including format examples for time/date outputs. Packs/Lumu/Integrations/LumuSecops/LumuSecops.py: Missing unit tests and unused YAML parameters.Packs/Lumu/pack_metadata.json: - The mandatorycreatedkey is missing from the pack metadata.- The vendor name 'Lumu' is missing from the
keywordslist. Packs/Lumu/ReleaseNotes/1_0_32.md: The version bump does not match the nature of the changes.
@TheL0L, @Benimanela please review and approve the results generated by the AI Reviewer by responding 👍 on this comment.
… close-incident updates - filter out invalid label IDs before incident-list API requests - extend tests
|
For the Reviewer: Trigger build request has been accepted for this contribution PR. |
|
For the Reviewer: Successfully created a pipeline in GitLab with url: https://gitlab.xdr.pan.local/xdr/cortex-content/content/-/pipelines/13869878 |
|
Hi @eparralumu, multiple validations are failing on the new incident fields in What's wrong: a new incident field's
How to fix it:
|
Co-authored-by: Sergei Yakima <sergeiyakima1@gmail.com>
- Rename new LumuSecops incident field display names to start with Lumu (case-sensitive requirement), including Lumu SecOps Take Status Action. - Keep existing cliName and id values unchanged to preserve layouts/mirroring compatibility. - Update classifier-mapper-incoming-LumuSecops.json mapping keys to exactly match new field display names. - Fix invalid mapper targets from lumu_secops_description / lumu_secops_incident_id to lumu_description / lumu_incidentId. - Update ReleaseNotes/2_0_0.md to reflect new field display names.
Benimanela
left a comment
There was a problem hiding this comment.
Hi @eparralumu, Thank you for addressing the previous feedback. The type 9 credentials, sections, field reuse and naming all look good now.
I have a few remaining comments from a security perspective:
General
- Please run
demisto-sdk formaton the changed files to ensure they comply with XSOAR standards.
Mapper (classifier-mapper-incoming-LumuSecops.json)
- Required:
lumu_status,Source StatusandStateare mapped fromstatus, but on fetchnormalize_incident_recordoverwritesstatuswithIncidentStatus.ACTIVE(1). The original Lumu status is stored inlumu_secops_status. Please map these fields fromlumu_secops_status.lumu_statusonly has the optionsmute/unmute. Please extend its select values to cover the SecOps statuses (e.g.open,muted,closed).
- Recommended:
statusTimestampis mapped, but that field is only associated with theLumutype. Please addLumuSecopsto itsassociatedTypesor remove the mapping.
Integration parameters (LumuSecops.yml)
- Required:
api_key: please adddisplaypassword: API Keyso the key field is labelled correctly withhiddenusername: true.
Release Notes (2_0_0.md)
- Required: The RN still includes development history. Please keep a single
New:line per new entity (integration, incident type, classifier, mapper, layout, each new field) and remove:- the duplicated classifier, mapper and layout lines
- the "Updated…" / "Fixed
lumu_secops_statusmapping" bullets (that field no longer exists) - the un-headed bullet list at the end of the Incident Fields section
Pack Metadata
- Recommended:
- Please remove the
createdkey. It shouldn't be set manually for an existing pack.
- Please remove the
Let me know once you've addressed the feedback so I can review again!
…cident type, classifier, mapper, layout, and each new field) - Remove duplicated classifier/mapper/layout entries
@Benimanela , we think we are finish the latest changes requests |
|
For the Reviewer: Trigger build request has been accepted for this contribution PR. |
|
For the Reviewer: Successfully created a pipeline in GitLab with url: https://gitlab.xdr.pan.local/xdr/cortex-content/content/-/pipelines/14070829 |
3d0464c
into
demisto:contrib/eparralumu_lumu
|
Thank you for your contribution. Your external PR has been merged and the changes are now included in one or more internal PRs for further review. Note Contributions containing XSIAM content (Modeling Rules, Parsing Rules, Correlation Rules, or Dashboards) are subject to an additional review process and may take longer to be merged to master. |
* Lumu SecOps Integration - SecOps Operation [update new API] (#46058) * Lumu SecOps Integration - SecOps Operation [update new API] * add CONTRIBUTORS.json * Address security review updates for LumuSecops integration - Updated LumuSecops.yml security/config UX: - Changed api_key to credential type (type: 9) with hiddenusername: true. - Added parameter sections (Connect / Collect) and sectionorder. - Set fetch defaults and improved collect-time parameter grouping/labels. - Reused existing Lumu incident fields for Secops by associating LumuSecops with: - companyId, lumu_status, lumu_description, lumu_incidentId. - Updated classifier/mapper and layout artifacts to align with new LumuSecops incident mapping and UI. - Updated release notes for 1.0.32: - Header changed to Lumu Secops (display-name match). - Converted previous Changed: notes to New: for newly introduced entities/components. - Reformatted generated content artifacts (README/layout JSON) as part of staged updates. * Refactor LumuSecops to reuse existing Lumu incident fields - Remove duplicate LumuSecops incident fields: - lumu_secops_company_id - lumu_secops_description - lumu_secops_incident_id - lumu_secops_status - Update incoming mapper to stop mapping removed duplicate Secops field keys. - Keep Secops mapping focused on non-duplicated, Secops-specific fields. - Simplify integration fetch parameter configuration and labels in LumuSecops.yml. - Regenerate/update README.md to reflect current integration parameter definitions. * Harden LumuSecops input handling and refine integration configuration - Added HTML escaping in comment/description rendering paths to reduce injection risk in generated incident content. - Refactored fetch normalization flow to pass mirroring context explicitly (integration_instance, mirror_direction, mirror_tags) instead of relying on module-level globals. - Improved argument parsing robustness by using arg_to_number for label and fetch-size numeric inputs. - Switched to typed platform constants for incident defaults (IncidentSeverity.MEDIUM, IncidentStatus.ACTIVE). - Replaced direct return_error path in remote-data rate-limit handling with a dedicated CustomLumuException. - Updated LumuSecops.yml docs/parameter metadata (including mirror direction wording from SentinelOne -> Lumu) and regenerated README.md. - Removed obsolete helper test (add_prefix_to_comment) and aligned metadata update in Packs/Lumu/pack_metadata.json. * - Update LumuSecops integration documentation in Packs/Lumu/Integrations/LumuSecops/LumuSecops.yml: - Clarify multiple output date fields as ISO 8601 timestamps. - Clarify list-style args (adversary_types, labels, status) as comma-separated values. - Mark lumusecops-get-cache as hidden/internal and improve its description. - Improve cache reset behavior in Packs/Lumu/Integrations/LumuSecops/LumuSecops.py: - Replace partial cache reset with full expected cache structure (cache, lumu_secops_incident_ids, source_records, users, labels). - Clean up Python code and tests: - Remove unused urllib3 import in Packs/Lumu/Integrations/LumuSecops/LumuSecops.py. - Remove unused add_prefix_to_comment import in Packs/Lumu/Integrations/LumuSecops/LumuSecops_test.py. - Apply formatting/whitespace cleanup and line wrapping. - Refresh command examples in Packs/Lumu/Integrations/LumuSecops/command_examples.txt with updated sample IDs/labels. - Add pack keywords in Packs/Lumu/pack_metadata.json for better discoverability. * add lumusecops-clear-cache and align YAML/README description active voice writing * major version bump to 2.0.0 with LumuSecops updates and release note cleanup * lazy-load users/labels in remote sync and tighten test-module cache init * Convert string arguments to integers. * Added documentation blocks (command example, context example, human-readable output) for multiple commands. New example sections were added for: - lumusecops-retrieve-labels - lumusecops-retrieve-a-specific-label - lumusecops-mark-incident-as-read - lumusecops-begin-incident-work - lumusecops-comment-incident - lumusecops-mute-incident - lumusecops-unmute-incident - lumusecops-close-incident * - add wipe_cache() and invoke it after get-remote-data processing and close-incident updates - filter out invalid label IDs before incident-list API requests - extend tests * fix identantion * integration description updated * Update Packs/Lumu/pack_metadata.json Co-authored-by: Sergei Yakima <sergeiyakima1@gmail.com> * Fix LumuSecops incident field naming, mapper keys - Rename new LumuSecops incident field display names to start with Lumu (case-sensitive requirement), including Lumu SecOps Take Status Action. - Keep existing cliName and id values unchanged to preserve layouts/mirroring compatibility. - Update classifier-mapper-incoming-LumuSecops.json mapping keys to exactly match new field display names. - Fix invalid mapper targets from lumu_secops_description / lumu_secops_incident_id to lumu_description / lumu_incidentId. - Update ReleaseNotes/2_0_0.md to reflect new field display names. * - Keep a single New: line per new entity in 2_0_0.md (integration, incident type, classifier, mapper, layout, and each new field) - Remove duplicated classifier/mapper/layout entries * fix some tests and reach the test coverage quota --------- Co-authored-by: Sergei Yakima <sergeiyakima1@gmail.com> * revert single line format change * fix validation * update docker image * fix validations * revert single line format change * fix validation * revert outdated metadata field --------- Co-authored-by: eparralumu <123758248+eparralumu@users.noreply.github.com> Co-authored-by: Sergei Yakima <sergeiyakima1@gmail.com> Co-authored-by: Sergei Yakima <syakima@paloaltonetworks.com>
Contributing to Cortex XSOAR Content
Make sure to register your contribution by filling the contribution registration form
The Pull Request will be reviewed only after the contribution registration form is filled.
Status
Related Issues
N/A
Description
Second version of Lumu Pack, include new Lumu SecOps Integration with its Layout, IncidentType, IncidentFields, Classifier, Mapping and Integration sections, check the introductory video https://www.youtube.com/watch?v=m1xki-jioI8
This update intends to use our latest Incident API. The old API is still supported but we intend to ease the transition for our customers. The integration will function like the current one but will use a broader range of incident types and the new infrastructure; however, the essence remains the same by using the Cortex XSOAR mirroring capabilities.
Must have
relates: https://jira-dc.paloaltonetworks.com/browse/CIAC-18495