Skip to content

Commit

Permalink
Merge pull request #131 from cisagov/lineage/skeleton
Browse files Browse the repository at this point in the history
Lineage pull request for: skeleton
  • Loading branch information
jsf9k authored May 20, 2023
2 parents 25394f2 + 795b382 commit 585c9a8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# These owners will be the default owners for everything in the
# repo. Unless a later match takes precedence, these owners will be
# requested for review when someone opens a pull request.
* @dav3r @felddy @jsf9k @mcdonnnj
* @dav3r @felddy @jasonodoom @jsf9k @mcdonnnj

# These folks own any files in the .github directory at the root of
# the repository and any of its subdirectories.
/.github/ @dav3r @felddy @jsf9k @mcdonnnj
/.github/ @dav3r @felddy @jasonodoom @jsf9k @mcdonnnj
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
- id: setup-python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
# We need the Go version and Go cache location for the actions/cache step,
# so the Go installation must happen before that.
- id: setup-go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: "1.19"
- name: Lookup Go cache directory
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
run: go install ${PACKAGE_URL}@${PACKAGE_VERSION}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pip setuptools wheel
pip install --upgrade --requirement requirements-test.txt
- name: Set up pre-commit hook environments
run: pre-commit install-hooks
Expand Down
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,26 @@ repos:
args:
- --config=.mdl_config.yaml
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.4
rev: v3.0.0-alpha.6
hooks:
- id: prettier
- repo: https://github.com/adrienverge/yamllint
rev: v1.29.0
rev: v1.30.0
hooks:
- id: yamllint
args:
- --strict

# GitHub Actions hooks
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.21.0
rev: 0.22.0
hooks:
- id: check-github-actions
- id: check-github-workflows

# pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit
rev: v3.0.2
rev: v3.2.1
hooks:
- id: validate_manifest

Expand All @@ -83,7 +83,7 @@ repos:
# Python hooks
# Run bandit on the "tests" tree with a configuration
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
rev: 1.7.5
hooks:
- id: bandit
name: bandit (tests tree)
Expand All @@ -98,7 +98,7 @@ repos:
name: bandit (everything else)
exclude: tests
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.1.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
Expand All @@ -112,7 +112,7 @@ repos:
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
rev: v1.1.1
hooks:
- id: mypy
additional_dependencies:
Expand All @@ -133,7 +133,7 @@ repos:

# Terraform hooks
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.77.0
rev: v1.77.1
hooks:
- id: terraform_fmt
- id: terraform_validate
Expand Down
14 changes: 7 additions & 7 deletions src/trustymail/trustymail.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def mx_scan(resolver, domain):
for record in resolver.query(domain.domain_name, "MX", tcp=True):
domain.add_mx_record(record)
domain.mx_records_dnssec = check_dnssec(domain, domain.domain_name, "MX")
except (dns.resolver.NoNameservers) as error:
except dns.resolver.NoNameservers as error:
# The NoNameServers exception means that we got a SERVFAIL response.
# These responses are almost always permanent, not temporary, so let's
# treat the domain as not live.
Expand All @@ -110,7 +110,7 @@ def mx_scan(resolver, domain):
# NXDOMAIN can still have DNSSEC
domain.mx_records_dnssec = check_dnssec(domain, domain.domain_name, "MX")
handle_error("[MX]", domain, error)
except (dns.resolver.NoAnswer) as error:
except dns.resolver.NoAnswer as error:
# The NoAnswer exception means that the domain does exist in
# DNS, but it does not have any MX records. It sort of makes
# sense to treat this case as "not live", but @h-m-f-t
Expand Down Expand Up @@ -413,20 +413,20 @@ def get_spf_record_text(resolver, domain_name, domain, follow_redirect=False):
record_to_return = record_text

domain.spf_dnssec = check_dnssec(domain, domain.domain_name, "TXT")
except (dns.resolver.NoNameservers) as error:
except dns.resolver.NoNameservers as error:
# The NoNameservers exception means that we got a SERVFAIL response.
# These responses are almost always permanent, not temporary, so let's
# treat the domain as not live.
domain.is_live = False
handle_error("[SPF]", domain, error)
except (dns.resolver.NXDOMAIN) as error:
except dns.resolver.NXDOMAIN as error:
domain.is_live = False
domain.spf_dnssec = check_dnssec(domain, domain.domain_name, "TXT")
handle_error("[SPF]", domain, error)
except (dns.resolver.NoAnswer) as error:
except dns.resolver.NoAnswer as error:
domain.spf_dnssec = check_dnssec(domain, domain.domain_name, "TXT")
handle_error("[SPF]", domain, error)
except (dns.exception.Timeout) as error:
except dns.exception.Timeout as error:
domain.spf_dnssec = check_dnssec(domain, domain.domain_name, "TXT")
handle_error("[SPF]", domain, error)
return record_to_return
Expand Down Expand Up @@ -772,7 +772,7 @@ def dmarc_scan(resolver, domain):
) as error:
domain.dmarc_dnssec = check_dnssec(domain, dmarc_domain, "TXT")
handle_error("[DMARC]", domain, error)
except (dns.resolver.NoNameservers) as error:
except dns.resolver.NoNameservers as error:
# Normally we count a NoNameservers exception as indicating
# that a domain is "not live". In this case we don't, though,
# since the DMARC DNS check doesn't query for the domain name
Expand Down

0 comments on commit 585c9a8

Please sign in to comment.