Skip to main content

DNS Sentinel

DNS Sentinel is a read-only command-line tool and Python library for a first-pass review of public DNS security configuration. It checks SPF, DMARC, CAA, MX, nameserver count, and DNSSEC record presence. It is an early MVP: results are evidence-based hints, not a compliance certificate or a substitute for a mail/DNS specialist.

Install and run

Requires Python 3.10 or newer.

git clone https://github.com/kkevadiya54/dns-sentinel.git
cd dns-sentinel
python -m pip install .
dns-sentinel example.com
dns-sentinel example.com --json

The first PyPI release is prepared but pending PyPI Trusted Publishing setup; until it is released, install from the repository as shown above.

Exit status is 0 when no error-severity findings exist, 1 when an error-severity finding exists, and 2 when input or runtime setup prevents an audit. Warnings can indicate missing controls or incomplete answers. Network timeouts are reported per check and do not discard other results.

Use only for domains you are authorized to assess. The tool sends ordinary DNS queries to the system-configured recursive resolver; it does not scan hosts, change DNS, or send email.

What checks mean

Check MVP behavior Not claimed
SPF Detects zero/multiple policies and performs basic token sanity checks Full RFC 7208 evaluation, include/redirect expansion, DNS lookup limits, or authorization outcome
DMARC Requires one _dmarc TXT policy and validates version, policy, duplicate tags, pct, and basic rua syntax Full RFC 9989 semantics, organizational-domain discovery, or report processing
CAA Checks returned CAA tag names and flags Complete CAA tree-walk inheritance, issuer authorization semantics, or certificate issuance outcome
MX Checks preference/exchange shape, duplicate targets, and RFC 7505 null MX Whether each mail host is reachable or correctly configured
NS Counts distinct returned NS targets Independent operators, networks, geographic diversity, or authoritative delegation consistency
DNSSEC Reports whether DNSKEY and DS records were observed at the queried name Cryptographic validation. The resolver may or may not validate; this tool does not inspect signatures or establish a chain of trust.

DNS negative answers and resolver failures are different. A timeout, SERVFAIL-like nameserver failure, or local resolver problem produces an unknown/warning result where relevant; it is not reported as proof that a record is absent. DNSSEC checks are strictly record-presence checks.

Python API

from dns_sentinel import Auditor

report = Auditor(timeout=2, lifetime=5).audit("example.com")
for finding in report.findings:
    print(finding.check, finding.status, finding.message)
print(report.to_dict())

Development

python -m venv .venv
. .venv/bin/activate
python -m pip install -e '.[dev]'
pytest --cov=dns_sentinel --cov-report=term-missing
ruff check .
mypy
python -m build

Integration checks can query a domain you control, for example dns-sentinel example.com; the unit suite uses deterministic resolver fakes and does not depend on public DNS.

Contributing

Read CONTRIBUTING.md, the Code of Conduct, SECURITY.md, and COMMUNITY.md. Small reproducible fixes, standards-backed tests, documentation improvements, and carefully scoped record checks are welcome. Please do not claim a check validates more than it does.

Project status

Alpha software. No external contributors, package downloads, adoption, or certifications are claimed. See ROADMAP.md for the staged plan and honest limits.

License

MIT; see LICENSE.

Metadata

Release files for dns-sentinel 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dns-sentinel 0.1.0
File Size Uploaded Provenance Actions
dns_sentinel-0.1.0.tar.gz 14.7 kB With provenance Details for dns_sentinel-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dns-sentinel 0.1.0
File Interpreter ABI Platform Actions
dns_sentinel-0.1.0-py3-none-any.whl Python 3 none any Details for dns_sentinel-0.1.0-py3-none-any.whl

Total release size: 24.3 kB

Release files / dns_sentinel-0.1.0.tar.gz

Download URL dns_sentinel-0.1.0.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2ea3eefe714f818d943091d94c6a78504a26157c44caca896e6aa9017c90ef7a
BLAKE2b-256 checksum
How to use checksums
585c0a22f3eef2d50db3f628a1274890cc33a0078a5e08859d5b6936fe3fe1ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / dns_sentinel-0.1.0-py3-none-any.whl

Download URL dns_sentinel-0.1.0-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2eb8be81510d1433e13daab9bdd446310d60f2c5cbdcc9850959e20cc14f5b3
BLAKE2b-256 checksum
How to use checksums
cb0af424aa452c0d9b2f36dd60851d7e932e60b9a510b3d5d58d60f8c277599d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for dns-sentinel 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dns_sentinel-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page