[Bug] Fix AttributeError and Incorrect Exception in AbuseSubmitter connector. Closes #3557#3562
Merged
mlodic merged 2 commits intointelowlproject:developfrom Mar 27, 2026
Conversation
…eSubmitter connector
…ion, adding new tests.
Author
|
Hey @mlodic I've fixed the AttributeError in AbuseSubmitter and updated the exception type. I also added a new test file to verify the fix! PTAL
|
mlodic
approved these changes
Mar 27, 2026
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
The
AbuseSubmitterconnector was crashing with anAttributeErrorwhen attempting to access the name of an analyzable through a nested job hierarchy (self._job.parent_job.parent_job.analyzable.name) without verifying if the parent levels existed. This typically happened when the connector was triggered outside of the intendedTakedown_Requestplaybook flow.Additionally, the connector was incorrectly raising
AnalyzerRunException(an analyzer-specific error) instead ofConnectorRunException, which caused it to bypass the standard error handling for connectors.Key Changes:
_validate_job_hierarchyto safely verify the existence ofparent_joband its grandparent before property access.subjectandbodyproperties to use this validation.ConnectorRunExceptionand updated the corresponding imports.fixes #3557
Type of change
Checklist
developdumpplugincommand and added it in the project as a data migration. (N/A - existing plugin logic fix).test_files.zipand you added the default tests for that mimetype in test_classes.py (N/A).FREE_TO_USE_ANALYZERSplaybook by following this guide (N/A).urlthat contains this information. This is required for Health Checks (HEAD HTTP requests) (N/A).get_mocker_response()method of the unittest class. This serves us to provide a valid sample for testing (N/A).DataModelfor the new analyzer following the documentation (N/A).# This file is a part of IntelOwl https://github.com/intelowlproject/IntelOwl # See the file 'LICENSE' for copying permission.Ruff) 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.