Skip to content
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

GCA Intern: Improve DMARC and SPF advice #22

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

SeanM-temp
Copy link

Adds additional checks for DMARC and SPF records.
DMARC
-Check for v=DMARC1
-Check for p= tag
-Verify akim and aspf values
SPF
-Warning for ptr mechanism
-Check for exceeding dns lookup limit

SeanM-temp and others added 3 commits July 24, 2024 12:03
Improved DMARC and SPF advice
Mapped 100% of the DMARC advisor's function with tests
Cleaned up advice formatting
@wolveix
Copy link
Member

wolveix commented Jul 24, 2024

Hey @SeanM-temp, great first PR!

Your DMARC improvements are appreciated; I used your PR as an opportunity to flesh out the existing DMARC tests :)

Your SPF improvements are a good start, though I think the existing functionality can be improved (use the DMARC function as a starting point). Additionally, your "10 DNS lookup limit" advice is actually slightly misunderstood. This limit refers to the DNS lookups needed to validate the SPF record, not the quantity of keys found within the record.

If you're able to improve this validation further, I'll happily merge this :)

Added check and advice for DNS lookup limit and cyclic lookup.
Added recursive lookup to SPF advice
@wolveix wolveix changed the title Improve DMARC and SPF advice GCA Intern: Improve DMARC and SPF advice Jul 30, 2024
@wolveix
Copy link
Member

wolveix commented Jul 30, 2024

Thanks for the changes, @SeanM-temp!

The existing separation of the advisor and scanner packages does make validating the number of SPF host lookups difficult. The advisor package shouldn't import scanner; however, the custom DNS implementation being outside of the scanner package is difficult. I'll find some time to properly look over your implementation, and see whether we can improve it :)

-Merged Advisor and Scanner packages into Scanner package
-Added MTA-STS scanning and advice
-Added DNSSEC scanning
-Improved STS advice
@wolveix
Copy link
Member

wolveix commented Sep 14, 2024

Hey @SeanM-temp, apologies that this hasn't been properly reviewed and/or merged yet! I intend to look over it soon :)

@wolveix wolveix self-assigned this Jan 9, 2025
@wolveix wolveix self-requested a review January 9, 2025 14:18
# Conflicts:
#	cmd/dss/main.go
#	cmd/dss/scan.go
#	cmd/dss/serve.go
#	pkg/http/server.go
#	pkg/mail/server.go
#	pkg/mail/template.go
#	pkg/model/scan.go
#	pkg/scanner/requests.go
#	pkg/scanner/scanner.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants