fix: tableToMarkdown IndexError when single-key dict value is empty list#43751
fix: tableToMarkdown IndexError when single-key dict value is empty list#43751MosheEichler wants to merge 5 commits intomasterfrom
Conversation
When tableToMarkdown is called with a single-key dict whose value is an empty list and no explicit headers, the function unpacks the dict value into t=[], then crashes with IndexError: list index out of range at t[0]. Fix: only unpack the list value when it is non-empty. Fixes XSUP-66388
🤖 AI-Powered Code Review AvailableYou can leverage AI-powered code review to assist with this PR! Available Commands:
|
|
🤖 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.
Thanks for your contribution! I've reviewed the changes and found a couple of minor adjustments needed. Specifically, the table formatting logic needs a slight tweak to properly return a "No entries." message for empty lists instead of an empty row, and the pack metadata is missing the vendor name in its keywords. Let me know if you have any questions about these updates!
Additionally, please address the following file-level notes:
Packs/Base/pack_metadata.json: The vendor name ('Cortex' or 'XSOAR') is missing from thekeywordslist. Please add it to improve searchability.
@DeanArbel please review and approve the results generated by the AI Reviewer by responding 👍 on this comment.
Co-authored-by: Richard Bluestone <53567272+richardbluestone@users.noreply.github.com>
|
Validate summary Verdict: PR can be force merged from validate perspective? ✅ |
Status
Related Issues
https://jira-dc.paloaltonetworks.com/browse/XSUP-66388
Description
issue: When tableToMarkdown is called with a single-key dict whose value is an empty list and no explicit headers, the function unpacks the dict value into t=[], then crashes with IndexError: list index out of range at t[0].
Fix: Only unpack the list value when it is non-empty.
Related PRs
It's a continuation of this PR
Must have