Skip to content

[Bug] HudsonRock analyzer crashes when GENERIC observable is not an email #3647

@Abhishek9639

Description

@Abhishek9639

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

  1. OS: Ubuntu (Docker)
  2. 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

  1. Run the HudsonRock analyzer with a GENERIC observable that isn't an email (e.g., a username like johndoe123)
  2. 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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions