Skip to content

Commit

Permalink
Update referenced CSV fields
Browse files Browse the repository at this point in the history
In cisagov/dotgov-data#114 the headers for the `current-federal.csv`
file were changed. This updates the script used in this Docker
configuration to use the updated header field values.
  • Loading branch information
mcdonnnj committed Mar 31, 2024
1 parent 7fbe478 commit 44473f2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/vdp_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,14 @@ def check_for_vdp(self, domain: str) -> Tuple[str, bool, bool, str]:
def process_domain(self, domain_info: Dict[str, Any]) -> None:
"""Process a domain entry from the DotGov CSV."""
# These are direct copies from current-federal.csv
vdp_result = self.check_for_vdp(domain_info["Domain Name"])
vdp_result = self.check_for_vdp(domain_info["Domain name"])

self.add_domain_result(
DomainResult(
domain_info["Domain Name"],
domain_info["Domain name"],
domain_info["Agency"],
domain_info["Organization"],
domain_info["Security Contact Email"],
domain_info["Organization name"],
domain_info["Security contact email"],
*vdp_result,
)
)
Expand Down Expand Up @@ -306,10 +306,10 @@ def main():

total_domains = len(domains_to_scan)
for i, domain_info in enumerate(
sorted(domains_to_scan, key=lambda d: d["Domain Name"]), start=1
sorted(domains_to_scan, key=lambda d: d["Domain name"]), start=1
):
logging.info(
"Processing '%s' (%d/%d)...", domain_info["Domain Name"], i, total_domains
"Processing '%s' (%d/%d)...", domain_info["Domain name"], i, total_domains
)
scanner.process_domain(domain_info)

Expand Down

0 comments on commit 44473f2

Please sign in to comment.