-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add VDP Hash to the Domain Results CSV #15
Conversation
This adds a "VDP Hash" field to the domain CSV output. This field will contain the hash of the retrieved and parsed VDP per the cisagov/hash-http-content project. This field contains the hash on an HTTP OK response for the resolved URL and an empty string for anything else.
Switch to using zip() and casting to a dict to populate the results dictionary. This will allow existing definition to be the "source of truth" for the contents of the dictionary. This will reduce human error (or at least make it consistent) and improve maintainability.
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.
These changes look great to me. Great work!
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.
Great work here!
# contents of result as values. This leverages the fact that the | ||
# DomainResult NamedTuple is positionally aligned with the contents of | ||
# the domain_csv_header list. | ||
self.domain_results.append(dict(zip(self.domain_csv_header, result))) |
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.
Nice! 👍
This release includes maintenance updates and the functionality described in cisagov/vdp-scanner-docker#15.
🗣 Description
This PR adds the hash of a visited URL to the domain results output CSV.
💭 Motivation and context
This will allow for analysts to compare domains week-to-week to see if a change has occurred by comparing the respective hashes. This will close #12 .
🧪 Testing
I verified this worked locally and automatic tests pass.
✅ Pre-Approval Checklist
✅ Pre-Merge Checklist