Repository navigation
Fix ParseEmailFilesV2 root attachment parsing - #46012
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 @otsimed-contribute, thanks for contributing to the XSOAR marketplace. To receive credit for your generous contribution please follow this link. |
🤖 AI-Powered Code Review AvailableHi @kamalq97, you can leverage AI-powered code review to assist with this PR! Available Commands:
|
|
Hello @otsimed-contribute, thank you for your contribution. I have started the review, and would like to clarify the justification for Soon I will post the full review. |
|
Additionally, please note that the terms listed in the CLA have been updated.
|
|
🤖 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! Thanks for your contribution to the ParseEmailFilesV2 script. I've left a few notes to help polish the code and documentation before we can merge.
Mainly, please ensure you use .get() for safe dictionary access, fix a variable shadowing issue, and add the missing type hints. You'll also need to adjust the release notes formatting and remove internal test documentation from the README.
Thanks again for your hard work on this!
Additionally, please address the following file-level notes:
Packs/CommonScripts/ReleaseNotes/1_22_58.md: The release notes filename1_22_58.mddoes not match thecurrentVersioninpack_metadata.json.
@TheL0L please review and approve the results generated by the AI Reviewer by responding 👍 on this comment.
|
For the Reviewer: Successfully created a pipeline in GitLab with url: https://gitlab.xdr.pan.local/xdr/cortex-content/content/-/pipelines/13751687 |
TheL0L
left a comment
There was a problem hiding this comment.
Thank you @otsimed-contribute for addressing my previous comments.
I have reviewed the contribution once more and left 2 comments.
Once these are addressed we can proceed with merging the PR.
406f52e to
ba51f17
Compare
|
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/13814142 |
|
All contributors must sign the CLA for their contributions to be accepted.
|
TheL0L
left a comment
There was a problem hiding this comment.
Thank you @otsimed-contribute for the continued cooperation!
I have reviewed the changes, and we can move forward.
While automatic build workflows validate the changes, please prepare a demo.
We can schedule a meeting or you can share a video recording.
Feel free to reach out to me here or via our Slack DFIR Community.
PA.recording-20261020_153209UTC-Meeting.Recording-compressed.mp4 |
|
Thank you @otsimed-contribute for the detailed demo. |
|
Yep, I have! |
|
Sorry for the inconvenience @otsimed-contribute, but it looks like the CLA was not submitted. Please note that it must be submitted via this specific link as it is tied to this PR. Also note that the copilot agent is listed in the required signatures. Please try once more, and if it does not work, you can open a new contribution PR with a single clean commit authored by you. Once again, sorry for the inconvenience. |
…marked as an attachment The email parser handles an email whose top-level part has 'Content-Disposition: attachment' as a single attachment, so the emails attached to it are not parsed, and their files contain a placeholder instead of the email. If such an email contains an attached email (message/rfc822), the script parses a copy of the file without that header, so the parser handles it as a regular email. Other emails are parsed as before.
…rked as an attachment Adds a synthetic email whose top-level part is marked as an attachment and has an attached email (test_data/reported_message_root_attachment.eml, which attaches test_data/original_message.eml), and tests for the parsed emails, the saved attachments, parse_only_headers, and the copy of the file.
…ctet-stream The parser also parses an attached application/octet-stream file named .eml as an email, so such an email is handled as well, as in a regular email. text/plain files are not parsed as emails by the parser, so they are not handled.
…el part Use get_content_disposition(), which returns only the disposition type, in lowercase, as suggested in the review: the type is case-insensitive (RFC 2183), and a parameter which contains "attachment" (for example, the file name) does not mark the part as an attachment.
Bumps the pack version to 1.22.65 and adds the release notes for the ParseEmailFilesV2 fix.
ba51f17 to
d629675
Compare
Summary
.emlpayloads when MIME parsing returns serialized message objects, then parse nested emails while respecting max depth and nesting selection.Validation
ParseEmailFilesV2_test.py: 33 passed.demisto-sdk formatanddemisto-sdk validate: passed (Docker unavailable for Docker-dependent checks).relates: https://jira-dc.paloaltonetworks.com/browse/CIAC-18446