Skip to content

Add RDAP analyzer#3758

Closed
thunderstornX wants to merge 1 commit into
intelowlproject:developfrom
thunderstornX:analyzer-rdap
Closed

Add RDAP analyzer#3758
thunderstornX wants to merge 1 commit into
intelowlproject:developfrom
thunderstornX:analyzer-rdap

Conversation

@thunderstornX

Copy link
Copy Markdown

Adds an observable analyzer that queries the public RDAP bootstrap (https://rdap.org) for registration data of IPs, domains, and URLs.

RDAP (RFC 9082/9083) is the IETF-standard, free, unauthenticated successor to WHOIS. The existing WHOIS analyzers are either paid (whoisxmlapi) or registry-specific (whoisripe), so a free, global lookup fills a gap.

  • Supports ip, domain, and url (resolved to its host) observables; maximum_tlp AMBER.
  • Returns the RDAP JSON; a 404 (no registration record) is surfaced as {"found": false} rather than an error.
  • No API key required.

tests/api_app/analyzers_manager/observable_analyzers/test_rdap.py covers the routing and 404 handling with the HTTP layer mocked.

Copilot AI review requested due to automatic review settings June 9, 2026 10:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a new RDAP observable analyzer (using rdap.org) and wires it into the app via a Django migration, with accompanying unit tests.

Changes:

  • Introduce Rdap observable analyzer that queries rdap.org for IP/domain/URL registration data
  • Add analyzer configuration via migration 0193_analyzer_config_rdap
  • Add mocked unit tests covering core success and negative (404) scenarios

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
tests/api_app/analyzers_manager/observable_analyzers/test_rdap.py Adds unit tests validating endpoint selection and 404 handling
api_app/analyzers_manager/observable_analyzers/rdap.py Implements the RDAP analyzer logic (path selection + HTTP call)
api_app/analyzers_manager/migrations/0193_analyzer_config_rdap.py Registers the new analyzer config in the database via migration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +29 to +30
def update(self) -> bool:
pass
Comment on lines +103 to +105
python_path = plugin.pop("model")
Model = apps.get_model(*python_path.split("."))
if not Model.objects.filter(name=plugin["name"]).exists():
Comment on lines +115 to +117
python_path = plugin.pop("model")
Model = apps.get_model(*python_path.split("."))
Model.objects.get(name=plugin["name"]).delete()
# This file is a part of IntelOwl https://github.com/intelowlproject/IntelOwl
# See the file 'LICENSE' for copying permission.

import logging
from api_app.analyzers_manager.exceptions import AnalyzerRunException
from api_app.choices import Classification

logger = logging.getLogger(__name__)
Comment on lines +29 to +30
@patch("requests.get")
def test_domain_found(self, mock_get):
Comment on lines +38 to +42
hostname = urlparse(self.observable_name).hostname
if not hostname:
raise AnalyzerRunException(
f"unable to extract a hostname from URL {self.observable_name}"
)
Adds an observable analyzer that queries the public RDAP bootstrap (rdap.org) for registration data of IPs, domains, and URLs. RDAP (RFC 9082/9083) is the free, unauthenticated, IETF-standard successor to WHOIS; the existing WHOIS analyzers are either paid (whoisxmlapi) or registry-specific (whoisripe).
@mlodic

mlodic commented Jun 9, 2026

Copy link
Copy Markdown
Member

you have to follow the guidelines, first create an issue, get assigned and here provide proof that it works

@mlodic mlodic closed this Jun 9, 2026
@thunderstornX thunderstornX mentioned this pull request Jun 9, 2026
@thunderstornX

Copy link
Copy Markdown
Author

Apologies @mlodic — I jumped to the PR; I should have opened the issue first. Done now: #3759 (requesting assignment there).

Proof it works — live rdap.org (the analyzer hits it via requests, following the bootstrap redirect):

GET rdap.org/ip/1.1.1.1
{"objectClassName": "ip network", "handle": "1.1.1.0 - 1.1.1.255", "name": "APNIC-LABS", "country": "AU", "startAddress": "1.1.1.0", "endAddress": "1.1.1.255"}

GET rdap.org/domain/example.com  -> objectClassName: domain, ldhName: EXAMPLE.COM (4 events, 2 nameservers)
GET rdap.org/domain/<unregistered>  -> HTTP 404  (analyzer returns {"found": false})

CI is green — backend-tests ran the analyzer's test and applied the migration, linters pass. Also addressed the automated review notes (dropped the unused logger, patch the call site in the tests, added a test for the no-hostname URL path).

@mlodic

mlodic commented Jun 9, 2026

Copy link
Copy Markdown
Member

IntelOWl GUI's screenshot is required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants