-
-
Notifications
You must be signed in to change notification settings - Fork 716
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
DNS add-on: Initial version, checking if there is a SPF record. #5044
base: main
Are you sure you want to change the base?
Conversation
84c68a0
to
e460a5f
Compare
Changed to draft, still a lot of unnecessary/copied code/resources from the example. |
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.
All of the ES files should be removed
addOns/dns/src/main/java/org/zaproxy/addon/dns/DnsPassiveScanner.java
Outdated
Show resolved
Hide resolved
addOns/dns/src/main/javahelp/org/zaproxy/addon/dns/resources/help/contents/simple.html
Outdated
Show resolved
Hide resolved
addOns/dns/src/main/javahelp/org/zaproxy/addon/dns/resources/help/index.xml
Outdated
Show resolved
Hide resolved
addOns/dns/src/main/javahelp/org/zaproxy/addon/dns/resources/help/map.jhm
Outdated
Show resolved
Hide resolved
addOns/dns/src/main/javahelp/org/zaproxy/addon/dns/resources/help/toc.xml
Outdated
Show resolved
Hide resolved
addOns/dns/src/main/javahelp/org/zaproxy/addon/dns/resources/help_es_ES/contents/about.html
Outdated
Show resolved
Hide resolved
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.
Thank you very much, @kingthorin, for your detailed review.
Thank you too, @thc202 , for having a look.
I believe I addressed all the findings and should be "good enough", despite it still requires some improvements such as adding solutions to problems and the like.
This should be implemented with an active scan rule not passive (passive should act just on existing content). Either way you need to reserve a scan rule ID. |
addOns/dns/src/main/resources/org/zaproxy/addon/dns/resources/Messages_es_ES.properties
Outdated
Show resolved
Hide resolved
Yeah, I had my doubts. Thank you! |
Changed according to conversations. I tried to write some tests, but not sure if they will work. |
I think we lost or confused something along the way. The add-on should still be dns. The current rule will remain SPF for starters. |
@kingthorin Oh, my bad. So you proposed to keep the dns plugin, but creating several |
Yup. |
Actually AbstractHostPlugin probably makes the most sense. (At least for the scenarios I foresee.) |
Most of the code was removed instead of renamed. |
Let us know if you need help sorting it out. |
@kingthorin sorry, I forgot to add the new files to git after renaming them. I've been testing it and seem to work fine, but there is an exception. Because the |
960cd5d
to
b21ddfc
Compare
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.
Started review, will do more later. (Sorry I ran out of time)
addOns/dns/src/test/java/org/zaproxy/addon/dns/SpfCheckerTest.java
Outdated
Show resolved
Hide resolved
addOns/dns/src/test/java/org/zaproxy/addon/dns/SpfCheckerTest.java
Outdated
Show resolved
Hide resolved
addOns/dns/src/test/java/org/zaproxy/addon/dns/SpfCheckerTest.java
Outdated
Show resolved
Hide resolved
addOns/dns/src/main/java/org/zaproxy/addon/dns/exceptions/TooManyRecords.java
Outdated
Show resolved
Hide resolved
Is there any non-addressed feedback for PR? |
addOns/dns/src/test/java/org/zaproxy/addon/dns/SpfParserTest.java
Outdated
Show resolved
Hide resolved
Thanks, looks good to me. |
@thc202 do you believe we could remove the WIP mark from this PR? |
You can (and should) remove it once you think it's ready for merge. (Also mark it ready for review.) |
addOns/dns/src/main/javahelp/org/zaproxy/addon/dns/resources/help/contents/about.html
Outdated
Show resolved
Hide resolved
addOns/dns/src/main/javahelp/org/zaproxy/addon/dns/resources/help/contents/dns.html
Outdated
Show resolved
Hide resolved
addOns/dns/src/main/javahelp/org/zaproxy/addon/dns/resources/help/helpset.hs
Outdated
Show resolved
Hide resolved
addOns/dns/src/main/resources/org/zaproxy/addon/dns/resources/Messages.properties
Outdated
Show resolved
Hide resolved
addOns/dns/src/test/java/org/zaproxy/addon/dns/SpfParserTest.java
Outdated
Show resolved
Hide resolved
@magmax do you plan to finish this? |
yes, @kingthorin , but latest review included a lot of changes I didn't expected, and I've been out of time this Christmas. I expect to finish it this week. |
No problem. Holidays and family are important. No rush, just wanted to know it was still planned 🙂 |
I've addressed most part of the feedback. Still to be done:
|
@magmax are you still planning to finish this? |
@kingthorin apologies for the delay. I'm afraid I do not find this funny any more. I'm not a java developer and creating a mock for the DNS service requires me too much time, so... no, I'm not going to continue. Anyway, I learned a lot in the process. Thank you very much. |
@magmax no worries. Thanks for what you've done so far! We can finish it up. |
Signed-off-by: Miguel Angel Garcia <[email protected]>
CLA Assistant Lite bot: I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request |
Rebased current, addressed a few items. Still needs session handling, example alerts, and rule unit tests. Which I'll work on. |
Be good to see a roadmap for the add-on before merging this (and discuss who's going to maintain/improve, as the OP is no longer interested). |
From zaproxy/zaproxy#8159 (comment)
|
Overview
Creating a SPF extension. The original idea was to help to recon the applications used via DNS TXT records, but after some discussion we decided to separate it into different ActiveScanners, where this one is dedicated to detect SPF problems.
Related Issues
None
Checklist
./gradlew spotlessApply
for code formattingFor more details, please refer to the developer rules and guidelines.