Skip to content

Syakima/CIAC-15740/forcepoint-add-refresh-command#43628

Draft
TheL0L wants to merge 15 commits into
masterfrom
syakima/CIAC-15740/forcepoint-add-refresh-command
Draft

Syakima/CIAC-15740/forcepoint-add-refresh-command#43628
TheL0L wants to merge 15 commits into
masterfrom
syakima/CIAC-15740/forcepoint-add-refresh-command

Conversation

@TheL0L
Copy link
Copy Markdown
Contributor

@TheL0L TheL0L commented Mar 23, 2026

Related Issues

fixes: CIAC-15740

Description

Add polling command for refreshing engines.

@content-bot
Copy link
Copy Markdown
Contributor

🤖 AI-Powered Code Review Available

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

@TheL0L TheL0L self-assigned this Mar 23, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 25, 2026

Coverage

Coverage Report
FileStmtsMissCoverMissing
Packs/ForcepointSecurityManagementCenter/Integrations/ForcepointSecurityManagementCenter
   ForcepointSecurityManagementCenter.py4089476%41–44, 48–49, 53, 61–62, 67–68, 118, 124, 146–151, 153–154, 262, 264, 331, 411, 413, 497, 499, 611, 613, 654, 708, 783, 785, 787, 911–917, 919–924, 926, 928–969, 971–972, 974
TOTAL4089476% 

Tests Skipped Failures Errors Time
39 0 💤 0 ❌ 0 🔥 2.572s ⏱️

@TheL0L TheL0L requested a review from kamalq97 March 25, 2026 12:54
@TheL0L TheL0L added python Pull requests that update Python code ready-for-ai-review The PR is ready for reviewing the PR with the AI Reviewer. labels Mar 25, 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 Mar 25, 2026
@marketplace-ai-reviewer
Copy link
Copy Markdown
Contributor

🤖 Analysis started. Please wait for results...

@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.

Thanks for your contribution to the Forcepoint SMC integration! I've reviewed the PR and found a few logic and configuration adjustments needed.

Specifically, please ensure demisto.args() isn't evaluated at module load time, verify task success statuses when polling finishes, and fix the CommandResults initialization to use readable_output instead of outputs_prefix. You'll also need to align the task_ids argument name between the YAML and Python script, store it as a comma-separated string to avoid serialization issues, and update the pack metadata with the required XSOAR fields.

Let me know if you have any questions about these changes!

Additionally, please address the following file-level notes:

  • Packs/ForcepointSecurityManagementCenter/pack_metadata.json: - The url field must be set to https://www.paloaltonetworks.com/cortex for XSOAR-supported packs.
  • The vendor name 'Forcepoint' must be included in the keywords list.
  • The mandatory created key is missing from the pack metadata.

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

demisto.debug("Completed task initiation.")
demisto.debug(f"Initiated refresh tasks for engines {', '.join(engine_names)}.")
demisto.debug(f"Tasks IDs: {task_ids}")
args["task_ids"] = task_ids
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.

Store task_ids as a comma-separated string to avoid serialization issues.

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.

@TheL0L I would also recommend doing this (also ensures the order is kept and not changed).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@kamalq97 Can we guarantee that the ids will not have commas within them, and if they do - escape them?

assert result.scheduled_command._command == "forcepoint-smc-engine-refresh"
assert result.scheduled_command._args is not None
assert "task_ids" in result.scheduled_command._args
assert result.scheduled_command._args["task_ids"] == ["engine1", "engine2"]
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.

Update test to expect a comma-separated string.

assert result.scheduled_command._command == "forcepoint-smc-engine-refresh"
assert result.scheduled_command._args is not None
assert "task_ids" in result.scheduled_command._args
assert result.scheduled_command._args["task_ids"] == ["engine1"]
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.

Update test to expect a comma-separated string.

@kamalq97 kamalq97 added enhancement ready-for-pipeline-running Whether the pr is ready for running the whole pipeline, including testing on SAAS machines labels Mar 25, 2026
Copy link
Copy Markdown
Contributor

@kamalq97 kamalq97 left a comment

Choose a reason for hiding this comment

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

@TheL0L Great job! Ensure all comments from me and the @marketplace-ai-reviewer are addressed. Please also fix all validation errors.
Once done, we'll proceed to the next steps.

demisto.debug("Completed task initiation.")
demisto.debug(f"Initiated refresh tasks for engines {', '.join(engine_names)}.")
demisto.debug(f"Tasks IDs: {task_ids}")
args["task_ids"] = task_ids
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.

@TheL0L I would also recommend doing this (also ensures the order is kept and not changed).

Comment thread Packs/ForcepointSecurityManagementCenter/ReleaseNotes/1_0_9.md Outdated
TheL0L and others added 4 commits March 26, 2026 13:32
@content-bot
Copy link
Copy Markdown
Contributor

Validate summary
The following errors were thrown as a part of this pr: .
If the AG100 validation in the pre-commit GitHub Action fails, the pull request cannot be force-merged.

Verdict: PR can be force merged from validate perspective? ✅

@TheL0L TheL0L requested a review from richardbluestone April 13, 2026 09:08
@richardbluestone richardbluestone requested review from julieschwartz18 and removed request for richardbluestone April 13, 2026 11:02
Copy link
Copy Markdown
Contributor

@julieschwartz18 julieschwartz18 left a comment

Choose a reason for hiding this comment

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

@TheL0L Doc review complete. Please check the comments and also regenerate the integration README file. In the meantime, adding the label docs-approved

Comment thread Packs/ForcepointSecurityManagementCenter/ReleaseNotes/1_0_9.md Outdated
TheL0L and others added 2 commits April 14, 2026 14:48
Co-authored-by: julieschwartz18 <91824591+julieschwartz18@users.noreply.github.com>
@content-bot
Copy link
Copy Markdown
Contributor

This PR is marked as 'Stale' because it has been open for 30 days with no activity, it will be automatically closed in 15 days if no activity will be done. To reset the counter just remove the 'Stale' label or make changes to update this PR. If you wish this PR will never be marked as 'Stale' add the 'Ignore Stale'

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

Labels

docs-approved enhancement python Pull requests that update Python code ready-for-pipeline-running Whether the pr is ready for running the whole pipeline, including testing on SAAS machines Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants