Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSONFeedApiModule - Handle a case where No Indicators were Retrieved #38459

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

ShacharKidor
Copy link
Contributor

@ShacharKidor ShacharKidor commented Feb 3, 2025

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

  • In Progress
  • Ready
  • In Hold - (Reason for hold)

Related Issues

fixes: XSUP-46217.

Description

  1. Fixed the following error (described In this issue - XSUP-46217) - by better handling the case where the feed retrieved no indicators (in the JSONFeedApiModule).
Error: [Traceback (most recent call last):
   
   File ""<string>"", line 573, in <module>
   File ""<string>"", line 569, in main
   File ""<string>"", line 499, in feed_main
   File ""<string>"", line 7872, in return_error
 Exception: Error in MalwareBazaar Feed integration ['NoneType' object is not iterable] 
  1. Implemented a retry mechanism for the fetch-indicators command in the MalwareBazaarFeed integration, that catches known server-side and communication errors from MalwareBazaare and starts a retry after 10 seconds.

Must have

  • Tests
  • Documentation

Copy link

github-actions bot commented Feb 3, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
Packs/AccentureCTI_Feed/Integrations/ACTIIndicatorFeed
   ACTIIndicatorFeed.py491079%104, 110, 112–116, 118, 122, 128
Packs/ApiModules/Scripts/JSONFeedApiModule
   JSONFeedApiModule.py2123185%73–75, 111, 170–171, 261–264, 307, 316–317, 319, 335, 339, 341, 351, 358, 365, 368, 411–413, 421–422, 425, 428, 431–433
Packs/FeedGCPWhitelist/Integrations/FeedGoogleIPRanges
   FeedGoogleIPRanges.py80100% 
Packs/FeedMalwareBazaar/Integrations/MalwareBazaarFeed
   MalwareBazaarFeed.py35780%16, 25, 33, 78–81
TOTAL3044884% 

Tests Skipped Failures Errors Time
29 0 💤 0 ❌ 0 🔥 8.248s ⏱️

@ShacharKidor ShacharKidor marked this pull request as ready for review February 10, 2025 16:54
@content-bot
Copy link
Collaborator

This PR was automatically updated by a GitHub Action

  • ApiModules pack version was bumped to 2.2.41.

To stop automatic version bumps, add the ignore-auto-bump-version label to the github PR.

@ShacharKidor
Copy link
Contributor Author

@yuvalbenshalom - As you can see here the retry mechanism is working as expected:
image
image
image
image

Also, the original Exception: Error in MalwareBazaar Feed integration ['NoneType' object is not iterable]
doesn't appear in our logs since I uploaded the change of the JsonFeedApiModule.

@ShacharKidor
Copy link
Contributor Author

@yuvalbenshalom - Please force merge the PR, validation are failing due to:
[RN106] - This ticket -CIAC-12789,
[ST111] - Missing sections headers (not mandatory).

@ShacharKidor ShacharKidor added the ForceMerge Forcing the merge of the PR despite the build status label Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-approved ForceMerge Forcing the merge of the PR despite the build status
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants