Conversation
…/IntelOwl into update-abuse-ch-services
drosetti
reviewed
Jan 16, 2025
Contributor
drosetti
left a comment
There was a problem hiding this comment.
I noticed in every analyzer you add the field _service_api_key and the code:
headers.setdefault("Auth-Key", service_api_key)
in most of the analyzers. I have a question: do you think a base class extended by all the analyzers is an improvement ? The piece of code are just two lines (and the second one is not in all the analyzers), but all of them are based on Abuse.ch so its' logical they share something. What do you think about it ? Could it be a useful refactor or just my fussiness ?
Contributor
Author
|
No, you're right. It would be a nice refactoring. |
drosetti
requested changes
Jan 16, 2025
drosetti
requested changes
Jan 16, 2025
drosetti
approved these changes
Jan 17, 2025
pranjalg1331
pushed a commit
to pranjalg1331/IntelOwl
that referenced
this pull request
Jan 25, 2025
* Added service_api_key parameter and migrations * Added mb_get and mb_google * Added logging for api key * Fix deepsource warning * WAD Analyzer, Closes intelowlproject#814 (intelowlproject#2655) * WAD Analyzer, Closes intelowlproject#814 * Remove WAD from FREE_TO_USE_ANALYZERS playbook * Update WAD maximum_tlp to CLEAR * Fix WAD monkeypatch * Update WAD error message to a more generic one * Update migration number and dependencies * Added service_api_key parameter and migrations * Added mb_get and mb_google * Added logging for api key * Fix deepsource warning * Fixed migration number * Removed wrongly duplicated migration * Added other analyzers to reverse_migrate * Added common mixin and updated code accordingly * Solved MRO * Deepsource * Made mixin compatible with ingestors * Removed inheritance from analyzers * Added missing return statement * Removed old configs and used a property * Left behind values * Added explainatory comment --------- Co-authored-by: Pragati Raj <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Abuse.ch changed their API adding a new option to provide an optional key.
Added this option to all impacted services: Feodo Tracker, URLHaus, ThreatFox, URLhaus and YARAify across observable and file analyzers and ingestors.
Type of change
Please delete options that are not relevant.
Checklist
developdumpplugincommand and added it in the project as a data migration. ("How to share a plugin with the community")test_files.zipand you added the default tests for that mimetype in test_classes.py.FREE_TO_USE_ANALYZERSplaybook by following this guide.urlthat contains this information. This is required for Health Checks._monkeypatch()was used in its class to apply the necessary decorators.MockUpResponseof the_monkeypatch()method. This serves us to provide a valid sample for testing.Black,Flake,Isort) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.testsfolder). All the tests (new and old ones) gave 0 errors.DeepSource,Django Doctorsor other third-party linters have triggered any alerts during the CI checks, I have solved those alerts.Important Rules