MetaDefender Aether#43893
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 @anikobartos, 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:
|
…content into MetaDefender-Aether
|
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/8461914 |
|
🤖 Analysis started. Please wait for results... |
|
Validate summary Verdict: PR can be force merged from validate perspective? ❌ |
🤖 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.
🔄 Re-reviewing updates...
Important
To maintain review integrity, threads marked as Resolved without accompanying changes or explanations will be automatically unresolved for further verification.
Hi! Thanks for contributing to the OPSWAT MetaDefender Aether integration. I've left a few notes, primarily regarding the dynamic timeout implementation; using a global variable won't update the @polling_function decorator as intended, and the tests need to verify the actual polling behavior rather than just the variable update. There are also a few minor tweaks needed, such as adding a missing traceback import and using named arguments in the command examples. Let me know if you have any questions!
@kamalq97, @idovandijk, @melamedbn, @anikobartos, @marketplace-ai-reviewer please review and approve the results generated by the AI Reviewer by responding 👍 on this comment.
|
|
||
|
|
||
| def scan_command(client: Client, args: dict[str, Any]): | ||
| global TIMEOUT |
There was a problem hiding this comment.
Modifying a global variable here will not affect the timeout parameter of the @polling_function decorator.
| mocker.patch.object(ScheduledCommand, "raise_error_if_not_supported", return_value=None) | ||
|
|
||
| MD_Aether.scan_command(client, {"url": "https://example.com", "timeout": "120"}) | ||
| assert MD_Aether.TIMEOUT == 120 |
There was a problem hiding this comment.
This test verifies the global variable update, but does not test if the polling mechanism actually uses the new timeout.
|
|
||
| elif entry_id := args.get("entry_id"): | ||
| try: | ||
| file_entry = demisto.getFilePath(entry_id) |
There was a problem hiding this comment.
Explicitly import the traceback module.
|
|
||
| @polling_function( | ||
| name=demisto.command(), | ||
| timeout=TIMEOUT, |
There was a problem hiding this comment.
Using a global variable here does not allow dynamic timeouts.
| !metadefender-aether-scan-url url="https://www.google.com" timeout="600" | ||
| !metadefender-aether-search-query query=834d1dbfab8330ea5f1844f6e905ed0ac19d1033ee9a9f1122ad2051c56783dc | ||
| !metadefender-aether-search-query https://www.google.com limit=3 | ||
| !metadefender-aether-search-query https://www.google.com page=1 page_size=20 No newline at end of file |
There was a problem hiding this comment.
Please use named arguments instead of positional arguments for clarity. Also, it looks like the trailing newline was removed entirely; please ensure the file ends with a single newline character.
| !metadefender-aether-search-query https://www.google.com page=1 page_size=20 | |
| !metadefender-aether-search-query query=https://www.google.com page=1 page_size=20 | |
f7325bb
into
demisto:contrib/anikobartos_MetaDefender-Aether
|
Thank you for your contribution. Your external PR has been merged and the changes are now included in an internal PR for further review. The internal PR will be merged to the master branch within 3 business days. |
* MetaDefender Aether (#43893) * Add Aether image, pack_metadata, readme * secret and pack ignore * Add Aether pack, refresh test files * test correction. extension to command_examples * Deprecate MetaDefender Sandbox * typos and code clean * add format * ruff format * UP038 correction * lint and test fix * new line at the end of readme * readme format * format integration Readme * playbook fix * add OPSWAT to metadata * grammar corrections * test files correction * grammar corrections * remove duplication and trailing line * add package intro to the beginning of the description file * use contentclient, extend verdict names in search, simplify polling * move out timeout from polling * use fastapi * add more test cases * fix test and remove global timeout change * Update .secrets-ignore --------- Co-authored-by: Aniko Bartos <aniko.bartos@opswat.com> Co-authored-by: Kamal Qarain <45042524+kamalq97@users.noreply.github.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
There is no related issue
Description
The new product name is MetaDefender Aether.
(MetaDefender Sandbox → MetaDefender Aether)
Small change: Use the threat-level to determine maliciousness; it’s more reliable than the verdict string.
Must have
relates: https://jira-dc.paloaltonetworks.com/browse/CIAC-16555