-
-
Notifications
You must be signed in to change notification settings - Fork 507
Fix: Handle CNAME in Quad9 resolver and prevent DNS visualizer errors (#2959) #3005
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
base: develop
Are you sure you want to change the base?
Fix: Handle CNAME in Quad9 resolver and prevent DNS visualizer errors (#2959) #3005
Conversation
hey thanks for the contribution. However it is really important that you don't delete the PR template because there are steps that you need to follow to have this PR to be approved. So please, re-add it, read through it and adjust the PR accordingly. Also, this PR does not solve the 2nd part of the reported issues, the one related to the visualizer. Thank you |
@mlodic Thanks for pointing that out. I’ll re-add the PR template and update it accordingly. |
Hey @mlodic I have updated my PR could you please review it? |
the PR is not for the develop branch....and again, the PR template is there to be there completely, not just parts. I am waiting for these changes, otherwise I'll have to close the PR. |
…ct#2959) Ensure visualizer handles analyzer reports without 'resolutions' and works with normalized records from Quad9 resolver.
8995af1
to
c8521c6
Compare
Hey @mlodic , I’ve updated the PR to target |
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.
could you please execute an analysis of a random domain like google.com with quad9 and screen shot the result?
api_app/analyzers_manager/observable_analyzers/dns/dns_resolvers/quad9_dns_resolver.py
Show resolved
Hide resolved
api_app/analyzers_manager/observable_analyzers/dns/dns_resolvers/quad9_dns_resolver.py
Show resolved
Hide resolved
Switched the Quad9DNSResolver to use the Quad9 DoH JSON API instead of raw DNS wire parsing. This makes the analyzer simpler and aligned with maintainer’s request. The response is now parsed from the "Answer" section of the JSON to extract A record resolutions, while preserving retry and error handling logic. Also restored the missing comment for clarity.
@mlodic , I first tried running the Quad9 analysis inside Docker, but ran into permission issues with the container. |
@PranavShukla7 hey, thanks for testing this but still this does not prove that it works as intended in IntelOwl. It's important to have a local installation of IntelOwl and try every change done in the plugins manually at least once to confirm that there are no regressions. |
Description
This PR fixes the errors reported in issue #2959 during DNS analysis.
Normalized Quad9 DNS records (A, AAAA, CNAME) into a consistent dict format.
Ensured the resolutions key is always present in analyzer reports.
Prevented runtime errors (AttributeError, TypeError, KeyError) when CNAME records are returned.
This improves stability of DNS analysis in both Quad9 resolver and DNS visualizer.
Type of change
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 (HEAD HTTP requests)._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.DataModel
for the new analyzer following the documentation# This file is a part of IntelOwl https://github.com/intelowlproject/IntelOwl # See the file 'LICENSE' for copying permission.
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.