-
-
Notifications
You must be signed in to change notification settings - Fork 504
Update abuse.ch services #2683
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
Update abuse.ch services #2683
Conversation
…/IntelOwl into update-abuse-ch-services
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 ?
No, you're right. It would be a nice refactoring. |
* 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 <basedBaba@proton.me>
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
develop
dumpplugin
command and added it in the project as a data migration. ("How to share a plugin with the community")test_files.zip
and you added the default tests for that mimetype in test_classes.py.FREE_TO_USE_ANALYZERS
playbook by following this guide.url
that contains this information. This is required for Health Checks._monkeypatch()
was used in its class to apply the necessary decorators.MockUpResponse
of 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.tests
folder). All the tests (new and old ones) gave 0 errors.DeepSource
,Django Doctors
or other third-party linters have triggered any alerts during the CI checks, I have solved those alerts.Important Rules