What happened
When running the HudsonRock analyzer with a GENERIC observable that isn't an email (like a phone number or username), it crashes with AttributeError: 'dict' object has no attribute 'raise_for_status'.
The issue is in hudsonrock.py response is initialized as {} on line 54, and in the GENERIC branch (line 96), an API call is only made if the observable matches an email regex. If it doesn't match, response stays as {} and then response.raise_for_status() on line 111 crashes because dict doesn't have that method.
Environment
- OS: Ubuntu (Docker)
- IntelOwl version: develop (v6.6.0)
What did you expect to happen
It should raise an AnalyzerConfigurationException for unsupported GENERIC observables instead of crashing.
How to reproduce your issue
- Run the HudsonRock analyzer with a GENERIC observable that isn't an email (e.g., a username like
johndoe123)
- The analyzer crashes at
response.raise_for_status()
Error messages and logs
There's a missing else clause in the Classification.GENERIC branch when the email regex doesn't match, there's no fallback to raise a proper exception.
What happened
When running the HudsonRock analyzer with a GENERIC observable that isn't an email (like a phone number or username), it crashes with
AttributeError: 'dict' object has no attribute 'raise_for_status'.The issue is in
hudsonrock.pyresponseis initialized as{}on line 54, and in theGENERICbranch (line 96), an API call is only made if the observable matches an email regex. If it doesn't match,responsestays as{}and thenresponse.raise_for_status()on line 111 crashes becausedictdoesn't have that method.Environment
What did you expect to happen
It should raise an
AnalyzerConfigurationExceptionfor unsupported GENERIC observables instead of crashing.How to reproduce your issue
johndoe123)response.raise_for_status()Error messages and logs
There's a missing
elseclause in theClassification.GENERICbranch when the email regex doesn't match, there's no fallback to raise a proper exception.